100% found this document useful (1 vote)
799 views4 pages

Activity: Normalization Problem #2

1. The document describes normalization of employee work data from 1NF to 3NF. It includes the schemas and key information for each normal form. 2. In 1NF, employee ID is the primary key and there are partial dependencies between other attributes. In 2NF, data is split into Employee, Company, and Work tables to remove partial dependencies. 3. In 3NF, Company Name becomes its own table with a foreign key to Company Code to remove transitive dependency. Primary keys are underlined and relationships shown with arrows.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
799 views4 pages

Activity: Normalization Problem #2

1. The document describes normalization of employee work data from 1NF to 3NF. It includes the schemas and key information for each normal form. 2. In 1NF, employee ID is the primary key and there are partial dependencies between other attributes. In 2NF, data is split into Employee, Company, and Work tables to remove partial dependencies. 3. In 3NF, Company Name becomes its own table with a foreign key to Company Code to remove transitive dependency. Primary keys are underlined and relationships shown with arrows.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Manzo, Kyla Louise D.

BSIT 2-2

Activity: Normalization Problem #2

‘ Weekly Employee Assignment and Hours Rendered ’

Business Rules

1. An employee can work in several companies per week depending upon where
his agency assigns him.
2. A company may get workers from 1 or more agencies depending on contract
with the agency/ies and the workload which needs to be filled in the company.

Create the following. Make sure to provide name for each table

1. Schema for 1NF

1.1 Underline the PK in the 1NF

1st Normalization

EmpID Emp Agency Hourly Company Company Hours Year-


Name Rate Code Name Rendered Week
E1 Cruz A1 50 C1 Makati Inn 16 2019-W1
E1 Cruz A1 50 C2 Golden Inn 24 2019-W1
E1 Cruz A1 50 C3 Shang Inn 8 2019-W1
E2 David A1 45 C1 Makati Inn 8 2019-W1
E2 David A1 45 C3 Shang Inn 32 2019-W1
E3 Ramos A2 60 C1 Makati Inn 40 2019-W1

1.2 Show partial dependencies (if any) and full dependencies

Partial Dependency:
Manzo, Kyla Louise D. BSIT 2-2

 Emp Name, Agency, Hourly Rate are partially dependent on EmpID


 Company name, Hours Rendered and Year-Week are partially dependent on
Company Code

Full Dependency:

 Company name, Hours Rendered and Year-Week are fully dependent on


EmpID and Company Code

2. Schema for 2NF

Employee Table Company Table

EmpID Emp Agency Hourly Company Company Hours Year-Week


Name Rate Code Name Rendered
E1 Cruz A1 50 C1 Makati Inn 16 2019-W1
E1 Cruz A1 50 C2 Golden Inn 24 2019-W1
E1 Cruz A1 50 C3 Shang Inn 8 2019-W1
E2 David A1 45 C1 Makati Inn 8 2019-W1
E2 David A1 45 C3 Shang Inn 32 2019-W1
E3 Ramos A2 60 C1 Makati Inn 40 2019-W1

Work Table

EmpID Company Company Hours Year-


Code Name Rendered Week
E1 C1 Makati Inn 16 2019-W1
E1 C2 Golden Inn 24 2019-W1
E1 C3 Shang Inn 8 2019-W1
E2 C1 Makati Inn 8 2019-W1
E2 C3 Shang Inn 32 2019-W1
E3 C1 Makati Inn 40 2019-W1
Manzo, Kyla Louise D. BSIT 2-2

3. Schema for 3NF

3.1 Underline all relational keys in 3NF

Employee Table Company Table

EmpID Emp Agency Hourly Company Company Hours Year-Week


Name Rate Code Name Rendered
E1 Cruz A1 50 C1 Makati Inn 16 2019-W1
E1 Cruz A1 50 C2 Golden Inn 24 2019-W1
E1 Cruz A1 50 C3 Shang Inn 8 2019-W1
E2 David A1 45 C1 Makati Inn 8 2019-W1
E2 David A1 45 C3 Shang Inn 32 2019-W1
E3 Ramos A2 60 C1 Makati Inn 40 2019-W1

Work Table

EmpID Company Company Hours Year-


Code Name Rendered Week
E1 C1 Makati Inn 16 2019-W1
E1 C2 Golden Inn 24 2019-W1
E1 C3 Shang Inn 8 2019-W1
E2 C1 Makati Inn 8 2019-W1
E2 C3 Shang Inn 32 2019-W1
E3 C1 Makati Inn 40 2019-W1

Transitive Dependency:

 Company name is transitively dependent on Company code

Company Code Company Name

C1 Makati Inn
Foreign Key: Company code
C2 Golden Inn
C3 Shang Inn
C1 Makati Inn
C3 Shang Inn
C1 Makati Inn
Manzo, Kyla Louise D. BSIT 2-2

3.2 Show relationships between tables using lines with arrow

Dependency Diagram

Full Dependency

Emp Hourly Company Company Hours Year-


EmpID Agency
Name Rate Code Name Rendered Week

Transitive
Dependency

Partial Dependency

Partial Dependency

You might also like