SlideShare a Scribd company logo
1 of 5
Download to read offline
11. The table structure shown in Table P5.11 contains many unsatisfactory
    components and characteristics. (For example, there are several
    multivalued attributes, naming conventions are violated, and some
    attributes are not atomic.)

   Table P5.11 Sample EMPLOYEE Records
    Attribute Name               Sample Value       Sample Value     Sample Value      Sample Value
    EMP_NUM                      1003               1018             1019              1023
    EMP_LNAME                    Willaker           Smith            McGuire           McGuire
    EMP_EDUCATION                BBA, MBA           BBA                                BS, MS, Ph.D.
    JOB_CLASS                    SLS                SLS              JNT               DBA
    EMP_DEPENDENTS               Gerald (spouse),                    JoAnne (spouse)   George (spouse)
                                 Mary (daughter),                                      Jill (daughter)
                                 John (son)
    DEPT_CODE                    MKTG               MKTG             SVC               INFS
    DEPT_NAME                    Marketing          Marketing        General Service   Info. Systems
    DEPT_MANAGER                 Jill H. Martin     Jill H. Martin   Hank B. Jones     Carlos G. Ortez
    EMP_TITLE                    Sales Agent        Sales Agent      Janitor           DB Admin
    EMP_DOB                      23-Dec-1968        28-Mar-1979      18-May-1982       20-Jul-1959
    EMP_HIRE_DATE                14-Oct-1997        15-Jan-2006      21-Apr-2003       15-Jul-1999
    EMP_TRAINING                 L1, L2                              L1                L1, L3, L8, L15
    EMP_BASE_SALARY              $38,255.00         $30,500.00       $19.750.00        $127,900.00
    EMP_COMMISSION_RATE          0.015              0.010




   Given that structure, write the relational schema and draw its dependency
   diagram. Label all transitive and/or partial dependencies.

   The dependency diagram is shown in Figure P5.11. Note that the order of the
   attributes has been changed to make the transitive dependencies easier to mark. (In
   any case, the order in which the attributes are written into a relational database table
   is immaterial.) The relational schema is written below Figure P5.11.
Figure P5.11 The Dependency Diagram for Problem 11


     EMP_CODE EMP_LNAME           EMP_EDUCATION DEPT_CODE DEPT_NAME DEPT_MANAGER



                                                                 Transitive Dependencies
                 Continued….




                                 EMP_DEPENDENTS EMP_DOB EMP_HIRE_DATE EMP_TRAINING



                 Continued….



                         JOB_TITLE JOB_CLASS EMP_BASE_SALARY EMP_COMMISSION_RATE



                                                 Transitive Dependencies



   The relational schema is written as:

   EMPLOYEE(EMP_CODE, EMP_LNAME, EMP_EDUCATION, JOB_CLASS,
            EMP_DEPENDENTS,DEPT_CODE,               DEPT_NAME,
            DEPT_MANAGER,
            EMP_TITLE, EMP_DOB, EMP_HIRE_DATE, EMP_TRAINING,
            EMP_BASE_SALARY, EMP_COMMISSION_RATE)

12. Break up the dependency diagram you drew in Problem 11 to produce
    dependency diagrams that are in 3NF. (Hint: You might have to create a few
    new attributes. Also make sure that the new dependency diagrams contain
    attributes that meet proper design criteria; that is, make sure there are no
    multivalued attributes, that the naming conventions are met, and so on.)

   Dependency diagrams have no way to indicate multi-valued attributes, nor do they
   provide the means through which such attributes can be handled. Therefore, the
   solution to this problem requires a basic knowledge of modeling concepts, once again
   indicating that normalization and design are part of the same process. Given the
   sample data shown in Problem 11, EDUCATION, DEPENDENT and
   QUALIFICATION are multi-valued attributes whose values are stored as strings. We
   have created the appropriate entities to avoid the use of multi-valued attributes. (See
   Figure P5.12.)
Figure P5.12 The Dependency Diagrams for Problem 12

 EMPLOYEE

           EMP_CODE EMP_LNAME DEPT_CODE               JOB_CLASS       EMP_DOB      EMP_HIRE_DATE


DEPARTMENT

           DEPT_CODE DEPT_NAME           EMP_CODE



QUALIFICATION                                            EDUCATION


           EMP_CODE EDUC_CODE QUAL_DATE                          EDUC_CODE EDUC_DESCRIPTION


DEPENDENT


           EMP_CODE DEP_NUM DEP_FNAME DEP_TYPE


JOB

          JOB_CLASS JOB_TITLE JOB_BASE_SALARY



As you discuss Figure P5.12, note that a real world design would have to include
additional entities or additional attributes in the existing entities. For example, while
the job description is likely to include a (job) base salary, employee experience –
perhaps measured by time in the job classification and performance – is likely to add
to the job’s base salary. Therefore, the EMPLOYEE table might include a salary or
hourly wage adjustment attribute. Overall employment longevity is likely to be
included, too … employers often find it useful to keep (expensive) job turnover rates
low. And, of course, you might include year-to-date (YTD) earnings and taxes in each
employee’s records, too. This problem is a great source of discussion material!

The relational schemas are written as:

EMPLOYEE(EMP_CODE,   EMP_LNAME,                       DEPT_CODE,          JOB_CLASS,
EMP_DOB,
         EMP_HIREDATE)

DEPENDENT(EMP_CODE, DEP_NUM, DEP_FNAME, DEP_TYPE)

DEPARTMENT(DEPT_CODE, DEPT_NAME, EMP_CODE)
JOB(JOB_CLASS, JOB_TITLE, JOB_BASE_SALARY)

   EDUCATION(EDUC_CODE, EDUC_DESCRIPTION)

   QUALIFICATION(EMP_CODE, EDUC_CODE, QUAL_DATE_EARNED)

13. Using the results of problem 12, draw the relational diagram.

   The relational diagram is shown in Figure P5.13.

   Figure P5.13 The Relational Diagram for Problem 13
     DEPARTMENT

      DEPT_CODE
          _CODE    1            EMPLOYEE
                                               1        QUALIFICATION
      DEPT_NAME            1
                               EMP_CODE                EMP_CODE                     EDUCATION
      EMP_CODE             1                   M                              1
                   1           EMP_LNAME               EDUC_CODE                  EDUC_CODE
                                                                          M
      DEPENDENT                DEPT_CODE               QUAL_DATE_EARNED           EDUC_DESCRIPTION
     EMP_CODE          M       JOB_CLASS       M
                                                       JOB
     DEPT_NUM                  EMP_HIRE_DATE           JOB_CLASS
                                                   1
     DEPT_FNAME        M DEPT_CODE                     JOB_TITLE
     DEPT_TYPE                                         JOB_BASE_SALARY
14. Using the results of Problem 13, draw the Crow’s Foot ERD.

   The Crow’s Foot solution is shown in Figure P5.14.

   Figure P5.14 The Crow’s Foot ERD for Problem 14

More Related Content

What's hot

Gym Management System User Manual
Gym Management System User ManualGym Management System User Manual
Gym Management System User ManualDavid O' Connor
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries InformationNishant Munjal
 
Components of ddbms
Components of ddbmsComponents of ddbms
Components of ddbmsPooja Dixit
 
srs for railway reservation system
 srs for railway reservation system srs for railway reservation system
srs for railway reservation systemkhushi kalaria
 
railway reservation software documentaion
railway reservation software documentaionrailway reservation software documentaion
railway reservation software documentaionJoveria Beg
 
Air Line Management System | DBMS project
Air Line Management System | DBMS projectAir Line Management System | DBMS project
Air Line Management System | DBMS projectAniketHandore
 
Hotel management system project
Hotel management system projectHotel management system project
Hotel management system projectMohammed Al Babeli
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagramNiaz Ali
 
Java database connectivity with MySql
Java database connectivity with MySqlJava database connectivity with MySql
Java database connectivity with MySqlDhyey Dattani
 
Airline Reservation System - Software Engineering
Airline Reservation System - Software EngineeringAirline Reservation System - Software Engineering
Airline Reservation System - Software EngineeringDrishti Bhalla
 
Indian railway reservation problems rsdo report file
Indian railway reservation problems rsdo report fileIndian railway reservation problems rsdo report file
Indian railway reservation problems rsdo report fileRajeev Singh
 
Convert ER diagram to Relational model and Normalization
Convert ER diagram to Relational model and NormalizationConvert ER diagram to Relational model and Normalization
Convert ER diagram to Relational model and NormalizationSaadi Rahman
 
Employee management system1
Employee management system1Employee management system1
Employee management system1supriya
 
Airline management system
Airline management systemAirline management system
Airline management systemSH Rajøn
 

What's hot (20)

Demantra12
Demantra12Demantra12
Demantra12
 
Sql Functions And Procedures
Sql Functions And ProceduresSql Functions And Procedures
Sql Functions And Procedures
 
Gym Management System User Manual
Gym Management System User ManualGym Management System User Manual
Gym Management System User Manual
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries Information
 
Components of ddbms
Components of ddbmsComponents of ddbms
Components of ddbms
 
srs for railway reservation system
 srs for railway reservation system srs for railway reservation system
srs for railway reservation system
 
railway reservation software documentaion
railway reservation software documentaionrailway reservation software documentaion
railway reservation software documentaion
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Air Line Management System | DBMS project
Air Line Management System | DBMS projectAir Line Management System | DBMS project
Air Line Management System | DBMS project
 
Hotel management system project
Hotel management system projectHotel management system project
Hotel management system project
 
ORACLE PL/SQL
ORACLE PL/SQLORACLE PL/SQL
ORACLE PL/SQL
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagram
 
Java database connectivity with MySql
Java database connectivity with MySqlJava database connectivity with MySql
Java database connectivity with MySql
 
Airline Reservation System - Software Engineering
Airline Reservation System - Software EngineeringAirline Reservation System - Software Engineering
Airline Reservation System - Software Engineering
 
Indian railway reservation problems rsdo report file
Indian railway reservation problems rsdo report fileIndian railway reservation problems rsdo report file
Indian railway reservation problems rsdo report file
 
Convert ER diagram to Relational model and Normalization
Convert ER diagram to Relational model and NormalizationConvert ER diagram to Relational model and Normalization
Convert ER diagram to Relational model and Normalization
 
Employee management system1
Employee management system1Employee management system1
Employee management system1
 
Airline management system
Airline management systemAirline management system
Airline management system
 
baabtra, First Programming School in India SRS, stock management system
baabtra, First Programming School in India SRS, stock management systembaabtra, First Programming School in India SRS, stock management system
baabtra, First Programming School in India SRS, stock management system
 

Similar to Employee table

1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docx1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docxjackiewalcutt
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesJafar Nesargi
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Mudasir Qazi
 
A Z Introduction To Ruby On Rails
A Z Introduction To Ruby On RailsA Z Introduction To Ruby On Rails
A Z Introduction To Ruby On Railsrailsconf
 
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...EDB
 
Module 4_PART1.pptx
Module 4_PART1.pptxModule 4_PART1.pptx
Module 4_PART1.pptxHaso12
 
Programming Primer EncapsulationVB
Programming Primer EncapsulationVBProgramming Primer EncapsulationVB
Programming Primer EncapsulationVBsunmitraeducation
 
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.docxlorindajamieson
 
Database Assignment
Database AssignmentDatabase Assignment
Database AssignmentJayed Imran
 
Programming Primer Encapsulation CS
Programming Primer Encapsulation CSProgramming Primer Encapsulation CS
Programming Primer Encapsulation CSsunmitraeducation
 
Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)
Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)
Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)Krzysztof Menżyk
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchartfika sweety
 
Database Modeling presentation
Database Modeling  presentationDatabase Modeling  presentation
Database Modeling presentationBhavishya Tyagi
 
Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10Thuan Nguyen
 

Similar to Employee table (20)

1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docx1. What two conditions must be met before an entity can be classif.docx
1. What two conditions must be met before an entity can be classif.docx
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
A Z Introduction To Ruby On Rails
A Z Introduction To Ruby On RailsA Z Introduction To Ruby On Rails
A Z Introduction To Ruby On Rails
 
A-Z Intro To Rails
A-Z Intro To RailsA-Z Intro To Rails
A-Z Intro To Rails
 
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
Introducing Data Redaction - an enabler to data security in EDB Postgres Adva...
 
Relational dbms
Relational dbmsRelational dbms
Relational dbms
 
Total oop in c# dot net
Total oop in c# dot netTotal oop in c# dot net
Total oop in c# dot net
 
FD.pdf
FD.pdfFD.pdf
FD.pdf
 
Module 4_PART1.pptx
Module 4_PART1.pptxModule 4_PART1.pptx
Module 4_PART1.pptx
 
Programming Primer EncapsulationVB
Programming Primer EncapsulationVBProgramming Primer EncapsulationVB
Programming Primer EncapsulationVB
 
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
 
Database Assignment
Database AssignmentDatabase Assignment
Database Assignment
 
Programming Primer Encapsulation CS
Programming Primer Encapsulation CSProgramming Primer Encapsulation CS
Programming Primer Encapsulation CS
 
Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)
Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)
Be pragmatic, be SOLID (at Boiling Frogs, Wrocław)
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
Oracle fundamentals and sql
Oracle fundamentals and sqlOracle fundamentals and sql
Oracle fundamentals and sql
 
Database Modeling presentation
Database Modeling  presentationDatabase Modeling  presentation
Database Modeling presentation
 
Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10Oracle - Program with PL/SQL - Lession 10
Oracle - Program with PL/SQL - Lession 10
 
Chapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptxChapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptx
 

Employee table

  • 1. 11. The table structure shown in Table P5.11 contains many unsatisfactory components and characteristics. (For example, there are several multivalued attributes, naming conventions are violated, and some attributes are not atomic.) Table P5.11 Sample EMPLOYEE Records Attribute Name Sample Value Sample Value Sample Value Sample Value EMP_NUM 1003 1018 1019 1023 EMP_LNAME Willaker Smith McGuire McGuire EMP_EDUCATION BBA, MBA BBA BS, MS, Ph.D. JOB_CLASS SLS SLS JNT DBA EMP_DEPENDENTS Gerald (spouse), JoAnne (spouse) George (spouse) Mary (daughter), Jill (daughter) John (son) DEPT_CODE MKTG MKTG SVC INFS DEPT_NAME Marketing Marketing General Service Info. Systems DEPT_MANAGER Jill H. Martin Jill H. Martin Hank B. Jones Carlos G. Ortez EMP_TITLE Sales Agent Sales Agent Janitor DB Admin EMP_DOB 23-Dec-1968 28-Mar-1979 18-May-1982 20-Jul-1959 EMP_HIRE_DATE 14-Oct-1997 15-Jan-2006 21-Apr-2003 15-Jul-1999 EMP_TRAINING L1, L2 L1 L1, L3, L8, L15 EMP_BASE_SALARY $38,255.00 $30,500.00 $19.750.00 $127,900.00 EMP_COMMISSION_RATE 0.015 0.010 Given that structure, write the relational schema and draw its dependency diagram. Label all transitive and/or partial dependencies. The dependency diagram is shown in Figure P5.11. Note that the order of the attributes has been changed to make the transitive dependencies easier to mark. (In any case, the order in which the attributes are written into a relational database table is immaterial.) The relational schema is written below Figure P5.11.
  • 2. Figure P5.11 The Dependency Diagram for Problem 11 EMP_CODE EMP_LNAME EMP_EDUCATION DEPT_CODE DEPT_NAME DEPT_MANAGER Transitive Dependencies Continued…. EMP_DEPENDENTS EMP_DOB EMP_HIRE_DATE EMP_TRAINING Continued…. JOB_TITLE JOB_CLASS EMP_BASE_SALARY EMP_COMMISSION_RATE Transitive Dependencies The relational schema is written as: EMPLOYEE(EMP_CODE, EMP_LNAME, EMP_EDUCATION, JOB_CLASS, EMP_DEPENDENTS,DEPT_CODE, DEPT_NAME, DEPT_MANAGER, EMP_TITLE, EMP_DOB, EMP_HIRE_DATE, EMP_TRAINING, EMP_BASE_SALARY, EMP_COMMISSION_RATE) 12. Break up the dependency diagram you drew in Problem 11 to produce dependency diagrams that are in 3NF. (Hint: You might have to create a few new attributes. Also make sure that the new dependency diagrams contain attributes that meet proper design criteria; that is, make sure there are no multivalued attributes, that the naming conventions are met, and so on.) Dependency diagrams have no way to indicate multi-valued attributes, nor do they provide the means through which such attributes can be handled. Therefore, the solution to this problem requires a basic knowledge of modeling concepts, once again indicating that normalization and design are part of the same process. Given the sample data shown in Problem 11, EDUCATION, DEPENDENT and QUALIFICATION are multi-valued attributes whose values are stored as strings. We have created the appropriate entities to avoid the use of multi-valued attributes. (See Figure P5.12.)
  • 3. Figure P5.12 The Dependency Diagrams for Problem 12 EMPLOYEE EMP_CODE EMP_LNAME DEPT_CODE JOB_CLASS EMP_DOB EMP_HIRE_DATE DEPARTMENT DEPT_CODE DEPT_NAME EMP_CODE QUALIFICATION EDUCATION EMP_CODE EDUC_CODE QUAL_DATE EDUC_CODE EDUC_DESCRIPTION DEPENDENT EMP_CODE DEP_NUM DEP_FNAME DEP_TYPE JOB JOB_CLASS JOB_TITLE JOB_BASE_SALARY As you discuss Figure P5.12, note that a real world design would have to include additional entities or additional attributes in the existing entities. For example, while the job description is likely to include a (job) base salary, employee experience – perhaps measured by time in the job classification and performance – is likely to add to the job’s base salary. Therefore, the EMPLOYEE table might include a salary or hourly wage adjustment attribute. Overall employment longevity is likely to be included, too … employers often find it useful to keep (expensive) job turnover rates low. And, of course, you might include year-to-date (YTD) earnings and taxes in each employee’s records, too. This problem is a great source of discussion material! The relational schemas are written as: EMPLOYEE(EMP_CODE, EMP_LNAME, DEPT_CODE, JOB_CLASS, EMP_DOB, EMP_HIREDATE) DEPENDENT(EMP_CODE, DEP_NUM, DEP_FNAME, DEP_TYPE) DEPARTMENT(DEPT_CODE, DEPT_NAME, EMP_CODE)
  • 4. JOB(JOB_CLASS, JOB_TITLE, JOB_BASE_SALARY) EDUCATION(EDUC_CODE, EDUC_DESCRIPTION) QUALIFICATION(EMP_CODE, EDUC_CODE, QUAL_DATE_EARNED) 13. Using the results of problem 12, draw the relational diagram. The relational diagram is shown in Figure P5.13. Figure P5.13 The Relational Diagram for Problem 13 DEPARTMENT DEPT_CODE _CODE 1 EMPLOYEE 1 QUALIFICATION DEPT_NAME 1 EMP_CODE EMP_CODE EDUCATION EMP_CODE 1 M 1 1 EMP_LNAME EDUC_CODE EDUC_CODE M DEPENDENT DEPT_CODE QUAL_DATE_EARNED EDUC_DESCRIPTION EMP_CODE M JOB_CLASS M JOB DEPT_NUM EMP_HIRE_DATE JOB_CLASS 1 DEPT_FNAME M DEPT_CODE JOB_TITLE DEPT_TYPE JOB_BASE_SALARY
  • 5. 14. Using the results of Problem 13, draw the Crow’s Foot ERD. The Crow’s Foot solution is shown in Figure P5.14. Figure P5.14 The Crow’s Foot ERD for Problem 14