SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
Eng.Samir Sabry
IT Instructor
Before of all we must learn and know Entit-Relaionship notation:-
We start by this example: Company database
The Company assigns an employee to one department but may work on several projects,
which are not necessarily controlled by the same department. It keeps track of the number of
hours per week that an employee works on each project. It records the direct supervisor of
each employee. It stores the dependants of each employee for insurance purposes. It keeps
each dependant’s: name, gender, birth date, and relationship to employee
Mapping Rules
Step 1: For each regular entity types
Create a new relation that includes Simple attributes
 For a composite attribute include only the simple component attributes
 Leave out multivalued attributes (to step 6)
 Pick a PK
 For example, we create the relations EMPLOYEE, DEPARTMENT, and
PROJECT for the regular entity types
 Then, we choose SSN, DNUMBER and PNUMBER as primary keys for the
relations EMPLOYEE, DEPARTMENT, and PROJECT, respectively.
 Note: Foreign keys are not included yet.
Step 2: weak entity types
Note: Weak entity type has no key - Related to an identifying or owner
entity type. Has total participation constraint with identifying entity.
 Create a new relation with simple attributes
 Include an FK to the owner entity's relation
 For example, we create the relation DEPENDENT in this step.
 Include the primary key SSN of the EMPLOYEE as a foreign key attribute of
DEPENDENT.
 The primary key of DEPENDENT is the combination {ESSN, DEPENDENT_NAME}
because DEPENDENT_NAME is the partial key of DEPENDENT.
Step 3: 1:1 relationship types
Add to one of the participating relations an FK to the other relation:
 It is better to add to a relation that has total participation in the relationship
 Include any relationship attributes
 Note: When both participations are total, we may merge the two entity types
and the relationship into a single relation.
 Let’s consider the relationship type MANAGES which is total.
 Include the primary key of EMPLOYEE as foreign key in the DEPARTMENT and
rename it as MGRSSN.
 Include the simple attribute StartDate of the MANAGES in the DEPARTMENT
and rename it MGRSTARTDATE.
Step 4: 1: N relationship types
 Add to the relation on the N-side an FK to the other relation.
 Include any relation attributes
 Let’s consider the 1:N relationships type WORKS_FOR, CONTROLS and
SUPERVISION.
 For SUPERVISION, include the primary key SSN of EMPLOYEE as foreign key
in itself and call it SUPERSSN.
 For WORKS_FOR, include the primary key DNUMBER of DEPARTMENT as
foreign key in EMPLOYEE and call it DNO.
 For CONTROLS, include the primary key DNUMBER of DEPARTMENT as
foreign key in PROJECT and call it DNUM
Step 5: M: N relationship types
 Create a New relation containing as FK of the primary keys of
both entity types participating relations
 Include any relation attributes
 Let consider the M:N relationship type WORKS_ON.
 Include the primary keys of the PROJECT and EMPLOYEE relations as
foreign keys in WORKS_ON and rename them PNO and ESSN, respectively.
 Include an attribute HOURS in WORKS_ON.
Step 6: multi-valued attribute
Create new relation for each multi-valued attribute containing FK of the
PK from the Entity
 Let’s consider the attribute DLOCATION.
 Create a relation DEPT_LOCATIONS.
 The primary key of DEPT_LOCATIONS is the combination of {DNUMBER,
DLOCATION}.
Step 7: ternary relationship types
 Create new relation containing a FK referencing each of the 3
entities involved
 Include any relation attributes
Final result:
Notes: How many relations?
1. Entity (both regular and weak)
2. M:N relationship
3. Multi-valued attribute
4. Ternary relationship

Weitere ähnliche Inhalte

Andere mochten auch

Keyboard symbols
Keyboard symbolsKeyboard symbols
Keyboard symbolsSamir Sabry
 
Sample Test Word Intermediate Mulitple Choice
Sample Test Word Intermediate Mulitple ChoiceSample Test Word Intermediate Mulitple Choice
Sample Test Word Intermediate Mulitple ChoiceSamir Sabry
 
BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2Prithwis Mukerjee
 
Building an Enterprise Metadata Repository
Building an Enterprise Metadata RepositoryBuilding an Enterprise Metadata Repository
Building an Enterprise Metadata RepositoryEmbarcadero Technologies
 
What is Metadata?
What is Metadata?What is Metadata?
What is Metadata?Adgistics
 
Lecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsLecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsPrithwis Mukerjee
 
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Prithwis Mukerjee
 
Computer Fundamentals Test
Computer Fundamentals TestComputer Fundamentals Test
Computer Fundamentals TestSamir Sabry
 
4 Steps to Make Customer Data Actionable
4 Steps to Make Customer Data Actionable 4 Steps to Make Customer Data Actionable
4 Steps to Make Customer Data Actionable Jean-Michel Franco
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design QuestionsSamir Sabry
 
Currency, Commodity and Bitcoins
Currency, Commodity and BitcoinsCurrency, Commodity and Bitcoins
Currency, Commodity and BitcoinsPrithwis Mukerjee
 
Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Prithwis Mukerjee
 
04 Dimensional Analysis - v6
04 Dimensional Analysis - v604 Dimensional Analysis - v6
04 Dimensional Analysis - v6Prithwis Mukerjee
 

Andere mochten auch (20)

05 OLAP v6 weekend
05 OLAP  v6 weekend05 OLAP  v6 weekend
05 OLAP v6 weekend
 
Thought control
Thought controlThought control
Thought control
 
Data mining arm-2009-v0
Data mining arm-2009-v0Data mining arm-2009-v0
Data mining arm-2009-v0
 
Test In Word
Test In WordTest In Word
Test In Word
 
Data Science
Data ScienceData Science
Data Science
 
Keyboard symbols
Keyboard symbolsKeyboard symbols
Keyboard symbols
 
Sample Test Word Intermediate Mulitple Choice
Sample Test Word Intermediate Mulitple ChoiceSample Test Word Intermediate Mulitple Choice
Sample Test Word Intermediate Mulitple Choice
 
BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2BIS 08a - Application Development - II Version 2
BIS 08a - Application Development - II Version 2
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Building an Enterprise Metadata Repository
Building an Enterprise Metadata RepositoryBuilding an Enterprise Metadata Repository
Building an Enterprise Metadata Repository
 
What is Metadata?
What is Metadata?What is Metadata?
What is Metadata?
 
Lecture02 - Data Mining & Analytics
Lecture02 - Data Mining & AnalyticsLecture02 - Data Mining & Analytics
Lecture02 - Data Mining & Analytics
 
Normalization
NormalizationNormalization
Normalization
 
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2Bitcoin, Blockchain and the Crypto Contracts - Part 2
Bitcoin, Blockchain and the Crypto Contracts - Part 2
 
Computer Fundamentals Test
Computer Fundamentals TestComputer Fundamentals Test
Computer Fundamentals Test
 
4 Steps to Make Customer Data Actionable
4 Steps to Make Customer Data Actionable 4 Steps to Make Customer Data Actionable
4 Steps to Make Customer Data Actionable
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design Questions
 
Currency, Commodity and Bitcoins
Currency, Commodity and BitcoinsCurrency, Commodity and Bitcoins
Currency, Commodity and Bitcoins
 
Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3Bitcoin, Blockchain and Crypto Contracts - Part 3
Bitcoin, Blockchain and Crypto Contracts - Part 3
 
04 Dimensional Analysis - v6
04 Dimensional Analysis - v604 Dimensional Analysis - v6
04 Dimensional Analysis - v6
 

Ähnlich wie Mapping example

Ähnlich wie Mapping example (20)

Web app development_database_design_er-mapping_12
Web app development_database_design_er-mapping_12Web app development_database_design_er-mapping_12
Web app development_database_design_er-mapping_12
 
Mapping
MappingMapping
Mapping
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledge
 
database1
database1database1
database1
 
FIXED INCOMEModule 3 Group Homework1. [6pts] Given a fiv
FIXED INCOMEModule 3 Group Homework1. [6pts] Given a fivFIXED INCOMEModule 3 Group Homework1. [6pts] Given a fiv
FIXED INCOMEModule 3 Group Homework1. [6pts] Given a fiv
 
free Video lecture in India
free Video lecture in Indiafree Video lecture in India
free Video lecture in India
 
ER to Relational Mapping
ER to Relational MappingER to Relational Mapping
ER to Relational Mapping
 
Ch 5 Presentation
Ch 5 PresentationCh 5 Presentation
Ch 5 Presentation
 
Ch 5 Presentation
Ch 5 PresentationCh 5 Presentation
Ch 5 Presentation
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
 
BIS03 Data Modelling - I
BIS03 Data Modelling - IBIS03 Data Modelling - I
BIS03 Data Modelling - I
 
02er
02er02er
02er
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
DBMS PPT
DBMS PPTDBMS PPT
DBMS PPT
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revised
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
Chapter3
Chapter3Chapter3
Chapter3
 
Chapter3
Chapter3Chapter3
Chapter3
 
Please be advised that there are four (4) programs just like this on.docx
Please be advised that there are four (4) programs just like this on.docxPlease be advised that there are four (4) programs just like this on.docx
Please be advised that there are four (4) programs just like this on.docx
 

Mehr von Samir Sabry

Mehr von Samir Sabry (8)

Mapping example
Mapping exampleMapping example
Mapping example
 
Xhtml
XhtmlXhtml
Xhtml
 
Normlaization
NormlaizationNormlaization
Normlaization
 
Data mining
Data miningData mining
Data mining
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
2010 Calendriersexy
2010 Calendriersexy2010 Calendriersexy
2010 Calendriersexy
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

Kürzlich hochgeladen

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Kürzlich hochgeladen (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Mapping example

  • 1. Eng.Samir Sabry IT Instructor Before of all we must learn and know Entit-Relaionship notation:- We start by this example: Company database The Company assigns an employee to one department but may work on several projects, which are not necessarily controlled by the same department. It keeps track of the number of hours per week that an employee works on each project. It records the direct supervisor of each employee. It stores the dependants of each employee for insurance purposes. It keeps each dependant’s: name, gender, birth date, and relationship to employee
  • 2.
  • 3. Mapping Rules Step 1: For each regular entity types Create a new relation that includes Simple attributes  For a composite attribute include only the simple component attributes  Leave out multivalued attributes (to step 6)  Pick a PK  For example, we create the relations EMPLOYEE, DEPARTMENT, and PROJECT for the regular entity types  Then, we choose SSN, DNUMBER and PNUMBER as primary keys for the relations EMPLOYEE, DEPARTMENT, and PROJECT, respectively.  Note: Foreign keys are not included yet.
  • 4. Step 2: weak entity types Note: Weak entity type has no key - Related to an identifying or owner entity type. Has total participation constraint with identifying entity.  Create a new relation with simple attributes  Include an FK to the owner entity's relation  For example, we create the relation DEPENDENT in this step.  Include the primary key SSN of the EMPLOYEE as a foreign key attribute of DEPENDENT.  The primary key of DEPENDENT is the combination {ESSN, DEPENDENT_NAME} because DEPENDENT_NAME is the partial key of DEPENDENT.
  • 5. Step 3: 1:1 relationship types Add to one of the participating relations an FK to the other relation:  It is better to add to a relation that has total participation in the relationship  Include any relationship attributes  Note: When both participations are total, we may merge the two entity types and the relationship into a single relation.  Let’s consider the relationship type MANAGES which is total.  Include the primary key of EMPLOYEE as foreign key in the DEPARTMENT and rename it as MGRSSN.  Include the simple attribute StartDate of the MANAGES in the DEPARTMENT and rename it MGRSTARTDATE.
  • 6. Step 4: 1: N relationship types  Add to the relation on the N-side an FK to the other relation.  Include any relation attributes  Let’s consider the 1:N relationships type WORKS_FOR, CONTROLS and SUPERVISION.  For SUPERVISION, include the primary key SSN of EMPLOYEE as foreign key in itself and call it SUPERSSN.  For WORKS_FOR, include the primary key DNUMBER of DEPARTMENT as foreign key in EMPLOYEE and call it DNO.  For CONTROLS, include the primary key DNUMBER of DEPARTMENT as foreign key in PROJECT and call it DNUM
  • 7. Step 5: M: N relationship types  Create a New relation containing as FK of the primary keys of both entity types participating relations  Include any relation attributes  Let consider the M:N relationship type WORKS_ON.  Include the primary keys of the PROJECT and EMPLOYEE relations as foreign keys in WORKS_ON and rename them PNO and ESSN, respectively.  Include an attribute HOURS in WORKS_ON.
  • 8. Step 6: multi-valued attribute Create new relation for each multi-valued attribute containing FK of the PK from the Entity  Let’s consider the attribute DLOCATION.  Create a relation DEPT_LOCATIONS.  The primary key of DEPT_LOCATIONS is the combination of {DNUMBER, DLOCATION}.
  • 9. Step 7: ternary relationship types  Create new relation containing a FK referencing each of the 3 entities involved  Include any relation attributes Final result: Notes: How many relations? 1. Entity (both regular and weak) 2. M:N relationship 3. Multi-valued attribute 4. Ternary relationship