Normalization Example:
Assumption:A customer can have multiple orders and order can include multiple products.
0NF:
customer order: custname,orderno,prodno,proddesc,qty,custaddress,dateordered
1NF: Remove multivalued attributes
customer:custname,custaddress
order:custname,orderno,prodno,proddesc,qty,dateordered
2NF: Remove partial dependencies
customer:custname,custaddress
order line:orderno,prodno,qty,dateordered
product:prodno,proddesc
order:orderno,custname
3NF, BCNF: Remove transitive dependencies
customer:custname,custaddress
customer order:custname,orderno
order:custname,orderno,prodno,qty,dateordered
product:prodno,proddesc
Assumption:A customer can have multiple orders and order can include multiple products.
0NF:
customer order: custname,orderno,prodno,proddesc,qty,custaddress,dateordered
1NF: Remove multivalued attributes
customer:custname,custaddress
order:custname,orderno,prodno,proddesc,qty,dateordered
2NF: Remove partial dependencies
customer:custname,custaddress
order line:orderno,prodno,qty,dateordered
product:prodno,proddesc
order:orderno,custname
3NF, BCNF: Remove transitive dependencies
customer:custname,custaddress
customer order:custname,orderno
order:custname,orderno,prodno,qty,dateordered
product:prodno,proddesc
No comments:
Post a Comment