-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.sql
622 lines (601 loc) · 34.9 KB
/
project.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
CREATE DATABASE airport_management;
USE airport_management;
CREATE TABLE AIRPORT
(IATACode VARCHAR(3) PRIMARY KEY,
Name VARCHAR(100),
City VARCHAR (20),
State VARCHAR(30),
Country VARCHAR(30));
INSERT INTO AIRPORT
(IATACode,Name,City,State,Country)
VALUES
('IND','Indianapolis International Airport','Indianapolis','Indiana','United States'),
('BOM','Chhatrapati Shivaji International Airport','Mumbai','Maharashtra','India'),
('SFO','San Francisco International Airport','San Francisco','California','United States'),
('CDG','Charles de Gaulle Airport','Paris','','France'),
('DEL','Indira Gandhi International Airport','New Delhi','Delhi','India'),
('LHR','Heathrow Airport','London','','United Kingdom'),
('ORD','O''Hare International Airport','Chicage','Illinois','United States'),
('SYD','Sydney Airport','Sydney','New South Wales','Australia'),
('DFW','Dallas/Fort Worth International Airport','Dallas','Texas','United States'),
('FRA','Frankfurt Airport','Frankfurt','','Germany'),
('IAH','George Bush Intercontinental Airport','Houston','Texas','United States'),
('IXC','Chandigarh International Airport','Chandigarh','','India'),
('JFK','John F. Kennedy International Airport','New York City','New York','United States'),
('SDF','Louisville International Airport','Louisville','Kentucky','United States'),
('TPA','Tampa International Airport','Tampa','Florida','United States');
CREATE TABLE AIRLINE
(AirlineID VARCHAR(3) PRIMARY KEY,
AirlineIATACode VARCHAR(2) UNIQUE,
AirlineName VARCHAR (50) UNIQUE);
INSERT INTO AIRLINE
(AirlineID,AirlineIATACode,AirlineName)
VALUES
('001','AA','American Airlines'),
('006','DL','DELTA AIR LINES, INC.'),
('016','UA','UNITED AIRLINES, INC.'),
('020','LH','LUFTHANSA'),
('057','AF','AIR FRANCE'),
('098','AI','Air India Ltd.'),
('125','BA','BRITISH AIRWAYS'),
('157','QR','Qatar Airways'),
('160','CX','CATHAY PACIFIC AIRWAYS LTD.'),
('176','EK','EMIRATES'),
('932','VS','VIRGIN ATLANTIC');
CREATE TABLE AIRLINE_TO_AIRPORT_MAPPING
(AirlineID VARCHAR(3),
AirportIATACode VARCHAR(3),
PRIMARY KEY(AirlineID, AirportIATACode),
FOREIGN KEY (AirportIATACode)
REFERENCES AIRPORT(IATACode)
ON DELETE CASCADE,
FOREIGN KEY(AirlineID)
REFERENCES AIRLINE(AirlineID)
ON DELETE CASCADE);
INSERT INTO AIRLINE_TO_AIRPORT_MAPPING
(AirlineID,AirportIATACode)
VALUES
('001','SDF'),
('001','IAH'),
('001','JFK'),
('001','TPA'),
('001','SFO'),
('006','DEL'),
('006','BOM'),
('006','JFK'),
('006','CDG'),
('006','SYD'),
('020','BOM'),
('020','JFK'),
('020','DFW'),
('020','SFO'),
('020','FRA'),
('098','IXC'),
('098','DFW'),
('098','DEL'),
('098','IAH'),
('098','BOM'),
('125','JFK'),
('125','BOM'),
('125','SFO'),
('125','FRA'),
('125','IXC'),
('157','BOM'),
('157','JFK'),
('157','DFW'),
('157','TPA'),
('157','SDF'),
('160','BOM'),
('160','JFK'),
('160','CDG'),
('160','IND'),
('160','DFW'),
('176','ORD'),
('176','BOM'),
('176','JFK'),
('176','DEL'),
('176','SFO');
CREATE TABLE EMPLOYEE
(SSN VARCHAR(11) PRIMARY KEY,
FirstName VARCHAR (20),
LastName VARCHAR(20),
Phone VARCHAR(15),
Sex VARCHAR (1) CHECK (Sex IN ('M','F')),
DateOfBirth DATE,
Address VARCHAR (60),
Department VARCHAR (40),
Salary INT,
AirportIATACode VARCHAR(3),
FOREIGN KEY (AirportIATACode)
REFERENCES AIRPORT(IATACode)
ON DELETE CASCADE);
INSERT INTO EMPLOYEE
(SSN,FirstName,LastName,Phone,Sex,DateOfBirth,Department,Address,Salary,AirportIATACode)
VALUES
('100-00-0000','Dylan','Fry','148-7063','M','1984-11-16','Planner','918-1890 Sagittis Rd.',50160,'SDF'),
('100-00-0005','Harper','Crosby','514-1190','M','1986-06-15','Planner','P.O. Box 101, 6116 Proin Avenue',37693,'IAH'),
('100-00-0010','Louis','Strong','1-296-758-5687','M','1983-05-12','Planner','4981 Ligula Av.',29624,'JFK'),
('100-00-0015','Lucian','Rich','639-4084','M','1977-01-12','TECHNOLOGY','Ap #467-2866 Massa. Rd.',55292,'TPA'),
('100-00-0020','Jackson','Roach','1-276-219-2571','M','1973-07-07','TECHNOLOGY','998-8802 Justo Street',35085,'SFO'),
('100-00-0025','Bruce','Donaldson','616-7161','M','1961-10-03','TECHNOLOGY','288-4357 Integer Street',39278,'DEL'),
('100-00-0030','Cadman','Klein','1-777-375-0790','M','1980-06-29','TECHNOLOGY','Ap #224-8323 Vulputate Av.',41782,'BOM'),
('100-00-0035','Jacob','Sloan','1-497-101-1550','M','1957-05-09','TECHNOLOGY','731-5652 Ac Street',42681,'JFK'),
('100-00-0050','Oren','Reese','601-3821','M','1985-10-13','ADMINISTRATIVE SUPPORT','P.O. Box 645, 9787 In Rd.',47505,'BOM'),
('100-00-0055','Lance','Randolph','414-8807','M','1971-03-30','ADMINISTRATIVE SUPPORT','7631 Sed Street',33915,'JFK'),
('100-00-0060','Dexter','Harrington','766-3981','M','2000-02-22','ADMINISTRATIVE SUPPORT','P.O. Box 663, 6111 Tincidunt Av.',39111,'DFW'),
('100-00-0065','Cairo','Tyler','1-587-702-7533','M','1979-06-07','ADMINISTRATIVE SUPPORT','P.O. Box 760, 2218 Lorem. Rd.',22575,'SFO'),
('100-00-0070','Tanner','Moses','1-704-828-1109','M','1998-09-10','TECHNOLOGY','Ap #949-1413 Est Av.',54538,'FRA'),
('100-00-0075','Addison','Kirk','1-112-913-6216','M','1963-10-22','TECHNOLOGY','5810 Quam Ave',34417,'IXC'),
('100-00-0080','Gray','Ford','1-151-875-3264','M','1987-10-12','TECHNOLOGY','P.O. Box 994, 2301 Aliquet Road',26601,'DFW'),
('100-00-0085','Scott','Clarke','665-1694','M','1960-02-17','TECHNOLOGY','Ap #489-4873 Diam Ave',33060,'DEL'),
('100-00-0090','Buckminster','Bates','1-639-143-3315','M','1969-01-12','Planner','P.O. Box 150, 1790 Suspendisse Av.',26554,'IAH'),
('100-00-0095','Tyrone','Norris','552-9828','M','1987-07-11','Planner','P.O. Box 735, 5965 Sodales Av.',46656,'BOM'),
('100-00-0100','Bruno','Johnson','1-550-800-4183','M','1972-08-09','Planner','3623 Ut Av.',29627,'JFK'),
('100-00-0105','Cain','Coffey','885-1949','M','1986-08-10','Planner','448 Ut Road',44226,'BOM'),
('100-00-0110','Salvador','Patterson','103-3899','M','1985-02-02','Planner','7415 At Rd.',59049,'SFO'),
('100-00-0115','Ciaran','Jimenez','1-920-639-5725','M','1991-01-27','Manager','Ap #270-2033 Urna Rd.',34948,'FRA'),
('100-00-0120','Connor','Church','410-8244','M','1962-06-14','Manager','345-8211 Sit Road',43031,'IXC'),
('100-00-0125','Richard','Ayala','1-967-241-4842','M','1972-09-05','Technician','2421 Id, Rd.',49654,'BOM'),
('100-00-0130','Channing','Mccormick','1-437-878-9243','M','1957-02-14','Technician','4246 Ac, Street',46117,'JFK'),
('100-00-0135','Kyle','Glover','191-0059','M','1974-05-12','Technician','903-4904 Eget St.',21896,'DFW'),
('100-00-0140','Wing','Larson','1-239-111-5738','M','1982-08-26','Technician','170 Augue St.',41655,'TPA'),
('100-00-0145','Tanek','Mclean','1-342-922-6759','M','1991-09-15','Technician','P.O. Box 930, 1616 Aliquam St.',59485,'SDF'),
('100-00-0150','Charles','Hyde','1-134-441-4341','M','1988-04-06','TECHNOLOGY','Ap #127-159 Et Ave',26715,'BOM'),
('100-00-0155','Dillon','Langley','111-4793','M','1970-04-21','TECHNOLOGY','488-1925 Eros. Rd.',50980,'JFK'),
('100-00-0160','Kamal','Snider','1-154-921-8125','M','2000-04-24','TECHNOLOGY','202-3135 Mi St.',24030,'CDG'),
('100-00-0165','Abel','Molina','1-982-765-3244','M','1973-11-03','TECHNOLOGY','211-9864 Ullamcorper St.',42195,'IND'),
('100-00-0170','Edward','Dickson','411-0137','M','1971-07-15','TECHNOLOGY','P.O. Box 497, 9991 Sed Road',22550,'DFW'),
('100-00-0175','Jerome','Santana','1-715-540-4663','M','1982-07-25','TECHNOLOGY','P.O. Box 935, 7589 Lobortis. Rd.',37164,'ORD'),
('300-00-0000','Cheyenne','Terry','1-696-172-3520','F','1964-05-10','ADMINISTRATIVE SUPPORT','P.O. Box 740, 4414 Iaculis St.',35913,'SDF'),
('300-00-0005','Alana','Preston','940-7450','F','1969-06-12','ADMINISTRATIVE SUPPORT','Ap #786-7428 Dictum Avenue',55036,'IAH'),
('300-00-0010','Kelsey','Nixon','1-611-798-3591','F','1999-07-24','ADMINISTRATIVE SUPPORT','P.O. Box 501, 8955 Arcu. Rd.',51959,'JFK'),
('300-00-0015','Haviva','Gonzalez','1-536-556-0517','F','1992-12-29','ADMINISTRATIVE SUPPORT','1716 In, Ave',55997,'TPA'),
('300-00-0020','Karly','Maxwell','245-2520','F','1961-07-06','ADMINISTRATIVE SUPPORT','6565 Accumsan Street',52216,'SFO'),
('300-00-0025','Kitra','Rivas','1-198-471-0789','F','1988-05-27','ADMINISTRATIVE SUPPORT','P.O. Box 687, 4799 Nisl Avenue',59901,'DEL'),
('300-00-0045','Karen','Diaz','598-9805','F','1973-01-19','TECHNOLOGY','7638 Phasellus St.',27654,'SFO'),
('300-00-0050','Sara','Ferguson','504-5692','F','1982-05-02','TECHNOLOGY','P.O. Box 764, 3617 Mollis Ave',41893,'DEL'),
('300-00-0055','Zephr','Silva','1-911-341-2877','F','1965-12-09','Planner','P.O. Box 161, 9929 Eleifend St.',56616,'SDF'),
('300-00-0060','Adele','Woodard','612-2993','F','1996-10-17','Planner','1423 Lorem. Street',38792,'IAH'),
('300-00-0065','Shelley','Simon','363-7203','F','1986-03-24','Planner','710-3316 Metus Avenue',46040,'JFK'),
('300-00-0070','Alika','Hodges','1-878-920-9135','F','1972-01-06','Planner','387-9297 Ut Av.',25621,'TPA'),
('300-00-0075','Gretchen','Butler','502-8408','F','1962-06-03','Planner','Ap #385-1753 Felis, St.',28088,'SFO'),
('300-00-0080','Melissa','Ortiz','807-1076','F','1976-05-02','Technician','9421 Cubilia Ave',51709,'DEL'),
('300-00-0085','Ruth','Harrison','762-9818','F','1957-01-28','Technician','784-4347 Magna. St.',27426,'BOM'),
('300-00-0090','Mary','Rowe','548-8765','F','1995-06-15','Technician','Ap #681-5712 Semper Street',33321,'JFK'),
('300-00-0095','Ann','Atkins','1-222-927-6465','F','1995-09-08','Technician','Ap #936-9511 Proin Rd.',29128,'TPA'),
('300-00-0100','Beverly','Cantu','1-528-238-9517','F','1980-03-09','Technician','P.O. Box 142, 3768 Parturient Rd.',29105,'SFO'),
('300-00-0105','Alice','Morales','511-6997','F','1968-04-28','Location Manager','Ap #355-1195 Nisl. Avenue',42669,'DEL'),
('300-00-0110','Clio','Snyder','1-624-309-1582','F','1969-03-21','Location Manager','P.O. Box 487, 9237 Ridiculus Road',24970,'BOM'),
('300-00-0115','Nadine','Kennedy','618-4790','F','1975-08-24','Location Manager','470 Mollis. St.',20616,'BOM'),
('300-00-0120','Jena','Alexander','501-6780','F','1977-06-05','Ramp Supervisor','3813 Litora Rd.',26828,'SFO'),
('300-00-0125','Keely','Morgan','1-396-622-4616','F','1968-10-12','Ramp Supervisor','Ap #830-4884 Sed, Av.',47841,'DEL'),
('300-00-0130','Chiquita','George','1-603-255-3580','F','1968-03-12','Ramp Supervisor','9457 Nibh. Road',41351,'SDF'),
('300-00-0135','Kirby','Dalton','1-872-696-2118','F','1973-09-01','Ramp Supervisor','P.O. Box 571, 516 Praesent Avenue',52307,'IAH'),
('300-00-0140','Demetria','Bass','1-625-161-4503','F','1961-11-21','Ramp Supervisor','Ap #929-2795 Molestie. Ave',38431,'JFK'),
('300-00-0145','Aubrey','Anthony','1-174-953-3127','F','1993-01-14','Ramp Supervisor','Ap #366-2054 Libero Rd.',36645,'TPA'),
('300-00-0150','Maile','Holland','1-623-595-4682','F','1973-10-10','Technician','P.O. Box 489, 3465 Felis. Street',36068,'SFO'),
('300-00-0155','Ruby','Hubbard','1-354-557-7635','F','1960-09-05','Technician','7026 Mi. Rd.',54422,'DEL'),
('300-00-0160','Beatrice','Phelps','258-0674','F','1957-02-20','Technician','Ap #487-9805 Sociis Av.',51864,'BOM'),
('300-00-0165','Raya','Dunn','291-1176','F','1964-11-07','Technician','P.O. Box 779, 2849 Vulputate, Street',49815,'JFK'),
('300-00-0170','Pearl','Dickerson','1-464-556-9122','F','2000-06-09','Technician','470-3276 Ut, Av.',47414,'JFK'),
('300-00-0175','Quon','Matthews','346-7746','F','1961-05-04','ADMINISTRATIVE SUPPORT','P.O. Box 343, 3600 Orci St.',39623,'SFO'),
('300-00-0180','Angelica','Hutchinson','186-0225','F','1961-11-14','ADMINISTRATIVE SUPPORT','3309 Nonummy Rd.',35054,'DEL'),
('300-00-0185','Shannon','Meyer','1-950-307-7566','F','1969-05-24','Planner','Ap #694-2455 Aliquam Rd.',28319,'SDF'),
('300-00-0190','Ila','Berry','996-1369','F','1978-01-07','Planner','P.O. Box 909, 8283 Arcu Road',24766,'IAH'),
('300-00-0195','Brittany','Orr','112-3053','F','1995-12-22','Planner','5796 Eu St.',31174,'JFK'),
('300-00-0200','Yvonne','Skinner','456-0464','F','1977-06-07','ADMINISTRATIVE SUPPORT','P.O. Box 490, 6569 Ante. St.',36846,'TPA'),
('300-00-0205','Carissa','Burch','1-595-707-4391','F','1989-03-20','ADMINISTRATIVE SUPPORT','5596 Metus. Avenue',21405,'SFO'),
('300-00-0210','Deirdre','Carrillo','211-3740','F','1964-02-26','ADMINISTRATIVE SUPPORT','814-1679 Felis. Rd.',25397,'DEL');
CREATE TABLE FLIGHT
(FlightNumber VARCHAR(6) PRIMARY KEY,
AirlineID VARCHAR(3),
Status VARCHAR(10),
Source VARCHAR(3),
Destination VARCHAR(3),
ArrivalTime VARCHAR(6),
DepartureTime VARCHAR(6),
Date DATE,
FOREIGN KEY(AirlineID)
REFERENCES AIRLINE(AirlineID)
ON DELETE CASCADE);
INSERT INTO FLIGHT
(FlightNumber,AirlineID,Status,Source,Destination,ArrivalTime,DepartureTime,Date)
VALUES
('AA1','001','Delayed','JFK','CDG','09:05','18:45','2020-08-26'),
('AA4003','001','Delayed','DEL','LHR','03:45','18:15','2020-08-08'),
('AA8202','001','On-time','LHR','ORD','01:33','17:07','2020-12-22'),
('AA5328','001','Cancelled','ORD','DFW','02:54','22:40','2020-09-29'),
('AA101','001','Delayed','DFW','SFO','09:59','16:37','2020-06-05'),
('AA5326','001','On-time','SFO','JFK','09:31','15:03','2020-06-09'),
('AA3325','001','Cancelled','JFK','CDG','10:10','16:44','2020-11-25'),
('AA4783','001','Delayed','CDG','BOM','05:23','15:20','2020-11-22'),
('AA7428','001','On-time','BOM','DEL','03:32','16:54','2020-08-13'),
('AA4833','001','Cancelled','DEL','JFK','09:45','20:41','2020-08-07'),
('AA9266','001','Delayed','JFK','CDG','02:09','21:53','2020-08-09'),
('AA3360','001','On-time','CDG','BOM','05:51','15:48','2020-10-05'),
('AA2162','001','Cancelled','BOM','DEL','08:34','22:56','2020-07-28'),
('AA4266','001','Delayed','DEL','LHR','07:56','15:52','2020-05-31'),
('AI3335','098','On-time','ORD','DFW','02:25','18:22','2020-06-07'),
('AI6442','098','Cancelled','DFW','SFO','03:06','18:34','2020-05-18'),
('AI2475','098','Delayed','SFO','DFW','01:41','22:46','2020-06-16'),
('AI3050','098','On-time','DFW','SFO','03:04','16:58','2020-08-23'),
('AI8332','098','Cancelled','SFO','JFK','06:09','22:38','2020-06-20'),
('AI6714','098','Delayed','JFK','CDG','05:28','19:39','2020-11-22'),
('AI7572','098','On-time','CDG','BOM','03:16','17:54','2020-12-17'),
('AI7850','098','Cancelled','BOM','DFW','10:52','18:57','2020-10-23'),
('AI6004','098','Delayed','DFW','SFO','08:19','13:36','2020-09-10'),
('AI5344','098','On-time','SFO','JFK','03:23','15:11','2020-12-10'),
('AI1049','098','Cancelled','JFK','CDG','03:03','20:26','2020-10-18'),
('AI3208','098','Delayed','CDG','BOM','03:16','20:07','2020-08-16'),
('AI3854','098','On-time','BOM','DEL','01:56','14:54','2020-07-19'),
('AI1382','098','Cancelled','DEL','JFK','01:24','21:38','2020-12-21'),
('AI2216','098','Delayed','JFK','CDG','05:26','20:00','2020-12-15'),
('AI7838','098','On-time','CDG','BOM','04:46','18:40','2020-07-20'),
('AI8755','098','Cancelled','BOM','DEL','04:32','22:59','2020-08-15'),
('AI7822','098','Delayed','DEL','LHR','00:42','22:13','2020-05-17'),
('BA1','125','On-time','CDG','BOM','00:27','18:22','2020-06-16'),
('BA1283','125','On-time','LHR','ORD','09:25','15:11','2020-06-16'),
('BA1703','125','Cancelled','ORD','DFW','02:54','21:40','2020-11-20'),
('BA335','125','Delayed','DFW','SFO','03:51','18:53','2020-11-02'),
('BA7683','125','On-time','SFO','JFK','01:07','22:20','2020-11-14'),
('BA7156','125','Cancelled','JFK','CDG','08:56','20:55','2020-12-17'),
('BA1439','125','Delayed','CDG','BOM','06:13','13:55','2020-09-04'),
('BA4301','125','On-time','BOM','DEL','05:47','20:28','2020-08-21'),
('BA1176','125','Cancelled','DEL','LHR','01:11','13:42','2020-08-08'),
('BA8467','125','Delayed','LHR','ORD','09:13','18:12','2020-06-06'),
('BA6176','125','On-time','ORD','DFW','09:05','14:55','2020-05-01'),
('BA7551','125','Cancelled','DFW','SFO','04:14','20:20','2020-09-04'),
('BA9099','125','Delayed','SFO','JFK','11:42','16:25','2020-06-03'),
('BA9372','125','On-time','JFK','CDG','11:48','20:47','2020-07-10'),
('DL1','006','Cancelled','BOM','DEL','07:53','20:28','2020-09-10'),
('DL5084','006','On-time','LHR','DFW','00:03','13:05','2020-08-22'),
('DL3669','006','Cancelled','DFW','SFO','08:37','14:46','2020-05-06'),
('DL1278','006','Delayed','SFO','JFK','04:55','20:53','2020-09-13'),
('DL5275','006','On-time','JFK','CDG','00:02','14:35','2020-11-08'),
('DL3597','006','Cancelled','CDG','BOM','05:09','22:33','2020-10-21'),
('DL4101','006','Delayed','BOM','DEL','08:19','18:05','2020-07-21'),
('DL8366','006','On-time','DEL','JFK','10:58','15:39','2020-08-09'),
('DL1267','006','Cancelled','JFK','CDG','06:27','21:33','2020-10-30'),
('DL8131','006','Delayed','CDG','BOM','12:04','20:31','2020-05-26'),
('DL1193','006','On-time','BOM','DEL','05:21','14:45','2020-05-23'),
('DL3805','006','Cancelled','DEL','CDG','04:30','22:06','2020-07-21'),
('LH3418','020','Cancelled','CDG','BOM','09:22','21:00','2020-08-04'),
('LH9763','020','Delayed','BOM','DEL','05:52','17:17','2020-12-21'),
('LH1849','020','On-time','DEL','JFK','02:05','13:46','2020-06-29'),
('LH746','020','Cancelled','JFK','CDG','05:58','19:54','2020-07-22'),
('LH4817','020','Delayed','CDG','BOM','10:37','19:30','2020-06-08'),
('LH132','020','On-time','BOM','DEL','07:34','15:07','2020-07-01'),
('LH9677','020','Cancelled','DEL','LHR','02:47','14:13','2020-12-18'),
('LH9703','020','Delayed','LHR','ORD','03:16','16:35','2020-05-20');
CREATE TABLE PASSENGER
(PassportNo VARCHAR(10) PRIMARY KEY,
FirstName VARCHAR(20),
LastName VARCHAR(20),
Address VARCHAR(60),
DateOfBirth date,
Sex VARCHAR(1));
INSERT INTO PASSENGER
(PassportNo,FirstName,LastName,Address,DateOfBirth,Sex)
VALUES
('GM7446599','Dana','Clemons','P.O. Box 280, 596 Sem Rd.','1985-10-09','F'),
('CB6437135','Ria','Bryant','Ap #622-7280 Sit St.','1997-01-28','F'),
('QI5053797','Karyn','Haynes','737-9443 Nibh. St.','1960-10-12','F'),
('LO3019859','Karly','Bowers','6221 Donec Avenue','1990-02-26','F'),
('UZ1685752','Jana','Hester','611-5917 In Rd.','1961-11-13','F'),
('LN7067611','Vielka','Hawkins','P.O. Box 352, 2419 Sed St.','1957-09-22','F'),
('FS8459636','Whilemina','Snider','P.O. Box 950, 4212 Etiam Avenue','1960-06-01','F'),
('RS9391669','Juliet','Hendricks','P.O. Box 881, 3967 A, Street','1969-07-05','F'),
('KU5070046','Amelia','Casey','453 Non St.','1974-12-09','F'),
('IG6471113','Shannon','Adams','939-5979 Magna St.','1976-08-31','F'),
('ML1553284','Xandra','Howard','236-4193 Mauris Ave','1970-09-13','F'),
('HV5532153','Kitra','Sweeney','P.O. Box 456, 2013 Dictum St.','1960-10-01','F'),
('WL9599046','Penelope','Baker','P.O. Box 955, 4082 Tincidunt Rd.','1985-11-18','F'),
('EW6355081','Eden','Henry','692-6392 In Rd.','1964-11-12','F'),
('JS4628933','Blair','Hood','Ap #466-5925 Mattis. Av.','1986-05-12','F'),
('WQ9217689','Ila','Blankenship','982 Cras Av.','1983-01-15','F'),
('PL1263841','Amela','Dodson','6660 Congue Avenue','1968-01-13','F'),
('OX5420922','Teagan','Gilmore','898-5049 Ultrices, Av.','1985-01-17','F'),
('YK9258505','Morgan','Mcbride','Ap #307-7948 Sed Av.','2001-01-11','F'),
('XQ4423754','Patricia','Rush','Ap #728-3230 Parturient Avenue','2000-04-28','F'),
('SU3907341','Sydnee','Whitehead','7119 In St.','1995-05-04','F'),
('UD8407210','Hedda','Goodwin','P.O. Box 552, 5169 Non, Rd.','1977-04-22','F'),
('QJ9214178','Gillian','William','Ap #194-5007 Adipiscing St.','1961-08-16','F'),
('KC6673129','Stacey','Parks','P.O. Box 491, 5192 Nulla Rd.','1991-10-03','F'),
('KU5721446','Julie','Shields','Ap #388-3815 Magna Avenue','1990-09-11','F'),
('XY7046503','Tana','Livingston','282-3226 Rutrum, Street','1968-07-02','F'),
('RD2682743','Hayfa','Kennedy','Ap #679-1800 Vitae, St.','1971-11-04','F'),
('TC3452638','Katell','Jennings','Ap #154-266 Dui Rd.','1995-07-08','F'),
('DT4407733','Bo','Macias','116-2565 Quis Road','1976-05-16','F'),
('KM1425225','Patience','Chapman','Ap #226-8137 Tincidunt Avenue','1978-01-09','F'),
('NG7481334','Rana','Bolton','P.O. Box 187, 6355 Mus. Rd.','1973-04-27','F'),
('LM4139097','Unity','Roy','6945 Magna. Av.','1983-03-11','F'),
('MJ9239285','Amelia','Giles','Ap #513-2510 Mi, St.','1994-10-29','F'),
('JJ5502642','Simone','Santiago','P.O. Box 538, 7638 Ante, St.','1969-06-24','F'),
('EV2528933','Felicia','Barlow','Ap #972-2002 Erat. Rd.','1993-02-20','F'),
('RH2706156','Shannon','Thompson','P.O. Box 333, 2275 Consectetuer Street','2000-12-10','F'),
('DH3685729','Kimberly','Simpson','721-8925 Commodo St.','1966-05-29','F'),
('LJ8074933','Aquila','Harper','165-9380 Elit. Rd.','1997-03-11','M'),
('IT7769851','Alden','Tran','P.O. Box 734, 7469 Suspendisse Rd.','1990-07-01','M'),
('AJ5443066','Solomon','Frost','640 Elementum Av.','1967-06-02','M'),
('HR8368454','Gregory','Maxwell','Ap #320-1701 Pellentesque. Rd.','1993-07-24','M'),
('XE3234766','Abraham','Watts','281-8530 Neque Rd.','2000-09-12','M'),
('EU9904230','Igor','Whitehead','7301 Iaculis, Avenue','1965-04-14','M'),
('CC8635978','Ralph','Vang','Ap #692-1914 Diam St.','2001-11-16','M'),
('GD1179060','Leonard','Kramer','P.O. Box 117, 8608 Vel, Rd.','1967-01-31','M'),
('KU5073332','Lance','Martin','384-7500 Tellus, St.','1989-06-14','M'),
('WF7549247','Cyrus','Bradshaw','819 Aliquam Av.','1978-07-19','M'),
('JF5838129','Thomas','Mathis','646-109 A Avenue','2001-06-01','M'),
('JA3195948','Linus','Whitfield','3098 Dapibus Road','1974-03-21','M'),
('SI9623534','Nigel','Horn','893-8416 Cursus, Street','1964-08-14','M'),
('DX8219751','Gary','Merrill','319-402 Metus. Rd.','1981-10-27','M'),
('IC6079857','Dean','Brennan','P.O. Box 906, 5990 Fringilla Rd.','2001-12-07','M'),
('YA1046435','Nissim','Lott','Ap #172-6645 Et, Road','1992-02-04','M'),
('KU6635734','Simon','Pacheco','5702 Ut St.','2001-01-15','M'),
('CL6244579','Brandon','Snyder','974-3701 Blandit Avenue','1970-08-27','M'),
('VK8341959','Walter','Sargent','P.O. Box 330, 7659 Eu Ave','1976-09-19','M'),
('QP1103996','Andrew','Boyle','515-3854 Consequat Ave','1980-07-19','M'),
('UV3996257','Thane','Perkins','P.O. Box 724, 9401 Nibh St.','1974-12-17','M'),
('LI9031495','Cairo','Bowen','P.O. Box 823, 6804 Dolor. Av.','1991-05-12','M'),
('CW9876001','Hamilton','Henry','5038 Massa. Road','1980-02-09','M'),
('VF3623601','Cody','Oneal','P.O. Box 758, 6293 Hendrerit. Road','1995-12-15','M'),
('VK6748993','Lane','Martinez','P.O. Box 459, 9360 Cursus Street','1991-03-07','M'),
('OE1469067','Ferdinand','Guy','363-6609 Sit Rd.','1993-05-30','M'),
('UJ5514092','Ross','Sosa','896-4575 Proin Rd.','1987-03-21','M'),
('ZG2572886','Axel','Duke','Ap #989-5932 Sit Street','1984-04-26','M'),
('VT5648027','Kevin','Clarke','Ap #886-3834 Odio. Rd.','1974-09-05','M'),
('SK5542133','Maxwell','Rosa','Ap #241-7670 Auctor St.','1969-04-07','M'),
('PT1173406','Magee','Lopez','171-1414 Cras Road','1984-07-17','M'),
('JO9932456','Chester','Buckner','Ap #147-606 Velit Avenue','1985-07-11','M'),
('ER8094785','Colin','Owen','P.O. Box 388, 1897 Aliquam Av.','1969-08-05','M'),
('GR8364545','Connor','Park','P.O. Box 243, 9399 Est. Rd.','1998-12-30','M'),
('RM3522332','Tucker','Nieves','Ap #210-4573 Risus. Rd.','1976-09-26','M'),
('JI3763193','Dylan','Stevens','P.O. Box 561, 5566 Id Avenue','1977-12-04','M'),
('MA4789163','Reece','Combs','P.O. Box 850, 2902 Nullam Road','1975-08-11','M'),
('FC7561993','Jesse','Chan','8153 Augue Ave','1970-08-23','M');
CREATE TABLE PASSENGER_PHONE
(PassportNo VARCHAR(10),
Phone BIGINT,
PRIMARY KEY (PassportNo, Phone),
FOREIGN KEY(PassportNo)
REFERENCES PASSENGER(PassportNo)
ON DELETE CASCADE);
INSERT INTO PASSENGER_PHONE
(PassportNo,Phone)
VALUES
('KU5721446',1524414266),
('XY7046503',1618236371),
('RD2682743',4804832580),
('TC3452638',3842573864),
('GM7446599',6882382441),
('CB6437135',3941475145),
('QI5053797',9203128842),
('KU5721446',1788557051),
('XY7046503',5893637530),
('RD2682743',4725388474),
('TC3452638',2385197009),
('GM7446599',3432656399),
('CB6437135',5634353621);
CREATE TABLE PASSENGER_FLIGHT_INFO
(PID INT,
PassportNo VARCHAR(10),
FlightNumber VARCHAR(10),
PRIMARY KEY(PID, PassportNo),
FOREIGN KEY(FlightNumber)
REFERENCES FLIGHT(FlightNumber)
ON DELETE CASCADE,
FOREIGN KEY(PassportNo)
REFERENCES PASSENGER(PassportNo)
ON DELETE CASCADE);
INSERT INTO PASSENGER_FLIGHT_INFO
(PID,PassportNo,FlightNumber)
VALUES
(1,'GM7446599','AA4003'),
(2,'CB6437135','AA8202'),
(3,'QI5053797','AA5328'),
(4,'LO3019859','AA101'),
(5,'UZ1685752','AA5326'),
(6,'LN7067611','AA3325'),
(7,'FS8459636','BA1283'),
(8,'RS9391669','BA1703'),
(9,'KU5070046','BA335'),
(10,'IG6471113','BA7683'),
(11,'ML1553284','BA7156'),
(12,'HV5532153','BA1439'),
(13,'WL9599046','BA4301'),
(14,'EW6355081','BA1176'),
(15,'JS4628933','LH9763'),
(16,'WQ9217689','LH1849'),
(17,'PL1263841','LH746'),
(18,'OX5420922','LH4817'),
(19,'YK9258505','LH132'),
(20,'XQ4423754','LH9677'),
(21,'SU3907341','LH9703'),
(22,'UD8407210','AI3335'),
(23,'QJ9214178','AI6442'),
(24,'KC6673129','AI2475'),
(25,'KU5721446','AI3050'),
(26,'XY7046503','AI8332'),
(27,'RD2682743','AI6714'),
(28,'TC3452638','AI7572'),
(29,'DT4407733','AI7850'),
(30,'KM1425225','AI8755'),
(31,'NG7481334','AI7822'),
(32,'LM4139097','DL5084'),
(33,'MJ9239285','DL3669'),
(34,'JJ5502642','DL1278'),
(35,'EV2528933','DL5275'),
(36,'RH2706156','DL3597'),
(37,'DH3685729','DL4101'),
(38,'LJ8074933','DL8366'),
(39,'IT7769851','DL1267'),
(40,'AJ5443066','AA4003'),
(41,'HR8368454','AA8202'),
(42,'XE3234766','AA5328'),
(43,'EU9904230','AA101'),
(44,'CC8635978','AA5326'),
(45,'GD1179060','AA3325'),
(46,'KU5073332','BA1283'),
(47,'WF7549247','BA1703'),
(48,'JF5838129','BA335'),
(49,'JA3195948','BA7683'),
(50,'SI9623534','BA7156'),
(51,'DX8219751','BA1439'),
(52,'IC6079857','BA4301'),
(53,'YA1046435','BA1176'),
(54,'KU6635734','LH9763'),
(55,'CL6244579','LH1849'),
(56,'VK8341959','LH746'),
(57,'QP1103996','LH4817'),
(58,'UV3996257','LH132'),
(59,'LI9031495','LH9677'),
(60,'CW9876001','LH9703'),
(61,'VF3623601','AI3335'),
(62,'VK6748993','AI6442'),
(63,'OE1469067','AI2475'),
(64,'UJ5514092','AI3050'),
(65,'ZG2572886','AI8332'),
(66,'VT5648027','AI6714'),
(67,'SK5542133','AI7572'),
(68,'PT1173406','AI7850'),
(69,'JO9932456','AI8755'),
(70,'ER8094785','AI7822'),
(71,'GR8364545','DL5084'),
(72,'RM3522332','DL3669'),
(73,'JI3763193','DL1278'),
(74,'MA4789163','DL5275'),
(75,'FC7561993','DL3597'),
(76,'ZG2572886','DL4101'),
(77,'VT5648027','DL8366'),
(78,'SK5542133','DL1267'),
(79,'NG7481334','AI7850'),
(80,'LM4139097','AI8755'),
(81,'MJ9239285','AI7822'),
(82,'JJ5502642','DL5084'),
(83,'EV2528933','DL3669'),
(84,'RH2706156','DL1278');
CREATE TABLE TICKET_BOOKING
(TicketID BIGINT PRIMARY KEY,
PassengerID INT,
PassportNo VARCHAR(10),
DateOfBooking DATE,
Source VARCHAR(3),
Destination VARCHAR(3),
DateOfTravel DATE,
SeatNo VARCHAR(5),
Class VARCHAR(15),
FOREIGN KEY(PassengerID, PassportNo)
REFERENCES PASSENGER_FLIGHT_INFO(PID, PassportNo)
ON DELETE CASCADE);
INSERT INTO TICKET_BOOKING
(TicketID,PassengerID,PassportNo,DateOfBooking,Source,Destination,DateOfTravel,SeatNo,Class)
VALUES
(1324228527316,2,'CB6437135','2019-08-29','LHR','ORD','2020-12-22','3H','Business'),
(1441377715750,3,'QI5053797','2019-12-10','ORD','DFW','2020-09-29','4A','Business'),
(1903444195471,8,'RS9391669','2020-04-22','ORD','DFW','2020-11-20','2F','Business'),
(2628673880705,12,'HV5532153','2019-11-22','CDG','BOM','2020-09-04','1G','Business'),
(3473796368888,23,'QJ9214178','2020-02-25','DFW','SFO','2020-05-18','8H','Business'),
(3672671224992,25,'KU5721446','2019-11-18','DFW','SFO','2020-08-23','6D','Business'),
(3896388601659,28,'TC3452638','2020-01-23','CDG','BOM','2020-12-17','5E','Business'),
(3926918367547,29,'DT4407733','2020-03-15','BOM','DFW','2020-10-23','10H','Business'),
(5561560069548,40,'AJ5443066','2019-11-09','DEL','LHR','2020-08-08','9F','Business'),
(5617328508832,41,'HR8368454','2020-02-25','LHR','ORD','2020-12-22','4B','Business'),
(6002377348079,45,'GD1179060','2019-09-24','JFK','CDG','2020-11-25','4A','Business'),
(6020740800184,46,'KU5073332','2019-08-15','LHR','ORD','2020-06-16','8A','Business'),
(6171448802748,48,'JF5838129','2019-10-12','DFW','SFO','2020-11-02','5A','Business'),
(6366837314333,50,'SI9623534','2019-11-28','JFK','CDG','2020-12-17','1H','Business'),
(6478946268138,52,'IC6079857','2019-08-29','BOM','DEL','2020-08-21','7H','Business'),
(6684629024629,55,'CL6244579','2019-09-01','DEL','JFK','2020-06-29','2D','Business'),
(6702309134236,56,'VK8341959','2019-12-07','JFK','CDG','2020-07-22','30C','Economy'),
(6730972733241,57,'QP1103996','2020-04-08','CDG','BOM','2020-06-08','57F','Economy'),
(6887991208301,59,'LI9031495','2020-02-26','DEL','LHR','2020-12-18','52B','Economy'),
(6910878489354,60,'CW9876001','2020-04-03','LHR','ORD','2020-05-20','46C','Economy'),
(7477390685408,64,'UJ5514092','2020-02-06','DFW','SFO','2020-08-23','25C','Economy'),
(7701625607867,65,'ZG2572886','2020-02-13','SFO','JFK','2020-06-20','24I','Economy'),
(8249927116148,72,'RM3522332','2020-04-24','DFW','SFO','2020-05-06','57I','Economy'),
(8291063577819,73,'JI3763193','2020-03-13','SFO','JFK','2020-09-13','21I','Economy'),
(8292411648748,74,'MA4789163','2020-04-03','JFK','CDG','2020-11-08','59G','Economy'),
(8643510972874,79,'NG7481334','2019-09-26','BOM','DFW','2020-10-23','25G','Economy'),
(8785454997978,81,'MJ9239285','2019-12-30','DEL','LHR','2020-05-17','25B','Economy'),
(1871287189721,6,'LN7067611','2019-10-13','JFK','CDG','2020-11-25','47E','Economy'),
(2241400044111,11,'ML1553284','2019-08-25','JFK','CDG','2020-12-17','15F','Economy'),
(2682211023511,13,'WL9599046','2019-12-17','BOM','DEL','2020-08-21','43B','Economy'),
(2778809175035,15,'JS4628933','2020-02-26','BOM','DEL','2020-12-21','30E','Economy'),
(2957515526205,16,'WQ9217689','2019-09-26','DEL','JFK','2020-06-29','22I','Economy'),
(3000793171878,17,'PL1263841','2019-12-25','JFK','CDG','2020-07-22','44A','Economy'),
(3057633205811,18,'OX5420922','2020-04-26','CDG','BOM','2020-06-08','26I','Economy'),
(3076904872712,19,'YK9258505','2020-01-19','BOM','DEL','2020-07-01','50I','Economy'),
(3098231392732,20,'XQ4423754','2019-10-24','DEL','LHR','2020-12-18','10C','Economy'),
(3465055140021,22,'UD8407210','2019-08-12','ORD','DFW','2020-06-07','29H','Economy'),
(3624835806841,24,'KC6673129','2019-12-18','SFO','DFW','2020-06-16','29G','Economy'),
(3816948997671,26,'XY7046503','2019-12-21','SFO','JFK','2020-06-20','36F','Economy'),
(4134975599132,30,'KM1425225','2019-11-29','BOM','DEL','2020-08-15','48I','Economy'),
(5107573637659,36,'RH2706156','2019-08-09','CDG','BOM','2020-10-21','50E','Economy'),
(5236735259733,37,'DH3685729','2019-10-27','BOM','DEL','2020-07-21','18F','Economy'),
(5241579290057,38,'LJ8074933','2020-01-28','DEL','JFK','2020-08-09','51I','Economy'),
(5648218688105,42,'XE3234766','2020-03-10','ORD','DFW','2020-09-29','40C','Economy'),
(6372524433812,51,'DX8219751','2020-02-21','CDG','BOM','2020-09-04','59G','Economy'),
(6493870919109,53,'YA1046435','2020-04-26','DEL','LHR','2020-08-08','53I','Economy'),
(7350148466903,62,'VK6748993','2020-04-17','DFW','SFO','2020-05-18','25A','Economy'),
(7728812093999,66,'VT5648027','2020-02-28','JFK','CDG','2020-11-22','49A','Economy'),
(8068377276154,69,'JO9932456','2020-03-09','BOM','DEL','2020-08-15','48F','Economy'),
(8224452209930,71,'GR8364545','2020-03-03','LHR','DFW','2020-08-22','33D','Economy'),
(8377785062038,76,'ZG2572886','2019-09-23','BOM','DEL','2020-07-21','56G','Economy'),
(8552960872897,78,'SK5542133','2019-08-22','JFK','CDG','2020-10-30','43C','Economy'),
(8707140155660,80,'LM4139097','2019-08-10','BOM','DEL','2020-08-15','13E','Economy'),
(8927303019275,82,'JJ5502642','2019-11-05','LHR','DFW','2020-08-22','46D','Economy'),
(8954081256714,83,'EV2528933','2019-12-23','DFW','SFO','2020-05-06','59C','Economy'),
(1189617150601,1,'GM7446599','2019-08-23','DEL','LHR','2020-08-08','59H','Economy'),
(1460752404195,4,'LO3019859','2019-10-27','DFW','SFO','2020-06-05','13B','Economy'),
(1642773847629,5,'UZ1685752','2020-01-15','SFO','JFK','2020-06-09','51B','Economy'),
(1886367138513,7,'FS8459636','2019-12-31','LHR','ORD','2020-06-16','15G','Economy'),
(1965548606550,9,'KU5070046','2020-01-07','DFW','SFO','2020-11-02','23H','Economy'),
(2105969390730,10,'IG6471113','2019-12-28','SFO','JFK','2020-11-14','39E','Economy'),
(2759578947436,14,'EW6355081','2019-08-19','DEL','LHR','2020-08-08','34H','Economy'),
(3420011347715,21,'SU3907341','2020-03-16','LHR','ORD','2020-05-20','59E','Economy'),
(3853650721446,27,'RD2682743','2020-01-07','JFK','CDG','2020-11-22','36H','Economy'),
(4155336349944,31,'NG7481334','2019-11-23','DEL','LHR','2020-05-17','59G','Economy'),
(4270999804484,32,'LM4139097','2019-08-22','LHR','DFW','2020-08-22','23H','Economy'),
(4582669694333,33,'MJ9239285','2020-02-18','DFW','SFO','2020-05-06','60G','Economy'),
(4711436278425,34,'JJ5502642','2019-09-16','SFO','JFK','2020-09-13','32B','Economy'),
(4975357054074,35,'EV2528933','2019-08-31','JFK','CDG','2020-11-08','58F','Economy'),
(5370967577637,39,'IT7769851','2020-04-14','JFK','CDG','2020-10-30','44C','Economy'),
(5657307215733,43,'EU9904230','2020-02-27','DFW','SFO','2020-06-05','18B','Economy'),
(5991260458487,44,'CC8635978','2019-12-03','SFO','JFK','2020-06-09','44G','Economy'),
(6040574360791,47,'WF7549247','2019-10-21','ORD','DFW','2020-11-20','40E','Economy'),
(6241752325698,49,'JA3195948','2019-09-19','SFO','JFK','2020-11-14','56A','Economy'),
(6650089518749,54,'KU6635734','2019-08-26','BOM','DEL','2020-12-21','13A','Economy'),
(6734351793673,58,'UV3996257','2020-04-18','BOM','DEL','2020-07-01','9A','First-class'),
(6995145679843,61,'VF3623601','2019-12-30','ORD','DFW','2020-06-07','5C','First-class'),
(7427419072368,63,'OE1469067','2019-10-07','SFO','DFW','2020-06-16','2D','First-class'),
(7877706762111,67,'SK5542133','2019-09-10','CDG','BOM','2020-12-17','8C','First-class'),
(8052957737357,68,'PT1173406','2020-04-08','BOM','DFW','2020-10-23','9E','First-class'),
(8105700971055,70,'ER8094785','2020-01-19','DEL','LHR','2020-05-17','5C','First-class'),
(8351659682775,75,'FC7561993','2020-01-29','CDG','BOM','2020-10-21','2I','First-class'),
(8429865275095,77,'VT5648027','2019-11-21','DEL','JFK','2020-08-09','7F','First-class'),
(9274439529260,84,'RH2706156','2019-08-06','SFO','JFK','2020-09-13','2F','First-class');
CREATE TABLE CANCELLATION
(TicketID BIGINT PRIMARY KEY,
DateOfCancellation DATE,
FOREIGN KEY(TicketID)
REFERENCES TICKET_BOOKING(TicketID)
ON DELETE CASCADE);
INSERT INTO CANCELLATION
(TicketID,DateOfCancellation)
VALUES
(3896388601659,'2020-01-30'),
(3926918367547,'2020-03-24'),
(5561560069548,'2020-03-09'),
(5617328508832,'2020-02-29'),
(6002377348079,'2020-03-24'),
(6020740800184,'2020-03-15'),
(6171448802748,'2020-02-12'),
(6366837314333,'2020-02-28'),
(6478946268138,'2020-03-29'),
(6684629024629,'2020-03-01'),
(6702309134236,'2020-02-07'),
(6730972733241,'2020-04-20'),
(6887991208301,'2020-03-26'),
(6910878489354,'2020-04-20'),
(7477390685408,'2020-04-06'),
(7701625607867,'2020-04-13'),
(8249927116148,'2020-04-29');