vault backup: 2024-02-09 10:58:22

This commit is contained in:
boris committed 2024-02-09 10:58:22 +00:00
1 parent 0126991874
commit 1e824525b0
18 files changed
+760 -28

No files matched your search

@@ -64,3 +64,68 @@ T1 and T2 conflict as T1's write for X is overwritten by T2's write for X before
( 2 conflicts )
T1 and T2 conflict as T1's write operation is overwritten by T2's write operation before either transaction is complete.
( 3 conflicts )
# Workshop
```sql
create table chap27.car(
carId INT,
carMake VARCHAR(8),
carModel VARCHAR(12),
carPrice INT,
primary key( carId )
);
create table chap27.part(
partId INT,
partName VARCHAR(6),
partPrice INT,
primary key( partId )
);
create table chap27.carPart(
carId INT,
partId INT,
foreign key (carId) references car(carId),
foreign key (partId) references part(partId)
);
insert into car values
(1, 'Ford', 'Focus', 18000),
(2, 'Toyota', 'Avensis', 20000),
(3, 'BMW', '640d', 60000),
(4, 'Porsche', 'Boxter 718', 42000);
insert into part values
(1, 'part1', 54),
(2, 'part2', 664),
(3, 'part3', 224),
(4, 'part4', 11),
(5, 'part5', 187),
(6, 'part6', 22),
(7, 'part7', 998),
(8, 'part8', 115),
(9, 'part9', 23),
(10, 'part10', 55);
insert into carpart values
(1, 3),
(1, 8),
(1, 5),
(1, 1),
(1, 7),
(2, 3),
(2, 4),
(2, 2),
(2, 8),
(3, 9),
(3, 5),
(3, 3),
(3, 1),
(4, 7),
(4, 9),
(4, 5),
(4, 6),
(4, 4),
(4, 2);
```