ERD

Data modeling

  • Document software system using diagrams and symbols
  • Represent communication of data
  • Entity Relationship Diagram
    • graphical representation of data required for database

Entity relationship data model

Entities: tables that hold specific information, specific object of interest.

Relationships: associations or interactions between entities, describe the link between 2 entities

  • always operate in both directions.

mostly used to split an entity into two to provide information concisely and make it more understandable.

X may be linked to many

instances of Y, but an instance of Y is linked to only one instance of X.

X may be linked to many instances of Y and Y may be linked to many instances of X.

Steps to Create an ERD

Identify Entities (each must appear only once, named with singular nouns)

Identify Relationships between those entities

Decide Connectivity for each relationship:

  • One-to-One (1:1)
  • One-to-Many (1:M)
  • Many-to-One (M:1)
  • Many-to-Many (M:M)

Refine M:M Relationships

  • Never connect a relationship to another relationship.
  • Remove redundant or unnecessary relationships

Dashed underline for foreign key, solid underline for primary key