Relationship Types
Relationship types represent meaningful associations between entities. The degree of a relationship refers to the number of participating entities:
- Unary: A single entity type involved.
- Binary: Two entity types involved (most common).
- Ternary: Three entity types involved.
- Quaternary: Four or more entities involved.
Unary, Binary, Ternary Relatioonship
Entity Relationship Diagram
An Entity-Relationship Diagram (ERD) is a graphical representation of entities and their relationships. It helps visualize:
- Unary relationships: Where one entity is related to itself (e.g., Staff supervises Staff).
- Binary relationships: Common between two entities (e.g., Branch has Staff).
- Ternary relationships: Involving three entities, e.g., Supplier supplies Product to Customer.
Relationship with Attributes
Relationships can also have attributes. For example, the relationship between a Customer and Order might include an attribute such as OrderDate.