1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
|