Download Stock Ordering Database Alex Denby 2002/2003 - VLE

Transcript
Appendix B
Customer
Schema: Customer {customer_id, customer_name, address_1, address_2, city, postcode}
Non trivial Dependencies: cust_id Æ {customer_name, address_1, address_2, city, postcode }
: postcode Æ {cust_id, customer_name, address_1, address_2, city}
: customer_name Æ {cust_id, address_1, address_2, city, postcode}
Key: {cust_id}, {postcode}, {customer_name}
1NF
There are no nested relations and each attribute only needs to take a single value so this passes the
test for 1NF
2NF
For all non trivial dependencies there is only one attribute on the left hand side which is the key
and so the non prime attributes must be fully functionally dependent on the key as you can’t
remove an attribute from the left hand side of the dependency so the test for 2NF is passed.
3NF
The isn’t any transitive dependency between the key and any non prime attributes and for all non
trivial dependencies the LHS of the dependency is a super key of the schema so the schema is in
3NF.
BCNF
Because the schema is in 3NF and for all non trivial dependencies XÆA, X is a super key of the
schema the schema is in fact in BCNF.
47