Description:

  • Entities can participate in relationships with other entities.
    • For example: CUSTOMER buys ITEM

Binary relationship:

Ternary relationship:

  • Degree 3 meaning 3 entity instances are related in a relationship
    • Example: 2 parents to have 1 children

Cardinality:

Recursive relationship

  • It is possible for an entity to have a relationship to itself—this is called a recursive relationship (also known as a unary relationship)

  • 
    erDiagram
    CUSTOMER ||--o{ CUSTOMER: "refers to"
    CUSTOMER {
    string name
    string custNumber
    string sector
    }