2. ENTITY RELATIONSHIP DIAGRAM
• An ERD is a graphical representation of the entities in a database, and
their relationship to each other
• Indicates:
• Entity name
• Relationship
• Cardinality
• Attribute names (optional)
3. CARDINALITY
Cardinality is a description of the numerical relationship between the rows
of one table and the rows of the other.
There are 3 types of cardinality:
• One-to-one (1:1)
• One-to-many (1:m)
• Many-to-many (m:n)
5. ERD – EMPLOYEE EXAMPLE
Employee Company
works for
Employee
Code
Name
Salary
DOB
Company
Number *
Company
Name
Company
Number
Address
Telephone
Managing
Director
6. ERD – CAR HIRE EXAMPLE
Customer Booking Car Depot
places contain
s
is stored at