Professional Documents
Culture Documents
Database Management System 6: ER Modeling..
Database Management System 6: ER Modeling..
Chittaranjan Pradhan
Participation
Constraints
Chittaranjan Pradhan
School of Computer Engineering,
KIIT University
6.1
ER Modeling...
Keys
Chittaranjan Pradhan
Keys
Keys
Keys for Relationship sets
A key allows us to identify a set of attributes that suffice to
Relationship Types
distinguish entities from each other Participation
• A key is a property of the entity set, rather than of the Constraints
l..h Representation
6.2
ER Modeling...
Keys...
Chittaranjan Pradhan
Keys...
Keys
• If none of the columns is a candidate for the primary key in Keys for Relationship sets
referring to another entity set having the primary key. In Strong Entity sets and
Weak Entity sets
ER diagram, foreign key can not be represented
6.3
ER Modeling...
Keys for Relationship sets
Chittaranjan Pradhan
Keys
Keys for Relationship sets
Participation
Let R be a relationship set involving entity sets E1 , E2 , ... En . Constraints
l..h Representation
Let PK(Ei ) denotes the set of attributes that forms the primary Mapping Cardinality
Representation (Crow’s
key for entity set Ei Foot Notation)
6.4
ER Modeling...
Keys for Relationship sets...
Chittaranjan Pradhan
M:N relationship
The primary key of the relationship set consists of the union of Keys
Keys for Relationship sets
the primary keys of the entity sets Relationship Types
Participation
Constraints
l..h Representation
Mapping Cardinality
Representation (Crow’s
Foot Notation)
1:M relationship
The primary key of the relationship set is the primary key of the
many side entity set
6.5
ER Modeling...
Keys for Relationship sets...
Chittaranjan Pradhan
Keys
Keys for Relationship sets
Relationship Types
6.6
ER Modeling...
Relationship Types
Chittaranjan Pradhan
Relationship Types
A relationship type is a meaningful association among entity Keys
Keys for Relationship sets
types. The degree of a relationship type is defined as the Relationship Types
number of entity sets participating in that relationship type Participation
Constraints
l..h Representation
Binary relationship Mapping Cardinality
Representation (Crow’s
Foot Notation)
A relationship type is said to be binary when two entity sets are Strong Entity sets and
involved Weak Entity sets
Ternary relationship
Relationship types that involve three entity sets are defined as
ternary relationships
6.7
ER Modeling...
Relationship Types...
Chittaranjan Pradhan
Quaternary relationship
A relationship of degree four can be referred to as a quaternary Keys
Keys for Relationship sets
relationship Relationship Types
Participation
Constraints
l..h Representation
Mapping Cardinality
Representation (Crow’s
Foot Notation)
Recursive relationship
The participation of an entity set in a relationship type can be
indicated by its role name. When used in recursive relationship
types, role names describe the functionality of the participation
6.8
ER Modeling...
Participation Constraints
Chittaranjan Pradhan
Participation Constraints
The participation constraint for an entity set in a binary Keys
Keys for Relationship sets
relationship type is based on whether an entity of that entity set Relationship Types
needs to be related to an entity of the other entity set through Participation
this relationship type Constraints
l..h Representation
Mapping Cardinality
• Total participation: If, in order to exist, every entity must Representation (Crow’s
Foot Notation)
participate in the relationship, then participation of the Strong Entity sets and
entity set in that relationship type is total or mandatory. Weak Entity sets
6.9
ER Modeling...
l..h Representation
Chittaranjan Pradhan
l..h Representation
An edge between an entity set and a binary relationship set Keys
Keys for Relationship sets
can have an associated minimum and maximum cardinality; Relationship Types
shown as l..h, where l is the minimum and h is the maximum Participation
Constraints
cardinality l..h Representation
Mapping Cardinality
• A minimum value of 1 indicates total participation of the Representation (Crow’s
Foot Notation)
6.10
ER Modeling...
Mapping Cardinality Representation (Crow’s Foot Notation)
Chittaranjan Pradhan
Mapping Cardinality Representation (Crow’s Foot Notation)
Keys
Keys for Relationship sets
Relationship Types
Participation
Constraints
l..h Representation
Mapping Cardinality
Representation (Crow’s
Foot Notation)
6.11
ER Modeling...
Strong Entity sets and Weak Entity sets
Chittaranjan Pradhan
An entity set where the entities have independent existence Relationship Types
6.12
ER Modeling...
Strong Entity sets and Weak Entity sets...
Chittaranjan Pradhan
a unique identifier of the parent entity set in the identifying Relationship Types
Participation
relationship type uniquely identifies weak entities, is called Constraints
the partial key of the weak entity set and is denoted by a l..h Representation
Mapping Cardinality
dotted underline. The partial key of a weak entity set is Representation (Crow’s
Foot Notation)
6.13