1a.
Normalization is a systematic process of controlling and limited redundancies to avoid database anomalies (Insert, Update, Delete)
1.b Functional dependency si when one attribute in a table determines another attribute in the table, in a rdms
1.c update anomaly - it is necessary to change the values of multiple rows just to modify ONLY a single fact.
1.c insert anomaly - Occurs when extra data beyond the required data has to added to the database.
1.c delete anomaly - occurs when you delete a record and important data is deleted
Database Design Tutorial - Week 7
1. Define the following terms:
a. Normalization
b. Functional Dependency (Give examples)
c. Update, Insertion and Delete Anomalies (Give Examples)
2. Consider a relation with the schema:
sales(seller,producer,product,amount)
The following is a legal instance of Sales
Seller Producer Product Amount
Silman SoftFloor AG Velour 101000
Bjarnes Tæpper Bøgetæpper Berber 207000
Top Tæpper Bøgetæpper Kashmir 77000
Silman SoftFloor AG Berber 72000
Bjarnes Tæpper Bøgetæpper Valnød 17000
Which of the following potential FDs do not hold, based on the instance above?
i) amount → product Note: A determinant returns a unique row.
ii) amount → product seller
iii) product → producer
iv) producer → product
v) seller product → amount
3. Consider the following relation (capitalized letters are attribute names, lowercase
letters and numbers are values)
A B C D E
a1 b2 c2 d3 e2
a1 b2 c2 d1 e4
a2 b3 c2 d1 e5
a2 b4 c5 d1 e5
Circle the functional dependencies that seem to apply to Z
a. ED b. D E c. C A d. E B
e. E A f. B C g. B D h. B A
4. Explain what are the following normalization levels giving examples of how each are
violated:
a. 0NF b. 1NF c. 2NF d. 3NF
5. Define what are now as transitive and partial dependencies. Explain which
normalization levels each and give examples.
6. The following dependency diagram below shows a number of dependencies.
Identify each dependency (partial, transitive and functional) and discuss their
implications.
A1 A3 A2 A4 A5
7. State the normal form of the following and determine how you would get it to 4th
Normal Form
i) Customer (customer_id, name, dob, emails)
ii) Purchase(date, product_id, customer_id, qty, product_price, name, email)
FD: customer_id name, email
FD: product_id product_price
iii) Building (building_code, location, description)
FD: building_code - > location, description
Room (room_number, building_code, room_type, rental_cost)
FD: room_number -> building_code
FD: room_type -> rental_cost