L17 - ER Modeling 3

# L17 ER Modeling 3 - Last time we ended discussing Last time we ended discussing Design Issues Design Issues Â Use of entity sets vs attributes Â¢

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Last time we ended discussing Last time we ended discussing Design Issues Design Issues Â¡ Use of entity sets vs. attributes Â¢ Choice mainly depends on the structure of the enterprise being modeled, and on the semantics associated with the attribute in question. Â¡ Use of entity sets vs. relationship sets Â¢ Possible guideline is to designate a relationship set to describe an action that occurs between entities Â¡ Binary versus n-ary relationship sets Â¢ Although it is possible to replace any nonbinary ( n-ary, for n > 2) relationship set by a number of distinct binary relationship sets, a n-ary relationship set shows more clearly that several entities participate in a single relationship. Â¡ Placement of relationship attributes Binary Vs. Non Binary Vs. Non-- Binary Relationships Binary Relationships Â¡ Some relationships that appear to be non-binary might be better represented using binary relationships Â¢ Suppose that we have a ternary relationship parents , relating a child to his/her father and mother, is best replaced by two binary relationships, father and mother Â¡ Using two binary relationships would allow representation of partial information (e.g. only mother being known) Â¢ But we donâ€™t want to prohibit non-binary relationships because there are some relationships that are naturally non-binary Â¡ Example: the text example works_on Converting Non Converting Non-- Binary Relationships to Binary Form Binary Relationships to Binary Form Â¡ In general, any non-binary relationship can be represented using binary relationships by creating an artificial entity set, call it E. Â¢ Replace R between entity sets A, B and C by a new entity set E , and three relationship sets: 1. R A , relating E and A 2. R B , relating E and B 3. R C , relating E and C Â¢ Create a special identifying attribute for E Â¢ Add any attributes of R to E Â¢ For each relationship instance ( a i , b i , c i ) in R, create 1. a new entity e i in the entity set E 2. add ( e i , a i ) to R A 3. add ( e i , b i ) to R B 4. add ( e i , c i ) to R C Â©Silberschatz, Korth and Sudarshan Converting Non Converting Non-- Binary Relationships (Cont.) Binary Relationships (Cont.) Â¡ We also need to translate cardinality constraints Â¢ But â€¦ translating all constraints may not be possible Â¢ There may be instances in the translated schema that cannot correspond to any instance of R Â¢ Suppose that in our example involving relationship R between A, B, and C we have a constraint that says R is many-one from A,B to C so that with each pair of entities (a, b) there is associated at most one entity c via R Â¡ How would we add constraints to the relationships R A , R B and R C to ensure that a newly created entity in E corresponds to exactly one entity in each of entity sets A, B and C Â¢ A peek ahead â€¦ we can avoid creating an identifying attribute by making E a weak entity set identified by the three relationship sets Mapping Cardinalities affect ER Design Mapping Cardinalities affect ER Design...
View Full Document

## This note was uploaded on 04/08/2008 for the course EE 468 taught by Professor Conry during the Spring '08 term at Clarkson University .

### Page1 / 36

L17 ER Modeling 3 - Last time we ended discussing Last time we ended discussing Design Issues Design Issues Â Use of entity sets vs attributes Â¢

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online