ntifier for employees. nsider two cases: • Suppose that (firstName, last Nam mary key. • Suppose that a surrogate kev is ch

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Suppose we view it as impossible to have two employees with exactly
the same first names, last names, and birth dates. We have no natural
identifier for employees.
Consider two cases:
• Suppose that (firstName, lastName, birthdate) is the composite pri-
mary key.
• Suppose that a surrogate key is chosen for employees.
For each case, show what happens to the employee table if we implement
the 1:M "supervises" relationship between two employees using foreign
keys. Show an example (for each case) of an employee table containing a
boss and her two subordinates.
(2)
Continuing with the surrogate key approach in the previous table, show
how to introduce another entity (or table) to maintain history of the "su-
pervises" relationship. (Do something similar to Figure 5.10 or 5.11.)
Transcribed Image Text:Suppose we view it as impossible to have two employees with exactly the same first names, last names, and birth dates. We have no natural identifier for employees. Consider two cases: • Suppose that (firstName, lastName, birthdate) is the composite pri- mary key. • Suppose that a surrogate key is chosen for employees. For each case, show what happens to the employee table if we implement the 1:M "supervises" relationship between two employees using foreign keys. Show an example (for each case) of an employee table containing a boss and her two subordinates. (2) Continuing with the surrogate key approach in the previous table, show how to introduce another entity (or table) to maintain history of the "su- pervises" relationship. (Do something similar to Figure 5.10 or 5.11.)
FIGURE 5.10 MAINTAINING MANAGER HISTORY
Current Data
EMPLOYEE
DEPARTMENT
PK
EMP NUM
PK
DEPT ID
EMP LNAME
HE-
manages
EMP FNAME
EMP INITIAL
EMP E_MAIL
JOB_CODE
EMP SALARY
DEPT NAME
FK1 EMP NUM
DATE ASSIGN
EMP MGR_HIST
%3
EMP SAL HISTORY
Historic Data
MGR HIST
DEPT MGR_HIST
SALARY HIST
PK,FK1
PK,FK2 DEPT ID
PK
EMP NUM
PK,FK1 EMP NUM
PK
DATE ASSIGN
SALARY START DATE
SALARY_AMT
FIGURE 5.11 MAINTAINING JOB HISTORY
EMPLOYEE
Current Data
PK
EMP NUM
DEPARTMENT
EMP LNAME
EMP FNAME
EMP_INITIAL HE--
EMP E MAIL
FK1 DEPT ID
JOB CODE
DATE_ASSIGN
EMP SALARY
PK
DEPT ID
manages
DEPT NAME
employs
H-FK1 EMP_NUM
DATE ASSIGN
Historic Data
JOB HIST
DEPT JOB_HIST
EMP_JOB HIST
PK,FK1 EMP NUM
PK,FK2 DEPT ID
PK
DATE ASSIGN PO
JOB_CODE
EMP SALARY
Transcribed Image Text:FIGURE 5.10 MAINTAINING MANAGER HISTORY Current Data EMPLOYEE DEPARTMENT PK EMP NUM PK DEPT ID EMP LNAME HE- manages EMP FNAME EMP INITIAL EMP E_MAIL JOB_CODE EMP SALARY DEPT NAME FK1 EMP NUM DATE ASSIGN EMP MGR_HIST %3 EMP SAL HISTORY Historic Data MGR HIST DEPT MGR_HIST SALARY HIST PK,FK1 PK,FK2 DEPT ID PK EMP NUM PK,FK1 EMP NUM PK DATE ASSIGN SALARY START DATE SALARY_AMT FIGURE 5.11 MAINTAINING JOB HISTORY EMPLOYEE Current Data PK EMP NUM DEPARTMENT EMP LNAME EMP FNAME EMP_INITIAL HE-- EMP E MAIL FK1 DEPT ID JOB CODE DATE_ASSIGN EMP SALARY PK DEPT ID manages DEPT NAME employs H-FK1 EMP_NUM DATE ASSIGN Historic Data JOB HIST DEPT JOB_HIST EMP_JOB HIST PK,FK1 EMP NUM PK,FK2 DEPT ID PK DATE ASSIGN PO JOB_CODE EMP SALARY
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Complex Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education