

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Mapping Relationships, Binary Relationships, Minimum Cardinality, Binary one to one, Unary Relationships, Subtype Relationship, Relational Algebra are the main points of this lecture.
Typology: Slides
1 / 25
This page cannot be seen from the preview
Don't miss anything!
Relationships are mapped
according to their degree and cardinalities
Starting from binary relationships
EMP PROJ
EMP(empId, empName, projId) PROJ(projId, projName, projDur, projCost)
Minimum cardinality on one side
needs special attention
If optional, define FK as normal
If compulsory, make FK not null
A third table is created for the relationship, sometimes also called associative entity type Generally, the PKs of the participating ETs are used as PK of the third table
BOOK STD
stId sName
sFname
bkId bkTitle
bkAuth
isDate
rtDate
STD(stId, sName, sFname) BOOK(bkId, bkTitle, bkAuth) TARNS(bkId, stId, isDate, rtDate)
bkId stId
A special form of one to many relationship
PK of one ET has to be included in the other as FK.
Normally PK of compulsory side is included in the optional side
Unary one to many introduces the PK of same ET as FK
Many to many unary requires creation of another relation with a composite PK
EMP
manages
empName^ empId
eQual
EMP(empId, empName, eQual, empId)
ITEM
has
iName itemNo
uCost Qty
ITEM(itemNo, iName, uCost) COMPONENT(itemNo, CompNo, Qty)Docsity.com
Separate relations are created for each of the supertype and subtypes Assign relevant attributes Primary key of the supertype is included in all relations, that work for both the identity and the link