Relationship Sets >A relationship is an association among several entities Example 44553(Peltier advisor 22222 Einstein student entity relationship set instructor entity >A relationship set is a mathematical relation among n>2 entities, each taken from entity sets {e1,e2,en)le1∈卫1,e2∈卫2,…,en∈ Eny where(e1, e2,..., en)is a relationship Example (44553,22222)∈ advisor
Relationship Sets ➢A relationship is an association among several entities Example: 44553 (Peltier) advisor 22222 (Einstein) student entity relationship set instructor entity ➢A relationship set is a mathematical relation among n 2 entities, each taken from entity sets {(e1, e2, … en) | e1 E1, e2 E2, …, en En} where (e1, e2, …, en) is a relationship Example: (44553,22222) advisor
Relationship Set advisor 76766 Crick 98988 Tanaka 45565 Katz 12345 Shankar 10101 Srinivasa 00128Zhang 98345Kim 76543 Brown 76543 Singh 76653Aoi 22222 Einstein 23121 Chavez instructor 44553Peltier student
Relationship Set advisor
Relationship Sets(Cont) An attribute can also be associated with a relationship set For instance, the advisor relationship set between entity sets instructor and student may have the attribute date which tracks when the student started being associated with the advisor 76766 Crick 98988 Tanaka 45565 Katz 3May2008 12345 Shankar 10101 Srinivasan 10June2007 12June2006 00128Zhang 98345Kim 6 June 2009 76543 Brown 76543 Singh 76653Aoi 31May2007 22222 Einstein 23121Chavez 4May2006 instructor 44553 Peltier student
Relationship Sets (Cont.) ➢An attribute can also be associated with a relationship set. For instance, the advisor relationship set between entity sets instructor and student may have the attribute date which tracks when the student started being associated with the advisor
Degree of a Relationship Set >binary relationship involve two entity sets(or degree two) most relationship sets in a database system are binary >Relationships between more than two entity sets are rare. Most relationships are binary Example: students work on research projects under the guidance of an instructor. relationship proi guide is a temary relationship between instructor, student, and project
Degree of a Relationship Set ➢binary relationship • involve two entity sets (or degree two). • most relationship sets in a database system are binary. ➢Relationships between more than two entity sets are rare. Most relationships are binary. • Example: students work on research projects under the guidance of an instructor. • relationship proj guide is a ternary relationship between instructor, student, and project
Mapping Cardinality Constraints >Express the number of entities to which another entity can be associated via a relationship set > Most useful in describing binary relationship sets >For a binary relationship set the mapping cardinality must be one of the following types: One to one One to many Many to one Many to many
Mapping Cardinality Constraints ➢Express the number of entities to which another entity can be associated via a relationship set. ➢Most useful in describing binary relationship sets. ➢For a binary relationship set the mapping cardinality must be one of the following types: • One to one • One to many • Many to one • Many to many