-
Notifications
You must be signed in to change notification settings - Fork 0
/
samples_dvd_club.sql
139 lines (76 loc) · 3.05 KB
/
samples_dvd_club.sql
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
insert into Member ( mNo, mLastName, mFirstName, mAddress, mRegDate, mDvdCount )
values (100,'NIKOY','NIKOS','TZAVARA 12',('01/03/08'),NULL);
insert into Member ( mNo, mLastName, mFirstName, mAddress, mRegDate, mDvdCount )
values (101,'PETROY','PETROS','RIGA 23',('15/02/09'),NULL);
insert into Member ( mNo, mLastName, mFirstName, mAddress, mRegDate, mDvdCount )
values (102,'FWTIOY','FWTIS','KANARH 20',('17/03/09'),NULL);
insert into Dvd (dCode, dTitle, dDirector, dvdLendCost, dAcquisitionCost,
dCategoryCount, dLendTimes )
values (10001, 'scarface', 'Brian De Palma', 1.5, 20, 2, 2);
insert into Dvd ( dCode, dTitle, dDirector, dvdLendCost,
dAcquisitionCost, dCategoryCount, dLendTimes )
values (10002, 'Instinct', 'Jon Turtelaub', 1.5, 22, 2, 2);
insert into Dvd ( dCode, dTitle, dDirector, dvdLendCost,
dAcquisitionCost, dCategoryCount, dLendTimes )
values (10003, 'Scent of woman', 'Martin Brest', 1.7, 21, 1, 1);
insert into Category ( cName, cDvdCount)
values ('crime',1);
insert into Category ( cName, cDvdCount)
values ('drama',3);
insert into Category ( cName, cDvdCount)
values ('thriller',1);
insert into Actor ( aName,aOscar )
values ('Al Pacino',NULL);
insert into Actor ( aName,aOscar )
values ('Michelle Pfeiffer',NULL);
insert into Actor ( aName,aOscar )
values ('Anthony Hopkins',NULL);
insert into Actor ( aName,aOscar )
values ('Cuba Gooding',NULL);
insert into Actor ( aName,aOscar )
values ('Chris O ''Donnell',NULL);
insert into Phone( mNo, mPhoneNo )
values(100,'6944100001');
insert into Phone( mNo, mPhoneNo )
values(100,'6944100002');
insert into Phone( mNo, mPhoneNo )
values(101,'6944100003');
insert into Phone( mNo, mPhoneNo )
values(102,'6944100004');
insert into Borrow (mNo,dCode, outDate, inDate )
values(100,10002,('02/03/08 13:30:25'),
('03/03/08 20:22:19'));
insert into Borrow (mNo,dCode, outDate, inDate )
values(100,10001,('15/08/09 14:22:12'),
NULL);
insert into Borrow (mNo,dCode, outDate, inDate )
values(101,10002,('10/07/09 10:23:01'),
('12/07/09 21:25:04'));
insert into Borrow (mNo,dCode, outDate, inDate )
values(101,10001,('13/08/09 09:13:14'),
('14/08/09 11:59:08'));
insert into Borrow (mNo,dCode, outDate, inDate )
values(102,10003,('17/08/09 12:58:02'),
('25/08/09 20:00:00'));
insert into PlaysIn ( aName, dCode, roleNo )
values('Al Pacino',10001,1);
insert into PlaysIn ( aName, dCode, roleNo )
values('Michelle Pfeiffer',10001,2);
insert into PlaysIn ( aName, dCode, roleNo )
values('Anthony Hopkins',10002,1);
insert into PlaysIn ( aName, dCode, roleNo )
values('Cuba Gooding',10002,1);
insert into PlaysIn ( aName, dCode, roleNo )
values('Al Pacino',10003,1);
insert into PlaysIn ( aName, dCode, roleNo )
values('Chris O ''Donnell',10003,1);
insert into Includes ( cName, dCode )
values('crime',10001);
insert into Includes ( cName, dCode )
values('drama',10001);
insert into Includes ( cName, dCode )
values('drama',10002);
insert into Includes ( cName, dCode )
values('thriller',10002);
insert into Includes ( cName, dCode )
values('drama',10003);