Question

In: Computer Science

1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...

1. The functional dependencies for the ProAudio relation:

c_id -> f_name, l_name, address, city, state, zip

item_id -> title, price

ord_no -> c_id, order_date

ord_no  + item_id  -> shipped

zip -> city, state

Original ProAudio relation:

c_id f_name I_name address city state zip ord_no item_id title price order_date shipped
01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no
02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes
01 Jane Doe 123 Elm St Ely NV 11111 1-2 12-21 The Blues 8.99 12-2-00 yes

determining functional dependencies for ProAudio database

Normalization is a set of rules that ensures the proper design of a database. In theory, the higher the normal form, the stronger the design of the database.

Use the file for Functional Dependencies Above to answer the following questions:

Now that you are familiar with the mission statement and the entities and attributes the for ProAudio:

  1. Identify anomalies in ProAudio- Give 3 examples means that you list specific instances from ProAudio on insert, delete or update anomalies, describing each in the context of the ProAudio database.
    • ProAudio Anomaly example 1
    • ProAudio Anomaly example 2
    • ProAudio Anomaly example 3
  1. Resolve ProAudio anomalies- citing the anomalies you described in the previous section- specifically say how to fix each one
    • Fix 1
    • Fix 2
    • Fix 3

Solutions

Expert Solution

ProAudio Anomaly example 1

Consider a new item is available and admin need to put the details of new item to the database. The new item is not ordered or shipped by any customer. And the database will not allow null values for c_id. This will cause an insertion anomaly because admin is not able to add the new item to the database in this condition.

ProAudio Anomaly example 2

If the admin want to remove a specific customer from the database it may remove the details of some of items which was ordered by only that customer. Consider in the given table, if admin removes the details of c-id = 2, then it causes the deletion of item with item_id= 21-12 because no other rows with this item data in the table. This is called deletion anomaly.

ProAudio Anomaly example 3

If there is an update in zipcode for the city Ely, the admin need to update all the rows which contain this city. If there is a chance of not editing any of the row, this will lead to data mismatch or data inconsistency. This is called update anomaly.

For fixing the anomalies, we need to normalize the table according to the functional dependencies as shown below

Address(city, state, zip)

primary key: zip

Customer( c_id, f_name, l_name, address, zip)

primary key: c_id

Foreign key: zip references primary key of Address

Item( item_id, title, price)

primary key: item_id

Order(ord_no, c_id, order_Date)

primary key: ord_no

Foreign key: c_id references primary key of Customer

Shipment(ord_no, item_id, shipped)

primary key: ord_no+item_id

Foreign key: item_id references primary key of Item, ord_no references primary key of Order

The example data can arrange as follows;

Address

zip City State
1111 Ely NV

Customer

c_id f_name l_name address zip
01 Jane Doe 123 Elm st 1111
01 Fred Fish 321 Oak st 1111

Item

item_id title price
12-31 More Blues 8.99
21-12 Jazz Songs 9.99
12-21 The Blues 8.99

Order

ord-no c_id order_Date
1-1 01 12-02-00
2-1 02 11-09-00
1-2 01 12-02-00

Shipment

ord-no item_id shipped
1-1 12-31 no
2-1 21-12 yes
1-2 12-21 yes

Fix 1

Now the admin can easily insert new item details to the table Item.

Fix 2

Now the admin can remove the details of a customer from Customer table, and it will not affect any item details.

Fix 3

Now the updating of zip is easy and need to update only one row of the Address table.


Related Solutions

1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip...
1. The functional dependencies for the ProAudio relation: c_id -> f_name, l_name, address, city, state, zip item_id -> title, price ord_no -> c_id, order_date ord_no  + item_id  -> shipped zip -> city, state Original ProAudio relation: c_id f_name I_name address city state zip ord_no item_id title price order_date shipped 01 Jane Doe 123 Elm St Ely NV 11111 1-1 12-31 More Blues 8.99 12-2-00 no 02 Fred Fish 321 Oak St Ely NV 11111 2-1 21-12 Jazz Songs 9.99 11-9-00 yes 01...
Task 1. For each table on the list, identify the functional dependencies. List the functional dependencies....
Task 1. For each table on the list, identify the functional dependencies. List the functional dependencies. Normalize the relations to BCNF. Then decide whether the resulting tables should be implemented in that form. If not, explain why. For each table, write the table name and write out the names, data types, and sizes of all the data items, Identify any constraints, using the conventions of the DBMS you will use for implementation. Write and execute SQL statements to create all...
Consider a relation R (ABCDEFGH) with the following functional dependencies: ACD --> EF AG --> A...
Consider a relation R (ABCDEFGH) with the following functional dependencies: ACD --> EF AG --> A B --> CFH D --> C DF --> G F --> C F --> D Find minimal cover and identify all possible candidate keys. In order to receive full credit, please list each step taken and the rules that you applied.
Use a JSON data structure that contains student information (StudentId, FName, LName, Address, City, State, Zip,...
Use a JSON data structure that contains student information (StudentId, FName, LName, Address, City, State, Zip, E-mail, Phone, Major, AdvisorName, AdvisorEmail). Using the Foreach statement, display all the contents of the JSON data structure into a webpage. What to turn in: 1. Screenshots: Code, JSON data, Web page showing JSON data in a table - pulled using the Foreach instruction.
For the relation R(A,B,C,D,E) with the following Functional Dependencies: A → B, A → C, BC...
For the relation R(A,B,C,D,E) with the following Functional Dependencies: A → B, A → C, BC → D, AC → E, CE → A, list all non-trivial FDs following from the above.    Generate all possible keys for R. Check whether R is in 3NF. If it is in 3NF, explain the criteria you used. If it is not in 3NF, convert it into 3NF, showing the new relations and their FDs.
Normalization: Answer all 4 questions. You are given the following relation R and some functional dependencies....
Normalization: Answer all 4 questions. You are given the following relation R and some functional dependencies. R(SID, Project, Code, ListOfSupplies, Name, Initials, Abbrev) Project → ListOfSupplies SID → Name Name → Initials Project, Initials → Abbrev SID, Project → Code Code → SID Is R in 1NF? If not, normalize R into a collection of 1NF relations. Is R in 2NF? If not, normalize R (or your collection of 1NF relations) into a collection of 2NF relations. Is R in...
1. Consider the following functional dependencies: Z -> XYD, X -> Y Find the minimal cover...
1. Consider the following functional dependencies: Z -> XYD, X -> Y Find the minimal cover of the above. 2. Consider the following two sets of functional dependencies: F = {A -> C, AC -> D, E -> AD, E -> H} and G = {A -> CD, E -> AH}. Check whether they are equivalent.
Database Normalize the relations to BCNF: Member- (MemID, dateJoined, firstName, lastName, street, city, state, zip, areaCode,...
Database Normalize the relations to BCNF: Member- (MemID, dateJoined, firstName, lastName, street, city, state, zip, areaCode, phoneNumber, currentOfficeHeld) Play- (title, author, numberOfActs, setChanges) Sponsor- (sponID, name, street, city, state, zip, areaCode, phoneNumber) Subscriber- (subID, firstName, lastName, street, city, state, zip, areaCode, phoneNumber) Production- (prodyear, seasonStartDate, seasonEndDate, title) Performance – (perfyear,perfdate, time, seasonStartDate) TicketSale- (saleID, saleDate, totalAmount, perfyear, perfdate,subID) DuesPayment- (MemID, duesYear, amount, datePaid) Donation – (sponID, donationDate, donationType, donationValue, prodYear, seasonStartDate) Ticket- (saleID, seatLocation, price, type) Member - Production-(MemID, prodYear,...
=>Set of functional dependencies(F) = {A -> BC, BC -> AD, D -> E} =>Set of...
=>Set of functional dependencies(F) = {A -> BC, BC -> AD, D -> E} =>Set of functional dependencies(F) = {AB -> C, A -> DE, B -> F, F -> GH, D -> IJ} Decompose the previous R{A, B, C, D, E, F, G, H, I, J} into each higher normal form relations above its current NF. For example, if its current NF is 0NF, then you need to decompose R to 1NF relations, 2NF relations, up to 3NF relations...
Determine the Functional Dependencies that exist in the following Orders table. This table lists customer and...
Determine the Functional Dependencies that exist in the following Orders table. This table lists customer and order data. Orders (SupplierNum, SupplierName, Supp_Phone, ProductNum, Description, Product_type, QuotedPrice) . Normalize the above relation to 3 rd normal form, ensuring that the resulting relations are dependency-preserving and specify the primary keys in the normalized relations by underlining them.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT