Professional Documents
Culture Documents
Lect#4 Database Systems
Lect#4 Database Systems
By
Syed Bakhtawar Shah Abid
Lecturer in Computer Science
1 Database Systems
Relationship
2 Database Systems
Cardinality of Relationships
One-to-One
– Each entity in the relationship will have exactly
one related entity
One-to-Many
– An entity on one side of the relationship can have
many related entities, but an entity on the other
side will have a maximum of one related entity
Many-to-Many
– Entities on both sides of the relationship can have
many related entities on the other side
3 Database Systems
Cardinality Constraints
Unary relationships
7 Database Systems
Degree of Relationship
Binary relationships
8 Database Systems
Degree of Relationship
Ternary relationship
9 Database Systems
Relationship
Relationship type
– A meaningful relationship between entity types
Relationship Instance
– A relationship between entity instances where each
relationship instance includes exactly only entity from each
participating entity type
An entity–has attributes
11 Database Systems
Associative Entity
12 Database Systems
Associative Entity
13 Database Systems
A binary relationship with an attribute
14 Database Systems
An associative entity (CERTIFICATE)
15 Database Systems
Ternary relationship as an associative entity
16 Database Systems