In: Computer Science
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:
There are three types of anomalies that occur when the database is not normalized.
These are – Insertion, update and deletion anomaly.
Let us define each of these by using the file for Functional Dependencies given in the question:
1) Insertion : In the above table we have two rows for f_name "Jane" as he/she belongs to two ord_no of the ProAudio relation. If we want to update the address of Jane then we have to update the same in two rows or the data will become inconsistent. If somehow, the correct address gets updated in one ord_no but not in other then as per the database, Jane would be having two different addresses, which is not correct and would lead to inconsistent data.
2) Update : Suppose we want to add a new customer to ProAudio database, who's status of shipment is not received by the database management authority from the shipment agency, then we would not be able to insert the data into the table if shipped field doesn’t allow nulls.
3) Deletion : Suppose, if at a point of time the ProAudio agency wants to delete the order_date "11-9-00" then deleting the rows that are having order_date as "11-9-00" would also delete the information of customer "Fred" since he is assigned only to this date.
SUMMARY : If a tuple is inserted in referencing relation and referencing attribute value is not present in referenced attribute, it will not allow inserting in referencing relation. Also, if a tuple is deleted or updated from referenced relation and referenced attribute value is used by referencing attribute in referencing relation, it will not allow deleting the tuple from referenced relation.