Você está na página 1de 10

You are creating a database for a company that works on outsourcing projects for other companies.

A project is given to the company by a contractor. The project is then assigned to several employees. An employee can be assigned to more than one project at a specific time. Employee training is performed only through courses. An employee could have taken as many courses as required. You have collected information on two entities P !"E#T and E$P%!YEE. &se the lists bellow to create a normali'ed database (with defined relationships and datatypes). PROJECT Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ontractor #ontractor #ontact #ontract +ate #ontract Amount

EMPLOYEE Employee *ame Employee Picture Employee Education Employee Training ,ired +ate "ob Title +epartment *ame +epartment $anager -orking ,ours Per -eek Pay Per ,our

Note: Project ,ours is the amount of hours required to complete the project. Assigned ,ours it the number of hours assigned to each employee.

1NF: Atomic data


PROJECT Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ontractor #ompany *ame #ontractor #ontact #ontact Person Phone Email #ontract +ate #ontract Amount

EMPLOYEE Employee *ame %ast *ame .irst *ame Employee Picture Employee Education /nstitution Education Type Employee Training #ourse *ame #ourse +etails Enrollment +ate ,ired +ate "ob Title +epartment *ame +epartment $anager -orking ,ours Per -eek Pay Per ,our

1NF: Repeating Groups


PROJECT Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ompany *ame #ontact Person Phone Email #ontract +ate #ontract Amount EMPLOYEE %ast *ame .irst *ame Employee Picture /nstitution Education Type #ourse *ame #ourse +etails Enrollment +ate ,ired +ate "ob Title +epartment *ame +epartment $anager -orking ,ours Per -eek Pay Per ,our EDUCATION /nstitution Education Type COURSES #ourse *ame #ourse +etails Enrollment +ate

1NF: Primary keys


PROJECT Project/+0 Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ompany *ame #ontact Person Phone Email #ontract +ate #ontract Amount EMPLOYEE Employee/+0 %ast *ame .irst *ame Employee Picture ,ired +ate "ob Title +epartment *ame +epartment $anager -orking ,ours Per -eek Pay Per ,our EDUCATION Education/+0 /nstitution Education Type COURSES #ourse/+0 #ourse *ame #ourse +etails Enrollment +ate

2NF: Functional dependency


Enrollment +ate PROJECT Project/+0 Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ompany *ame #ontact Person Phone Email #ontract +ate #ontract Amount EDUCATION Education/+0 /nstitution Education Type COURSES #ourse /+0 #ourse *ame #ourse +etails CONTRACTOR #ompany *ame #ontact Person Phone Email EMPLOYEE Employee/+0 %ast *ame .irst *ame Employee Picture ,ired +ate "ob Title +epartment *ame +epartment $anager -orking ,ours Per -eek Pay Per ,our

JOB TITLE "ob Title DEPARTMENT +epartment *ame +epartment $anager

2NF: Primary keys


PROJECT Project/+0 Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ontract +ate #ontract Amount EDUCATION Education/+0 /nstitution Education Type COURSES #ourse /+0 #ourse *ame #ourse +etails Enrollment +ate CONTRACTOR #ontractor/+0 #ompany *ame #ontact Person Phone Email EMPLOYEE Employee/+0 %ast *ame .irst *ame Employee Picture ,ired +ate -orking ,ours Per -eek Pay Per ,our JOB TITLE "ob/+0 "ob Title DEPARTMENT +epartment/+0 +epartment *ame +epartment $anager

3NF: Transitive dependency


PROJECT Project/+0 Project *ame Project +escription Assigned +ate +ue +ate Project ,ours Assigned ,ours #ontract +ate #ontract Amount ASSIGNMENTS Assigned +ate +ue +ate Assigned ,ours COURSES #ourse /+0 #ourse *ame #ourse +etails Enrollment +ate ENROLLMENT Enrollment +ate EMPLOYEE Employee/+0 %ast *ame .irst *ame Employee Picture ,ired +ate -orking ,ours Per -eek Pay Per ,our WORK DETAILS -orking ,ours Per -eek Pay Per ,our JOB TITLE "ob/+0 "ob Title DEPARTMENT +epartment/+0 +epartment *ame +epartment $anager CONTRACTOR #ontractor/+0 #ompany *ame #ontact Person Phone Email EDUCATION Education/+0 /nstitution Education Type

3NF: Primary keys


PROJECT Project/+0 Project *ame Project +escription Project ,ours #ontract +ate #ontract Amount ASSIGNMENTS Assignment/+0 Assigned +ate +ue +ate Assigned ,ours COURSES #ourse /+0 #ourse *ame #ourse +etails ENROLLMENT Enrollment/+0 Enrollment +ate EMPLOYEE Employee/+0 %ast *ame .irst *ame Employee Picture ,ired +ate WORK DETAILS -ork+etails/+0 -orking ,ours Per -eek Pay Per ,our JOB TITLE "ob/+0 "ob Title DEPARTMENT +epartment/+0 +epartment *ame +epartment $anager CONTRACTOR #ontractor/+0 #ompany *ame #ontact Person Phone Email EDUCATION Education/+0 /nstitution Education Type

Você também pode gostar