Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

MAPPING CARDINALITY:

One-to-one
◦ One entity from entity set A can be associated
with at most one entity of entity set B and vice
versa.

1
EXAMPLE
One-to-one relationship:
◦ A customer is associated with at most one loan via the
relationship borrower
◦ A loan is associated with at most one customer via
borrower

2
One-to-many
◦ One entity from entity set A can be associated with more
than one entities of entity set B however an entity from
entity set B, can be associated with at most one entity.

3
EXAMPLE
In the one-to-many relationship a loan is associated with at most
one customer via borrower, a customer is associated with
several (including 0) loans via borrower

4
Many-to-one
◦ More than one entities from entity set A can be associated with at
most one entity of entity set B, however an entity from entity set
B can be associated with more than one entity from entity set A.

5
EXAMPLE
In a many-to-one relationship a loan is associated with several
(including 0) customers via borrower, a customer is associated with
at most one loan via borrower

6
Many-to-many
◦ One entity from A can be associated with more than one entity
from B and vice versa.

7
EXAMPLE:
In many to many relationship,
A customer is associated with several (possibly 0) loans via borrower
A loan is associated with several (possibly 0) customers via borrower

8
Participation of an Entity Set in a
Relationship Set
●Total participation (indicated by double line): every entity in the
entity set participates in at least one relationship in the relationship set
●E.g. participation of loan in borrower is total
● every loan must have a customer associated to it via borrower
●Partial participation: some entities may not participate in any
relationship in the relationship set
●E.g. participation of customer in borrower is partial

9
Alternative Notation for Cardinality
Limits
Cardinality limits can also express participation constraints

10

You might also like