Professional Documents
Culture Documents
Management Systems
Entity Relationship Diagrams
Key Attributes
An attribute or set of attributes to identify
an entity instance uniquely
Types
Super key
Candidate key
Primary key
Secondary and Alternate keys
Example of Key
Relationships
Relationships
Relationships are the connections
and interactions between the
entities instances, e.g., Program
and Student ETs are linked
How to identify relationships
Naming Relationships
Up to you
If there is no proper name of
the association in the system
then participants’ names of
abbreviations are used
Naming
STUDENT and CLASS have ENROLL
relationship
However, it can also be named as
STD_CLS
Symbol for Relationships
DEPT EMP
STD BOOK
Relationships
Relationship type can be
identified like an entity type
A relationship type is a concept
of a relationship
Relationships
Entities involved in a relationship
are called its participants
Types of the relationships can be
established on the basis of
participant ETs
Relationships Types
STD BOOK
PROJ EMP
Attributes of the Rships
The key
The relationships can have their
descriptive attributes
Where to place
Attributes of Rships
GRADE
STD COURSE
Ternary Relationships
FACULTY
PROJ EMP
SKILL
Ternary Relationships
EMP CHAIR-
PERSON
EMP SPOUSE
Cardinality of Rships
Many to many
EMP PROJ
Database
Management Systems
Cardinality
Minimum Cardinality
Determines whether the link is
compulsory or optional
Important, since it effects the
implementation
Cardinality Example
STD BOOK
EMP PROJ
STD COURSE
STD HOBBY
Other Notations
STD 1 M
BOOK
STD M 1
HOBBY
PROJ M M
EMP
Other Notations
DEPT 1 1
CHAIR
STD 1
* BOOK
PROJ * * EMP
Roles in Relationships
Determine the role ETs play in
a relationship
Most of the time is clear from
the context, like in STD and
COURSE relationship
Roles in Relationships
Two situation when they
should be expressed explicitly
A one to one relationship
Two ETs having more than
one relationship
Roles Examples
ENROLS
STD ENROLMENT ENROLLED
BY
COURSE
HEADS
FACULTY
HEAD
HEADED BY
Roles Examples
STD_TEACH
STD FACULTY
STD_SUP
Dependencies
A type of constraint
Existence dependency
Existence Dependency
bkId
bkId
BOOK
BOOK
COPY
bkTitle CopyId
Thank You