38.3k views
4 votes
Charlie has a large book collection. He was keeping track of it in a spreadsheet, but it has grown big enough that he wants to convert it into a real database. Here is a sample from the spreadsheet: Author James Taylor Author Country England May Norton United States Titles JavaScript Essentials, South Tech Books, London, 2010, $14; HTML5 Exposed, Webby Books, London, 2012, $15.50 Big Data Big Promise, Data Press, San Francisco 2012, $25 Database Development for the Cloud, Data Press San Francisco, $20.35; Data Services, Future Tech Press, New York $12.95 Jessica Lewis United States Ques. 1. What are some of the potential problems with this layout if carried directly to the database? (Exam2.docx) Ques. 2. Create the Dependency Diagram and transform it into the highest normal form (Show various stages - INF, 2NF, 3NF). Be sure to show the primary keys, and various dependencies in each stage (Exam2.docx) Ques. 3. Create the final ER diagram that shows the database in the highest Normal Form. (Indicate PK, FK, data types). You can add additional attributes as needed. (Exam 2.docx) Ques. 4. Write a single script file (Label it as Exam2.sql) to create the tables and insert the sample data in Oracle. Confirm that the rows are created, and data is inserted. Use echo and spool to create an output file (Label it as Exam2_Output.txt)

User Rots
by
3.1k points

1 Answer

2 votes

Answer:

Check the explanation

Step-by-step explanation:

Ans 1) storing the data in one single row comes with its own barriers and that is if you delete one of the record in the spreadsheet, all the equivalent records which you didn't wanted to delete would be deleted. For take for instance, if you wish to delete the record of author "James Taylor" then all the books he has written would also be deleted from the spreadsheet.

Ans 2) In 1NF, all row is expected to have only 1 tuple, but here in this spreadsheet the title field for Author "James Taylor" has 2 books, so it would be separated into single rows.

Ans 3) The table in the attached image below doesn't delete with Delete anomaly, i.e., for author "May Norton" if you delete this record, then the only book written by her would be deleted.

So, you have to convert this table into 2NF.

Make separate tables for Author and Book

Author(Author Name, Author Country)

Books(Author Name, Book title, Publisher, Publisher Location, Year, price)

This cannot be normalized any further.

Charlie has a large book collection. He was keeping track of it in a spreadsheet, but-example-1