summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-30 13:44:23 -0600
committermo khan <mo.khan@gmail.com>2020-04-30 13:44:23 -0600
commit935bf507c74bdcc6ccfcac23dfe28f114b6590db (patch)
treed9091bc8c9fa5c8d292c9c1f44d6833c180c534a
parente7c30c84d716b268dce3a89a473da6b850da5606 (diff)
Start practice exam
-rw-r--r--assignments/exam/README.md62
1 files changed, 62 insertions, 0 deletions
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)