Relationship degree
- Indicates the number of
entities or participants
association with a
relationship.
Three types of
Relationship degree

1. Unary relationship
2. Binary relationship
3. Ternary relationship
1. Unary relationship
    - Exist when an association is
    maintained within a single entity.



“Recursive
Relationship”
2. Binary relationship
- Exist when two entities are
associated in a relationship.
3. Ternary relationship
- Exist when three entities are associated. Although
higher degrees exist, they are rare and are not
specifically named.
Three types of relationship degree
1. A DOCTOR writes one or more PRESCRIPTIONs.
2. A PATIENT may receive one or more PRESCRIPTIONs.
3. A DRUG may appear in one or more PRESCRIPTIONs.
“Recursive Relationship”

-Is one in which a relationship can
exist between occurrences of the
same entity set.
For example:
1:M UR “an EMPLOYEE may manage many EMPLOYEEs,
and each EMPLOYEEs managed by one EMPLOYEE”

1:1 UR “an EMPLOYEE may be married to one and only
one other EMPLOYEE”

M:N UR “ a COURSE may be a prerequisite to many other
COURSEs, and each COURSE may have many other
COURSEs as prerequisites.
1:1 UR “an EMPLOYEE may be married to
   one and only one other EMPLOYEE”
Unary relationship are common
 in manufacturing industries…
Implementation of the recursive relationship
         “PART contains PART”
The M:N recursive relationship might be
more familiar in a school environment…
The 1:M recursive relationship
“EMPLOYEE manages EMPLOYEE”
Participation as described is bidirectional, meaning
 that it must be addressed in both directions along
                   the relationship.




•Must every employee have a spouse who is
an employee?

•Must every employee be spouse to
another employee?
“NO” … it is possible to be an
employee and not have another
employee as a spouse. Also it
possible to be an employee and
not be the spouse of another
employee…
Associative (composite) Entities
-In the original ERM described by Chen,
relationships do not contain attributes.
-The associative entity is used to
implement a M:N relationship between
two or more entities.
-Also known as a “Composite or Bridge
entity”
Example of Bridge .
Entity relationship
Entity relationship
Entity relationship
Entity relationship
Entity relationship

Entity relationship

  • 1.
    Relationship degree - Indicatesthe number of entities or participants association with a relationship.
  • 2.
    Three types of Relationshipdegree 1. Unary relationship 2. Binary relationship 3. Ternary relationship
  • 3.
    1. Unary relationship - Exist when an association is maintained within a single entity. “Recursive Relationship”
  • 4.
    2. Binary relationship -Exist when two entities are associated in a relationship.
  • 5.
    3. Ternary relationship -Exist when three entities are associated. Although higher degrees exist, they are rare and are not specifically named.
  • 6.
    Three types ofrelationship degree
  • 7.
    1. A DOCTORwrites one or more PRESCRIPTIONs. 2. A PATIENT may receive one or more PRESCRIPTIONs. 3. A DRUG may appear in one or more PRESCRIPTIONs.
  • 8.
    “Recursive Relationship” -Is onein which a relationship can exist between occurrences of the same entity set.
  • 9.
    For example: 1:M UR“an EMPLOYEE may manage many EMPLOYEEs, and each EMPLOYEEs managed by one EMPLOYEE” 1:1 UR “an EMPLOYEE may be married to one and only one other EMPLOYEE” M:N UR “ a COURSE may be a prerequisite to many other COURSEs, and each COURSE may have many other COURSEs as prerequisites.
  • 10.
    1:1 UR “anEMPLOYEE may be married to one and only one other EMPLOYEE”
  • 11.
    Unary relationship arecommon in manufacturing industries…
  • 12.
    Implementation of therecursive relationship “PART contains PART”
  • 13.
    The M:N recursiverelationship might be more familiar in a school environment…
  • 14.
    The 1:M recursiverelationship “EMPLOYEE manages EMPLOYEE”
  • 15.
    Participation as describedis bidirectional, meaning that it must be addressed in both directions along the relationship. •Must every employee have a spouse who is an employee? •Must every employee be spouse to another employee?
  • 16.
    “NO” … itis possible to be an employee and not have another employee as a spouse. Also it possible to be an employee and not be the spouse of another employee…
  • 17.
    Associative (composite) Entities -Inthe original ERM described by Chen, relationships do not contain attributes. -The associative entity is used to implement a M:N relationship between two or more entities. -Also known as a “Composite or Bridge entity”
  • 18.