diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-07-02 11:55:17 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-07-02 11:55:17 -0700 |
| commit | 6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6 (patch) | |
| tree | ed97e39ec77c5231ffd2c394493e68d00ddac5a4 /Homework/cs5800/Quizzes/2.org | |
| download | misc-undergrad-main.tar.gz misc-undergrad-main.zip | |
Diffstat (limited to 'Homework/cs5800/Quizzes/2.org')
| -rw-r--r-- | Homework/cs5800/Quizzes/2.org | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Homework/cs5800/Quizzes/2.org b/Homework/cs5800/Quizzes/2.org new file mode 100644 index 0000000..a24d754 --- /dev/null +++ b/Homework/cs5800/Quizzes/2.org @@ -0,0 +1,62 @@ +1. False +2. False +3. True +4. ? +5. True +6. True +7. ? +8. True +9. True +10. True + + +1. There are three foreign keys: "serial_no" is a foreign key relating "option" to a "car", "salesperson_id" is a foreign key relating "sale" to a "salesperson", and "serial_no" is a foreign key relating "sale" to a "car". + +2. + +CAR: + +(1, "Impala", "Chevrolet", 2000) + +(2, "Odyssey", "Honda", 4000) + +(3, "S", "Tesla", 100000) + +OPTION: + +(1, "bluetooth", 20) + +(2, "automatic doors", 400) + +(2, "leather seats", 1000) + +(3, "autopilot", 2000) + +SALESPERSON: + +(1, "Logan", "112-358-1321") + +(2, "Bob", "271-828-1828") + +(3, "Alice", "314-159-2654") + +SALE: + +(1, 1, "2022-10-02 15:47", 2020) + +(2, 3, "2022-03-04 12:34", 100000) + +3. + +SALE that would violate referential integrity because there is no salesperson with a salesperson_id of 10: + +(10, 2, "2022-01-01 00:01", 5000) + +SALE that would not violate referential integrity because there is a salesperson with a salesperson_id of 2 that did not sell car with serial number of 2: + +(2, 2, "2022-12-31 11:59", 5000) + +Weak entity type => An entity that cannot be uniquely identified by its attributes +identifying relationship type => the relationship that relates the weak entity type to the owner +owner entity type => is an entity type that relates to a weak entity type and identifies it +partial key => an attribute that distinguishes instances of a weak entity type relative to a strong entity |
