Close
Register
Close Window

Database

Chapter 2 The ER-Data Model and Mapping to Relational Schema

Show Source |    | About   «  2.5. ERD Relationship Types   ::   Contents   ::   2.7. Comprehensive example  »

2.6. Binary Vs Ternary Relationships

This section is devoted for:

This is achieved by: presenting two problem statements for two different stores’ policies of the same application domain.

The design solution of each problem should relate the same three entities. As the two stores have different working policies, so they have to use different ways to relate those entities so as to comply with the requirements of each store.

After presenting the problems, the reader will find that; the solution of the first problem (Store X) requires the use of a ternary relationship between the three entities, whereas the solution of the second problem (Store Y) requires the use of two binary relationships between the same three entities.

For each problem statement: $(Store$ $X$ $&$ $Store$ $Y$ $problems)$, all possible solutions that the designer may think of will be analysed starting with the wrong ones and finally presents the right solution. This aims to better understand the drawbacks of the wrong designs. And helps the reader to identify the circumstances in which a ternary relationship between three entities is required.

2.6.1. General Problem Statement

  • Both solutions require definning three entities (distributor, product, country).

  • The distributor entity is identified by distributor number and has name attribute.

  • Country is identified by country number and and has name attribute

  • Product is identified by product number and also has name attribute.

Tip: Before start watching the visualizations you should obey all step by step instructions given in the slides for better understanding.

General problem statement and Store X first solution illustration:

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

2.6.2. Ternary Relationship Example (Store X)

Store X second solution illustration:

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

Store X third solution illustration:

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

Store X forth solution illustration:

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

2.6.3. Binary Relationship Example (Store Y)

Store Y first & second solutions’ analysis:

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

Store Y third & forth solutions’ analysis:

Settings

Proficient Saving... Error Saving
Server Error
Resubmit

   «  2.5. ERD Relationship Types   ::   Contents   ::   2.7. Comprehensive example  »

nsf
Close Window