Question

In: Computer Science

Scenario: A builder needs a database to keep track of contractors he hires for various projects....

Scenario: A builder needs a database to keep track of contractors he hires for various projects. So far, we have this 2NF relation, with sample data shown. Normalize to 3NF.

CONTRACTOR: # ConID, Lname, Fname, JobTitle, Company, Street, City, State, Zip, CompanyPhone, CellPhone

ConID

Lname

Fname

JobTitle

Company

Street

City

State

Zip

Phone

CellPhone

2

Garcia

Mary

Carpenter

Construct Co

123 Main

Portland

OR

97204

823-1234

645-5423

14

Jones

Tomas

Welder

Construct Co

123 Main

Portland

OR

97204

823-1234

344-3475

21

Smith

Joey

Welder

Construct Co

123 Main

Portland

OR

97204

823-1234

676-0495

8

Tanaka

Bill

Plumber

Water Inc

456 21st St

Portland

OR

97219

722-0045

805-7602

9

Alredd

Pete

PipeFitter

Water Inc

456 21st St

Portland

OR

97219

722-0045

341-1243

Explain your reasoning here (not what you did but why you did it). What does 3NF mean? How did you apply it?

Your 3NF relation or relations go here.

Solutions

Expert Solution

Solution :-

A Relational Schema, R, is in 3NF if it is in 2NF and no non-prime attribute of r is transitively dependent on the primary key. A Relational Schema , R , is 3NF if whenever a functional dependency X\rightarrow A holds in R, either:

X is the super key of R,or
A is a prime attribue of R.
A functional dependency X\rightarrow Y in a relational schema, R , is a transitive dependency if there is a set of attributes Z that is not a subset of any key of R and both X\rightarrowZ and Z\rightarrow Y holds.

In the above CONTRACTOR relation,

ConID is the primary key of the relation
ConID \rightarrow Lname,Fname,JobTitle , Company ,CellPhone
Company \rightarrow Street,City,State,Zip,Phone
Street,City,State,Zip,Phone are transitively dependent on ConID.

To remove the transitive dependency and convert the Schema into 3NF, we remove the attributes Company,Street,City,State,Zip,Phone from Contractor table and create a new table say CompanyDetails with attributes Company, Street,City,State,Zip,Phone where Company is the primary key of CompanyDetails and it is the foreign key in Contractor table.

After 3NF:

Contractor : ConID,Lname,Fname,JobTitle , Company ,CellPhone ; where ConID is the primary key of Contractor. Company is the foreign key of CompanyDetails

CompanyDetails : Company, Street,City,State,Zip,Phone ; where Company is the primary key of CompanyDetails

Thank you...!


Related Solutions

1. A cosmetic product retailer needs to create a database to keep track of the information...
1. A cosmetic product retailer needs to create a database to keep track of the information for its business operations. The company has a web site that posts all its products. The product information includes product ID, product name, description, and unit price. The company also needs to keep track of customers’ information, including customer names, their shipping addresses, and the email address. The company creates an account for each customer for identification and tracking purpose. A customer can purchase...
Scenario: An auto shop is designing a database to keep track of repairs. So far, we...
Scenario: An auto shop is designing a database to keep track of repairs. So far, we have this UNF relation, with some sample data shown. Normalize to 1NF. REPAIRS: # VIN, Make, Model, Year, ( Mileage, Date, Problem, Technician, Cost ) VIN Make Model Year Mileage Date Problem Technician Cost 15386355 Ford Taurus 2000 128242 6/6/2014 Won’t start Gary $300 15386355 Ford Taurus 2000 129680 6/20/2014 Tail light out Trisha 43532934 Honda Civic 2010 38002 6/18/2014 Brakes slow Gary $240...
Consider the following set of requirements for a UNIVERSITY database that is used to keep track...
Consider the following set of requirements for a UNIVERSITY database that is used to keep track of students' transcripts. (a) The university keeps track of each student's name, student number, social security number, current address and phone, permanent address and phone, birthdate, sex, class (freshman, sophomore, ..., graduate), major department, minor department (if any), and degree program (B.A., B.S., ..., Ph.D.). Some user applications need to refer to the city, state, and zip of the student's permanent address, and to...
Design a database through the EER diagram to keep track of the teams and games of...
Design a database through the EER diagram to keep track of the teams and games of a sport league. Assume that the following requirements are collected (the English description of cardinal ration and partial/complete participate is NOT required, but you still need to provide the total/partial and cardino ration in your EER diagram) : The database has a collection of TEAM. Each Team has a unique name, players, and owner. The database also keeps the records of PLAYERS. Each player...
Ava wants to use a database to keep track of the data recordsfor her insurance...
Ava wants to use a database to keep track of the data records for her insurance company and to enforce the following business policies/requirements: USE MS ACCESS TO CREATE A DATABASE & RELATIONASHIP-Every customer must be uniquely identified.-A customer can have many insurance policies.-Every insurance policy must be uniquely identified.-An insurance policy must belong to a valid customer.-Every customer must be served by a valid insurance agent (employee).-An insurance agent (employees) serves many customers.-Every insurance agent (employee) must be uniquely...
A retailer, Continental Palms Retail (CPR), plans to create a database system to keep track of...
A retailer, Continental Palms Retail (CPR), plans to create a database system to keep track of the information about its inventory. CPR has several warehouses across the country. Each warehouse is uniquely named. CPR also wants to record the location, city, state, zip, and space (in cubic meters) of each warehouse. There are several warehouses in any single city. CPR stores its products in the warehouses. A product may be stored in multiple warehouses. A warehouse may store multiple products....
Database Design and SQL The following relations keep track of airline flight information: Flights (flno: integer,...
Database Design and SQL The following relations keep track of airline flight information: Flights (flno: integer, from : string, to: string, distance: integer, departs: time, arrive: time, price: integer) Aircraft (aid: integer, aname : string, cruisingrange: integer) Certified (eid: integer, aid: integer) Employees (eid: integer, ename : string, salary: integer) The Employees relation describe pilots and other kinds of employees as well. Every pilot is certified for some aircraft and only pilots are certified to fly. Based on the schemas,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT