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 ¢

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
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 Right Arrow Icon
Ask a homework question - tutors are online