Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

ER-to-Relational

Mapping Example
ER-to-Relational Mapping

 ER-to-Relational Mapping Algorithm


 Step 1: Mapping of Regular Entity Types
 Step 2: Mapping of Weak Entity Types
 Step 3: Mapping of Binary 1:1 Relation Types
 Step 4: Mapping of Binary 1:N Relationship Types.
 Step 5: Mapping of Binary M:N Relationship Types.
 Step 6: Mapping of Multivalued attributes.
 Step 7: Mapping of N-ary Relationship Types.
PersonID

 Person( personid, phone , name, lastname, email )


 Person( personid , name)
PersonID
Phones ( phoneid , personid, phone )
TEDU Card CardID

 Person( personid, name, lastname, email, phone, cardid) PersonID


Card ( cardid , name )

 Or

 Person( personid , name, lastname, email, phone )


Card ( cardid , name , personid)
HouseID

 Person( personid , name, lastname, email, phone) PersonID


House ( houseid , num , address, personid)
Type Card

 Person( personid, name, lastname, email, phone) PersonID


Cards ( type)
HasRelat ( num , personid , type)
 Company( CompanyID , name , address )
Staff( StaffID , dob , address , WifeID)
Child( ChildID , name , StaffID )
Wife ( WifeID , name )
Phone(PhoneID , phoneNumber , StaffID)
Task ( TaskID , description)
Work(WorkID , CompanyID , StaffID , since )
Perform(PerformID , StaffID , TaskID )

You might also like