0% found this document useful (0 votes)
76 views11 pages

Constraints in Database Mapping N Participation

The document discusses constraints in database design, focusing on mapping constraints (cardinality ratio) and participation constraints. Mapping constraints define the relationships between entity sets, including one-to-one, one-to-many, many-to-one, and many-to-many relationships. Participation constraints specify whether all or only some entities are involved in a relationship, categorized as total or partial participation.

Uploaded by

anujwagle31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views11 pages

Constraints in Database Mapping N Participation

The document discusses constraints in database design, focusing on mapping constraints (cardinality ratio) and participation constraints. Mapping constraints define the relationships between entity sets, including one-to-one, one-to-many, many-to-one, and many-to-many relationships. Participation constraints specify whether all or only some entities are involved in a relationship, categorized as total or partial participation.

Uploaded by

anujwagle31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Constraints in Database

• An Enterprise ER schema may define certain


constraints to which the contents of the database
must conform. There are two important
constraints. They are:
• 1. Mapping Constraints (Cardinality Ratio)
• 2. Participation Constraints
Prepared By: Yam Kumar Baral, JMC 1
Mapping Constraints

• Also known as Cardinality Ratio


• It expresses the number of entities of an entity set
that can be associated with how many entities of
another entity set through a relationship.
• It is most useful in describing the relationship sets
that involve more than two entity sets.
Prepared By: Yam Kumar Baral, JMC 2
Mapping Constraints

For a binary relationship set the mapping cardinality must be one of the
following types:
1. One to one (1:1)
2. One to many (1:N)
3. Many to one (M:1)
4. Many to many (M:N)

Prepared By: Yam Kumar Baral, JMC 3


One-to-One(1:1)

An entity in entity set A is


associated with at most one entity
in entity set B and an entity in B is
associated with at most one entity
in A. For example: the
relationship between Department
and Manager entity sets.

Prepared By: Yam Kumar Baral, JMC 4


One-to-Many(1:N)

In One-to-Many relationship, an entity


in entity set A is associated with any
number of entities (0 or more) in entity
set B. However, an entity in B is
associated with at most one entity in
A. For example: the relationship
between Department and Employee
entity sets.
Prepared By: Yam Kumar Baral, JMC 5
Many-to-One(M:1)

In Many-to-One relationship, an entity


in A is associated with at most one
entity in B. However, an entity in B
can be associated with any number
of entities (0 or more) in A. For
example: the relationship between
Employee and Manager entity sets.

Prepared By: Yam Kumar Baral, JMC 6


Many-to-Many(M:N)

In Many-to-Many relationship, an entity in


entity set A is associated with any number
of entities (0 or more) in entity set B and
an entity in B can be associated with any
number of entities (0 or more) in A. For
example: the relationship between
Employee and Project entity sets.

Prepared By: Yam Kumar Baral, JMC 7


Participation Constraints

• It specifies the participation of an entity set in a relationship set.


• There are two types participation constraints
1. Total participation
2. Partial participation
1. Total Participation − Each entity is involved in the relationship. Total participation is
represented by double lines.
2. Partial participation − Not all entities are involved in the relationship. Partial participation
is represented by single lines.

Prepared By: Yam Kumar Baral, JMC 8


Participation Constraints

Prepared By: Yam Kumar Baral, JMC 9


Participation Constraints

The participation of an entity set A in a relationship


set R is said to be total participation if every entity in
A participates at least one relationship in R. If only
some entity in A participates in relationship R then
the participation of entity set A on relationship set R
is called partial participation.
Prepared By: Yam Kumar Baral, JMC 10
STUDENT Issue BOOK

Total Participation Partial Participation

Prepared By: Yam Kumar Baral, JMC 11

You might also like