From 935bf507c74bdcc6ccfcac23dfe28f114b6590db Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 30 Apr 2020 13:44:23 -0600 Subject: Start practice exam --- assignments/exam/README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 assignments/exam/README.md diff --git a/assignments/exam/README.md b/assignments/exam/README.md new file mode 100644 index 0000000..dad52d4 --- /dev/null +++ b/assignments/exam/README.md @@ -0,0 +1,62 @@ +# 1 + +A real estate company uses a database to store information about customers, property, and contracts. +The following relations are used in the database: + +Customer: + * Customer number (unique) + * name + * mailing address + * Balance + * lawyer name + * Discount + +Contract: + + * Customer number (unique) + * Agent number (unique) + * Property_ID (one per contract) + * Date of contract + * Property addresses + * Property value + * Type + * Number of rooms + * Land size + * Built size + * Tax value + +The following functional dependencies apply: + +* customer_no -> name +* customer_no -> mail_address +* customer_no -> balance +* customer_no -> lawyer_name +* customer_no -> discount +* {customer_no, Agent_no} -> propert_id +* {customer_no, Agent_no} -> date_contract +* property_id -> property_address +* property_id -> value +* property_id -> type +* property_id -> number_rooms +* property_id -> land_size +* property_id -> built_size +* property_id -> tax_value + +Transform these relations into 3NF (please use only the attributes described above, and do not add any new attributes). + +Normal forms: + +1. 0 multi-valued attributes +2. 0 functional dependencies +3. 0 transitive dependencies + +Before: + +* Customers(_id_, name, mail_address, balance, lawyer_name, discount) +* Contract(_id_, customer_id, agent_id, date_of_contract, property_address, property_value, type, number_of_rooms, land_size, built_size, tax_value) + +After: + +* customers(id, name, mail_address, balance, lawyer_name, discount) +* contracts(id, customer_id, agent_id, property_id, date_of_contract) +* properties(id, address, value, type, number_of_rooms, land_size, built_size, tax_value) -- cgit v1.2.3