Professional Documents
Culture Documents
Module 2.2
ER to Relational Mapping
Agenda
ER to Relational Mapping
1.Mapping rules/guidelines for mapping ER constructs
2.Mapping rules/guidelines for mapping hierarchies
3.Examples
Solution 1:
Customer(CustID, Name, Phone, AadhaarNo)
Aadhaar(AadhaarNo, Name, Address, ……)
Solution 2:
We can merge these two relations.
• In this case, the primary key of the relationship relation will be only one of the
foreign keys that reference the participating entity relations.
DName
DLocations DNo DLocation
DNo
1 Bangalore
2 Belgaum
Department
3 Bangalore
2 Chennai
Convert each specialization with m subclasses {S1, S2, ..., Sm} and
generalized) superclass C, where the attributes of C are {k, a1, ...an} and k
is the (primary) key, into relation schemas using one of the following
options:
8A: Multiple relations—superclass and subclasses.
8B: Multiple relations—subclass relations only.
8C: Single relation with one type attribute.
8D: Single relation with multiple type attributes.
SB FD RD CA
Student
Date
CourseTiitle
PName Attend
Emp# CourseId
Credits
Professor(Emp#, PName)
Aggregation
Course(CourseId, CourseTitle, Credits)
Student(USN, Stdname)
Attend(USN, CourseId, Emp#, Date)
Teach(CourseId, Emp#)