Determine the functional dependencies that exist in the following table and then convert the following table to an equivalent collection of tables that are in third normal form. Please show each step from first to third normal form.
ITEM (TIEM_NUM, DESCRIPTION, ON_HAND, CATEGORY, STOREHOURSE, PRICE, (ORDER_NUM, ORDER_DATE, CUSTOMER_NUM, CUSTOMER_NAME, NUM_ORDERED, QUOTED_PRICE))
Dear Student ,
As per requirement submitted above kindly find below solution.
Consider relation given
ITEM (TIEM_NUM, DESCRIPTION, ON_HAND, CATEGORY, STOREHOURSE, PRICE, (ORDER_NUM, ORDER_DATE, CUSTOMER_NUM, CUSTOMER_NAME, NUM_ORDERED, QUOTED_PRICE))
First Normal Form (1NF) :
Second Normal Form (2NF ):
Above relation needs to normalize into 2NF remove partial dependency.Here need to identify new tables like
Below are tables in 2NF.
1.Table Name :Customer
Schema :Customer (Customer_Num,Customer_Name)
FD :Customer_Num ==> Customer_Name
2.Table Name :Category
NOTE :This table is created to store category details which is additional table with two column category number and name.
Schema :Category(Category_Num,Category_Name)
FD :Category_Num ==> Category_Name
3.Table Name :Item
Schema :Item(ITEM_NUM, DESCRIPTION, ON_HAND,STOREHOURSE, PRICE)
FD :ITEM_NUM==>DESCRIPTION, ON_HAND,STOREHOURSE, PRICE
4.Table Name :Orders
Schema :Orders (ORDER_NUM, ORDER_DATE, NUM_ORDERED, QUOTED_PRICE)
Third Normal Form (3NF) :
Above table needs to normalize into 3NF to remove transitive dependency.Below are tables in 3NF.
1.Table Name :Customer
Schema :Customer (Customer_Num,Customer_Name)
FD :Customer_Num ==> Customer_Name
2.Table Name :Category
NOTE :This table is created to store category details which is additional table with two column category number and name.
Schema :Category(Category_Num,Category_Name)
FD :Category_Num ==> Category_Name
3.Table Name :Item
Schema :Item(ITEM_NUM, DESCRIPTION, ON_HAND,STOREHOURSE, PRICE,Category_Num )
FD :ITEM_NUM,Category_Num ==>DESCRIPTION, ON_HAND,STOREHOURSE, PRICE
4.Table Name :Orders
Schema :Orders (ORDER_NUM, ORDER_DATE, Customer_Num)
FD:ORDER_NUM,Customer_Num==>ORDER_DATE
5.Table Name :OrderDetails
Schema :OrderDetails (Order_Num,Item_Num,NUM_ORDERED, QUOTED_PRICE)
FD :Order_Num,Item_Num==>NUM_ORDERED, QUOTED_PRICE
NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.
Determine the functional dependencies that exist in the following table and then convert the following table...
Determine the functional dependencies that exist in the following table, and then convert this table to an equivalent collection of tables that are in third normal form: Session (SessionNum, SessionDate, PatientNum, LengthOfSession, TherapistID, TherapyCode, Description, UnitOfTime)
Please answer each question using these tables above, it is SQL Display the descriptions and prices of the 5 most expensive parts, in descending order by price. For each part, display the On Hand Value, which is calculated by multiplying the quantity on hand by price. Display a summary with part number, description, on hand and warehouse for all parts in class HW or AP, and in warehouse 1 or 2. Display the names of customers who do NOT live...
Create a view that will list the order number, order date, part number, part description, and item class for each part that makes up the order from the TAL database. TAL Database: Table_Name Column Name Column Type Column Length Nullable Key Orders Order_Num Character 5 No Primary orders order_date Date Yes Orders Customer_num Character 3 Yes Foreign Order_Line Order_Num Character 5 No Primary Order_Line Part_Num Character 4 No Primary Order_Line Num_Ordered Number 3,0 Yes Order_Line Quoted_Price Number 6,2 Yes Part...
Consider a table Inventory with the following functional dependencies: cus_code, prod_id cus_name,cus_address,prod_name,unit_cost, quantity cus_code cus_name, cus_address prod_id prod_name,unit_cost. a) In what normal form is relation R? Explain why? b) Is it possible to decompose R into a number of relations in order to achieve a higher normal form? Show the tables that result from the decomposition.
First, Last, GPA, Honor, Credits) You are given the following functional dependencies First, Last → GPA, Honor, Credits GPA → Honor Is this schema in Second Normal Form? If not, please state which FDs violate 2NF and decompose the schema accordingly. Is this schema in Third Normal Form? If not, please state which FDs violate 3NF and decompose the schema accordingly.
Language: SQL - Normalization and Functional Dependencies Part 4 Normalization and Functional Dependencies Consider the following relation R(A, B, C, D)and functional dependencies F that hold over this relation. F=D → C, A B,A-C Question 4.1 (3 Points) Determine all candidate keys of R Question 4.2 (4 Points) Compute the attribute cover of X-(C, B) according to F Question 43 (5 Points) Compute the canonical cover of F.Show each step of the generation according to the algorithm shown in class....
8.Write the commands to obtain the following information from the systems catalog. List every table that you own, list every column in the PART table and its associated data type, then add ORDER_NUM as a foreign key in the ORDER_LINE table. this is the SQL for the database: CREATE DATABASE PREMIERE; USE PREMIERE; CREATE TABLE REP (REP_NUM CHAR(2) PRIMARY KEY, LAST_NAME CHAR(15), FIRST_NAME CHAR(15), STREET CHAR(15), CITY CHAR(15), STATE CHAR(2), ZIP CHAR(5), COMMISSION DECIMAL(7,2), RATE DECIMAL(3,2) ); CREATE TABLE CUSTOMER...
Program: MYSQL (please show screenshots of the solution) Ill give good rating! Define a view named TopLevelCust that consists of the number, name, address, balance and credit limit of all customers with credit limits that are greater than or equal to $5,000. Address is defined as street, city, state and zip. Concatenate these into one field named Address. A. Type in your view construct here: B. Write a query to retrieve the number and name of all customers in the TopLevelCust...
Answer the following questions using mysql. Please show screenshots to make sure the queries work. 1. Use a sub-query and the IN operator to find the number and name of each customer that placed an order on October 23, 2007. 2. Repeat step 2, but this time use the EXISTS operator in your answer. 3. Using a sub-query, find the number and name of each customer that did not place an order on October 23, 2007. 4. Using a sub-query,...
1. Using a function, display the customer who has the highest credit limit. Display the customer number, customer name, and credit limit. Insert your snip of the query and resultset together here: 2. How many customers have the same credit limit? Display the count of customers by credit limit. Display the count as ‘Number of Customers’ and credit limit as ‘Credit Limit’. Insert your snip of the query and resultset together here: 3. What is the average quoted price, maximum...