Question

In: Computer Science

tableA is a table in a relational database with a composite prime key consisting of fields...

tableA is a table in a relational database with a composite prime key consisting of fields F1 and F2. You have determined that tableA is 1NF. There are four other fields in tableA. Two of them, F10 and F12, are functionally determined by F1. The other two, F50 and F55, are functionally determined by F2. Because all fields are functionally determined by at least a portion of the key, is tableA 2NF?   If you believe the table is not yet 2NF, what would be required to make it 2NF? Explain your answer

Solutions

Expert Solution

TableA(F1,F2,F10,F12,F50,F55) has the primary key (F1,F2) and the functional dependencies are given as :-

F.D. = { F1→F10, F1 → F12, F2→F50, F2→F51}

For the given fuctional dependencies we have to check for the 2 conditions for the table to be in the 2NF :-

1.) Table should be in the 1NF that is it should be in the first normal form.(given that table is is 1NF due to Composite Primary Key F1,F2)

2.) The functional dependencies should not contain any partial dependency.

But the table contains Partial Dependency that is { F1→F10, F1 → F12, F2→F50, F2→F51} these are the partial dependency which states that proper subset of candidate key determines non-prime attribute and F1 and F2 are proper subsets of the candidate key and F10, F12, F50, F55 are non prime attributes.

Now, to convert the table into 2NF we have to decompose the table into two tables such that the tables should be :-

1.) Dependency Preserving.

2.) Lossless Join Decomposition.

as 2NF has these two properties stated above

The Table A is decomposed as:-

Table A1 (F1, F10, F12) has the Functional Dependency as {F1→F10, F1 → F12}

Table A2 (F2, F50, F55) has the Functional Dependency as {F2→F50, F2→F51}

Table A3 (F1,F2)

All the above tables do not have partial dependencies so they are in 2NF. All the tables have a common attribute so the Decomposition is lossless and we have all the functional dependencies so it is dependency preserving as well.

So, we have converted the Table A (F1,F2,F10,F12,F50,F55) into 2NF by Decomposing it into Table A1 (F1, F10, F12), Table A2 (F2, F50, F55), Table A3 (F1,F2)


Related Solutions

tableA is a table in a relational database with a composite prime key. You have determined...
tableA is a table in a relational database with a composite prime key. You have determined that the table is 2NF. Owing to the fact that it is 2NF and the key is composite, is it automatically 3NF? Explain your answer. (4 points) Lack of normalization of database tables may cause update, delete, and/or insert anomalies. You have a 2NF table, tableA, in a relational database. Give an example of an anomaly to which tableA might still be subject. Give...
• Relational Schema Create a relational database schema consisting of the four relation schemas representing various...
• Relational Schema Create a relational database schema consisting of the four relation schemas representing various entities recorded by a furniture company.   Write CREATE TABLE statements for the following four relation schemas. Define all necessary attributes, domains, and primary and foreign keys. Customer(CustomerID, Name, Address) FullOrder(OrderID, OrderDate, CustomerID) Request(OrderID, ProductID, Quantity) Product(ProductID, Description, Finish, Price) You should assume the following: Each CustomerID is a number with at most three digits, each OrderID is a number with at most five digits,...
What is the relationship between a table of Movies and a table of ActorsActresses and how might it be implemented in a relational database?
What is the relationship between a table of Movies and a table of ActorsActresses and how might it be implemented in a relational database?
You have a table for a membership database that contains the following fields: MemberLastName,
You have a table for a membership database that contains the following fields: MemberLastName, MemberFirstName, Street, City, State, ZipCode, and InitiationFee. There are 75,000 records in the table. What indexes would you create for the table, and why would you create these indexes?
Describe what a database system is and how it is used. What is a relational database...
Describe what a database system is and how it is used. What is a relational database system and how used in a company to benefit an organization? What does it mean to run a query?
What are some of the advantages of a relational database system?
What are some of the advantages of a relational database system?
Write a SQL script to add another table to your database. Include these fields in your...
Write a SQL script to add another table to your database. Include these fields in your Product table: Field Name Description Data Type Sample Value ProductID Product ID integer 5 ProductName Product Name varchar(50) candle Description Product Description varchar(255) Bee’s wax candle picUrl Filename of the product’s picture varchar(50) candle.gif Price Product Price decimal 10.99           ProductID should be the Primary Key. It is an auto-increment field.           The Price field stores prices to 7 significant digits and to 2...
Define the four main types of relational constraints and use the example relational database (Figure 1)...
Define the four main types of relational constraints and use the example relational database (Figure 1) to illustrate each of these constraints. Figure 1 House(MLS, Addr, NumRooms, NumBedRooms, SellID, OfficeID, Price) Seller(SellID, Name) PotentialBuyer(BuyID, Name) REOffice(OffID, Name, Addr, Phone) Agent(AgID, OffID, Name) Showing(AgID, MLS, BuyID, Date)
The following tables form part of a database (Flights Database) held in a relational DBMS: employee...
The following tables form part of a database (Flights Database) held in a relational DBMS: employee (empNo, empName, empSalary, empPosition) aircraft (aircraftNo, acName, acModel, acFlyingRange) flight (flightNo, aircraftNo, fromAirport, toAirport, flightDistance, departTime, arriveTime) certified (empNo, aircraftNo) Where:  employee contains details of all employees (pilots and non-pilots) and empNo is the primary key;  aircraft contains details of aircraft and C is the primary key.  flight contains details of flights and (flightNo, aircraftNo) form the primary key.  certified...
Data Modeling and Database Design (Database Concepts, Eighth Edition) The relational model is the most important...
Data Modeling and Database Design (Database Concepts, Eighth Edition) The relational model is the most important standard in database processing today. Why do you feel that this model has continued to be successful in the world of IT? What would happen if large corporations decided to reject this theory, and store their data using a non-relational model? Are there any success stories where this has happened?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT