Question

In: Computer Science

Consider the following un-normalized relational table on an online retail store orders and payments information: An...

Consider the following un-normalized relational table on an online retail store orders and payments information:

An online retail store would like to create a database to keep track of its sales activities. Information recorded in the database supposed to include customer number that identifies each customer, customer’s first name, last name, unique order number of orders a customer made, the date when an order was made, unique product number of products included in orders, product description, sequence number listing the sequence when a product is included in each order as well as the quantity for each product made in each order. The retail store would also like to store the payment information such as a credit card number of credit card that was being charge to, payment date and the amount paid. The online retail store allows customer to pay using any one of the credit cards the customers own, as long as the credit card is valid.

A database designer created the following relational schema:

CUSTORDER(custNum, custFName, custLName, orderNum, orderDate, prodNum, prodDesc, itemNum, quantity, cCardNum, paymentDate, amountPaid)

Decompose the relational schema into the smallest number of relational schemas each one in forth normal form (4NF) and to explain or justify that each schema is in 4NF. To justify that the relational schemas obtained from the decomposition are in 4NF you must find all functional and multivalued dependencies valid in each relational schema, you must find the minimal keys, and then apply the definitions to support your justification. Note, that a relational schema is in 4NF when it is in BCNF and it does not have any nontrivial multivalued dependencies. It means, that first, you have to prove that a schema is in BCNF and later show that it has no nontrivial multivalued dependencies. Please keep in mind that the smallest number of 4NF relational schemas is expected

Solutions

Expert Solution

After studying the whole table, it could be found out that the main foreign key for the database created in 1NF, 2NF, 3NF and 4NF is the cusNum and its relative foreign key is productNum.

For the table product information, the primary foreign key is prodNum, and its relative foreign key is the itemNum.

All the tables are close to each other, which provides excellent help to the company to keep in track of the customer details, order details and product details.

In 1NF :

  • All the data items need to be filled separately to maintain the atomicity.
  • For this reason, the data in CUSTORDER where two products, orderID or itemnum are present in the table.
  • Finally, all the tables have a single attribute and value stored in the column.

In 2NF:

  • The first rule of the 2NF where the CUSTORDER table from 1NF is dependent for each candidate key they are,itemnum,Cusnum, prodNum and orderNum
  • The 2NF does not provide a restriction on the non-prime to non-prime attribute dependency which needs to be addressed in the 3NF
  • The main table separates into three forms they are customer information and product information

In 3NF :

  • The database schema had been created for promoting the relational database, which would utilise all the relative normalising principles to lower the duplication of the data, avoiding anomalies in data and simplification of data management.
  • For this reason, the table had been separated into three unique forms: product information, customer information and order details.
  • The separation of the table will help the online store to avoid duplication in the data, and they are able to track the product and customers orders easily.

In BCNF :

  • It is a more improved version of the 3NF which provides a unique character to the database schema.
  • The item details had been included in the BCNF to track the name of the products with the product information table.
  • The prodDesc could be easily found through the foreign keys prodNum and itemNum.

In 4NF :

  • The 4NF offers the level of database normalisation where all the non-trivial multivalued dependencies other than the presence of candidate key.
  • The above table is 4NF because of all the table relatable with the help of keys like Itemnum,Productnum ,CustNum and OrderNum.
  • All of these primary and foreign keys would help the online store to find out missing information, insert information or delete the information as per the requirement.
  • Another table had been separated which is tracking order date, quantity and payment information where the online store could easily track the order details with the help of foreign key orderNum.
  • The product details could be found using the prodNum and itemname.

1NF :

CUSTORDER:

2NF :

Customer Information :

Product information :

3NF :

Order Details :

Customer Information :

Product Information :

BCNF :

Order Details :

Customer Information :

Product Information :

Item Information :

4NF :

Order Details :

Tracking order:

Customer Information :

Product Information :

Product Information :


Related Solutions

The following table shows the average petrol price and the number of online shopping orders over...
The following table shows the average petrol price and the number of online shopping orders over a given month: Petrol Price and Online Shopping Average Petrol Price per gallon over a month ($) Number of Online Shopping Orders 3.8025 3,860 4.975 4,172 1.525 1,389 3.81 3,766 1.515 2,072 4.0275 3,286 4.7075 3,840 4.8725 4,688 1.7425 1,795 1.3225 1,539 The relationship between the average petrol price and the number of online shopping orders in a given month is proposed to follow...
The following table shows the average petrol price and the number of online shopping orders over...
The following table shows the average petrol price and the number of online shopping orders over a given month: Petrol Price and Online Shopping Average Petrol Price per gallon over a month ($) Number of Online Shopping Orders 1.57 1,398 4.8225 4,109 2.2725 2,257 3.42 2,644 3.2225 3,257 4.3175 3,530 1.3275 1,791 3.68 3,859 4.3025 3,544 2.065 2,173 The relationship between the average petrol price and the number of online shopping orders in a given month is proposed to follow...
Past records indicate that the probability of online retail orders that turn out to be fraudulent...
Past records indicate that the probability of online retail orders that turn out to be fraudulent is 0.07 Suppose​ that, on a given​ day, 24 online retail orders are placed. Assume that the number of online retail orders that turn out to be fraudulent is distributed as a binomial random variable. Complete parts​ (a) through​ (d) below. a. What are the mean and standard deviation of the number of online retail orders that turn out to be​ fraudulent? The mean...
Past records indicate that the probability of online retail orders that turn out to be fraudulent...
Past records indicate that the probability of online retail orders that turn out to be fraudulent is 0.07. Suppose that, on a given day, 19 online retail orders are placed. Assume that the number of online retail orders that turn out to be fraudulent is distributed as a binomial random variable. a. What are the mean and standard deviation of the number of online retail orders that turn out to be fraudulent? b. What is the probability that zero online...
SOA Case Study: Retail company, shopOnline, with an online web store and 900 retail stores, has...
SOA Case Study: Retail company, shopOnline, with an online web store and 900 retail stores, has the following characteristics: • Strategic objective: become the most profitable retailer in the industry through aggressive growth with minimal risk • Delivering a unique, seamless, cross channel experience. • Being the first to offer popular products that match customer desires. • Capabilities needed according to Business Process Analysis: – share consistent product information across multiple channels. – quickly and accurately incorporate new products. –...
Consider Retail Store database which store the details of different items available in the store and...
Consider Retail Store database which store the details of different items available in the store and the sales of these items to different customers: Schema: Item(ItemNo, ItemName, Category, UnitPrice) Sales(SalesNo, ITemNo, SalesDate, CustomerNo, Qty) Customer(CustomerNo, CustomerName, City, Income, MobileNo) Write the following queries in Relational Algebra: a) List the No. and Name of items in ‘ABC’ category. b) Count the No. of categories from which the items were bought by the customer ‘Mohan Kumar’ c) List the customers who has...
The following table is a non-normalized table for a Rental Property Management Database.  Data is included to...
The following table is a non-normalized table for a Rental Property Management Database.  Data is included to help you to perform the normalization.  One client may have multiple rental records. Identify the functional dependencies and normalize the table to 1NF, 2NF, and 3NF respectively. You also need to show the steps to reach normal form and populate each relation with sample data. As a result, you can see that duplicate data will be removed through the normalization process. CLIENT_RENTAL ClientNo ClientName PropertyNo...
The following information is available for the past month for a retail store: Sales $87,000 Markups...
The following information is available for the past month for a retail store: Sales $87,000 Markups $9,000 Markdowns $9,000 Purchases (at cost) $38,800 Purchases (at retail) $107,000 Beginning inventory (at cost) $30,000 Beginning inventory (at retail) $48,186    What is the ending inventory at cost using the conventional retail method? $38,870 $164,186 $78,000 $28,570
The Bike and Hike Outlet is a retail store. Transactions involving purchases and cash payments for...
The Bike and Hike Outlet is a retail store. Transactions involving purchases and cash payments for the firm during June 2019 are listed below, as are the general ledger accounts used to record these transactions. GENERAL LEDGER ACCOUNTS 101 Cash $ 21,900 Dr. 131 Equipment 66,000 Dr. 201 Notes Payable 205 Accounts Payable 4,980 Cr. 501 Purchases 503 Purchases Ret. and Allow. 504 Purchases Discounts 611 Rent Expense 614 Salaries Expense 617 Telephone Expense DATE TRANSACTIONS June 1 Issued Check...
You are the marketing manager for an online retail store, selling shoes. Currently, for every 1000...
You are the marketing manager for an online retail store, selling shoes. Currently, for every 1000 people that visit your website you make 283 sales. You have decided to trail a new website design on 100 visitors to the website to see if the sales rate improves. A) How should the 100 people be selected? Explain why this is important? B) Assuming that the new website design has had no effect, what distribution best describes the number of sales out...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT