-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcs4400_phase3_limited_autograder_v0 (1).sql
2262 lines (2144 loc) · 102 KB
/
cs4400_phase3_limited_autograder_v0 (1).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
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- CS4400: Introduction to Database Systems: Monday, July 1, 2024
-- Cruise Tracking Course Project: Limited Autograder [v3] OPEN to STUDENTS
/* This is a standard preamble for most of our scripts. The intent is to establish
a consistent environment for the database behavior. */
set global transaction isolation level serializable;
set global SQL_MODE = 'ANSI,TRADITIONAL';
set names utf8mb4;
set SQL_SAFE_UPDATES = 0;
set @thisDatabase = 'cruise_tracking';
use cruise_tracking;
-- ----------------------------------------------------------------------------------
-- [1] Implement a capability to reset the database state easily
-- ----------------------------------------------------------------------------------
drop procedure if exists magic44_reset_database_state;
delimiter //
create procedure magic44_reset_database_state ()
begin
-- Purge and then reload all of the database rows back into the tables.
-- Ensure that the data is deleted in reverse order with respect to the
-- foreign key dependencies (i.e., from children up to parents).
delete from licenses;
delete from crew;
delete from route_path;
delete from passenger_books;
delete from cruise;
delete from leg;
delete from route;
delete from person_occupies;
delete from passenger;
delete from person;
delete from ship_port;
delete from ship;
delete from location;
delete from cruiseline;
-- Ensure that the data is inserted in order with respect to the
-- foreign key dependencies (i.e., from parents down to children).
insert into cruiseline values ('Royal Caribbean');
insert into cruiseline values ('Carnival');
insert into cruiseline values ('Norwegian');
insert into cruiseline values ('MSC');
insert into cruiseline values ('Princess');
insert into cruiseline values ('Celebrity');
insert into cruiseline values ('Disney');
insert into cruiseline values ('Holland America');
insert into cruiseline values ('Costa');
insert into cruiseline values ('P&O Cruises');
insert into cruiseline values ('AIDA');
insert into cruiseline values ('Viking Ocean');
insert into cruiseline values ('Silversea');
insert into cruiseline values ('Regent');
insert into cruiseline values ('Oceania');
insert into cruiseline values ('Seabourn');
insert into cruiseline values ('Cunard');
insert into cruiseline values ('Azamara');
insert into cruiseline values ('Windstar');
insert into cruiseline values ('Hurtigruten');
insert into cruiseline values ('Paul Gauguin Cruises');
insert into cruiseline values ('Celestyal Cruises');
insert into cruiseline values ('Saga Cruises');
insert into cruiseline values ('Ponant');
insert into cruiseline values ('Star Clippers');
insert into cruiseline values ('Marella Cruises');
insert into location values ('ship_1');
insert into location values ('ship_2');
insert into location values ('ship_3');
insert into location values ('ship_4');
insert into location values ('ship_5');
insert into location values ('ship_6');
insert into location values ('ship_7');
insert into location values ('ship_8');
insert into location values ('ship_9');
insert into location values ('ship_10');
insert into location values ('ship_11');
insert into location values ('ship_12');
insert into location values ('ship_13');
insert into location values ('ship_14');
insert into location values ('ship_15');
insert into location values ('ship_16');
insert into location values ('ship_17');
insert into location values ('ship_18');
insert into location values ('ship_19');
insert into location values ('ship_20');
insert into location values ('ship_21');
insert into location values ('ship_22');
insert into location values ('ship_23');
insert into location values ('ship_24');
insert into location values ('ship_25');
insert into location values ('ship_26');
insert into location values ('ship_27');
insert into location values ('port_1');
insert into location values ('port_2');
insert into location values ('port_3');
insert into location values ('port_4');
insert into location values ('port_5');
insert into location values ('port_6');
insert into location values ('port_7');
insert into location values ('port_8');
insert into location values ('port_9');
insert into location values ('port_10');
insert into location values ('port_11');
insert into location values ('port_12');
insert into location values ('port_13');
insert into location values ('port_14');
insert into location values ('port_15');
insert into location values ('port_16');
insert into location values ('port_17');
insert into location values ('port_18');
insert into location values ('port_19');
insert into location values ('port_20');
insert into location values ('port_21');
insert into location values ('port_22');
insert into location values ('port_23');
insert into ship values ('Royal Caribbean', 'Symphony of the Seas', 6680, 22, 'ship_1', 'ocean_liner', null, 20);
insert into ship values ('Carnival', 'Carnival Vista', 3934, 23, 'ship_23', 'ocean_liner', null, 2);
insert into ship values ('Norwegian', 'Norwegian Bliss', 4004, 22.5, 'ship_24', 'ocean_liner', null, 15);
insert into ship values ('MSC', 'Meraviglia', 4488, 22.7, 'ship_22', 'ocean_liner', null, 20);
insert into ship values ('Princess', 'Crown Princess', 3080, 23, 'ship_5', 'ocean_liner', null, 20);
insert into ship values ('Celebrity', 'Celebrity Edge', 2908, 22, 'ship_6', 'ocean_liner', null, 20);
insert into ship values ('Disney', 'Disney Dream', 4000, 23.5, 'ship_7', 'ocean_liner', null, 20);
insert into ship values ('Holland America', 'MS Nieuw Statendam', 2666, 23, 'ship_8', 'ocean_liner', null, 30);
insert into ship values ('Costa', 'Costa Smeralda', 6554, 23, 'ship_2', null, null, null);
insert into ship values ('P&O Cruises', 'Iona', 5200, 22.6, 'ship_3', 'ocean_liner', null, 20);
insert into ship values ('AIDA', 'AIDAnova', 6600, 21.5, 'ship_4', 'ocean_liner', null, 35);
insert into ship values ('Viking Ocean', 'Viking Orion', 930, 20, 'ship_9', 'ocean_liner', null, 20);
insert into ship values ('Silversea', 'Silver Muse', 596, 19.8, 'ship_13', 'ocean_liner', null, 30);
insert into ship values ('Regent', 'Seven Seas Explorer', 750, 19.5, 'ship_10', 'ocean_liner', null, 20);
insert into ship values ('Oceania', 'Marina', 1250, 20, 'ship_11', 'ocean_liner', null, 25);
insert into ship values ('Seabourn', 'Seabourn Ovation', 604, 19, 'ship_12', 'ocean_liner', null, 20);
insert into ship values ('Cunard', 'Queen Mary 2', 2691, 30, 'ship_14', 'ocean_liner', null, 40);
insert into ship values ('Azamara', 'Azamara Quest', 686, 18.5, 'ship_18', 'river', true, null);
insert into ship values ('Royal Caribbean', 'Oasis of the Seas', 1325, 18, 'ship_25', 'ocean_liner', null, 30);
insert into ship values ('Windstar', 'Wind Surf', 342, 15, 'ship_20', 'river', false, null);
insert into ship values ('Hurtigruten', 'MS Roald Amundsen', 530, 15.5, 'ship_21', 'ocean_liner', null, 10);
insert into ship values ('Paul Gauguin Cruises', 'Paul Gauguin', 332, 18, 'ship_15', null, null, null);
insert into ship values ('Celestyal Cruises', 'Celestyal Crystal', 1200, 18.5, 'ship_16', 'river', false, null);
insert into ship values ('Saga Cruises', 'Spirit of Discovery', 999, 21, 'ship_17', 'ocean_liner', null, 2);
insert into ship values ('Ponant', 'Le Lyrial', 264, 16, 'ship_26', 'river', true, null);
insert into ship values ('Star Clippers', 'Royal Clipper', 227, 17, 'ship_19', 'river', true, null);
insert into ship values ('Marella Cruises', 'Marella Explorer', 1924, 21.5, 'ship_27', 'ocean_liner', null, 2);
insert into ship_port values ('MIA', 'Port of Miami', 'Miami', 'Florida', 'USA', 'port_1');
insert into ship_port values ('EGS', 'Port Everglades', 'Fort Lauderdale', 'Florida', 'USA', 'port_2');
insert into ship_port values ('CZL', 'Port of Cozumel', 'Cozumel', 'Quintana Roo', 'MEX', 'port_3');
insert into ship_port values ('CNL', 'Port Canaveral', 'Cape Canaveral', 'Florida', 'USA', 'port_4');
insert into ship_port values ('NSU', 'Port of Nassau', 'Nassau', 'New Providence ', 'BHS', 'port_5');
insert into ship_port values ('BCA', 'Port of Barcelona', 'Barcelona', 'Catalonia', 'ESP', 'port_6');
insert into ship_port values ('CVA', 'Port of Civitavecchia', 'Civitavecchia', 'Lazio', 'ITA', 'port_7');
insert into ship_port values ('VEN', 'Port of Venice', 'Venice', 'Veneto', 'ITA', 'port_14');
insert into ship_port values ('SHA', 'Port of Southampton', 'Southhampton', 'Hampshire', 'GBR', 'port_8');
insert into ship_port values ('GVN', 'Port of Galveston', 'Galveston', 'Texas', 'USA', 'port_10');
insert into ship_port values ('SEA', 'Port of Seattle', 'Seattle', 'Washington', 'USA', 'port_11');
insert into ship_port values ('SJN', 'Port of San Juan', 'San Juan', 'Puerto Rico', 'USA', 'port_12');
insert into ship_port values ('NOS', 'Port of New Orleans', 'New Orleans', 'Louisiana', 'USA', 'port_13');
insert into ship_port values ('SYD', 'Port of Sydney', 'Sydney', 'New South Wales', 'AUS', 'port_9');
insert into ship_port values ('TMP', 'Port of Tampa Bay', 'Tampa Bay', 'Florida', 'USA', 'port_15');
insert into ship_port values ('VAN', 'Port of Vancouver', 'Vancouver', 'British Columbia', 'CAN', 'port_16');
insert into ship_port values ('MAR', 'Port of Marseille', 'Marseille', 'Provence-Alpes-Côte d\'Azur', 'FRA', 'port_17');
insert into ship_port values ('COP', 'Port of Copenhagen', 'Copenhagen', 'Hovedstaden', 'DEN', 'port_18');
insert into ship_port values ('BRI', 'Port of Bridgetown', 'Bridgetown', 'Saint Michael', 'BRB', 'port_19');
insert into ship_port values ('PIR', 'Port of Piraeus', 'Piraeus', 'Attica', 'GRC', 'port_20');
insert into ship_port values ('STS', 'Port of St. Thomas', 'Charlotte Amalie', 'St. Thomas', 'USV', 'port_21');
insert into ship_port values ('STM', 'Port of Stockholm', 'Stockholm', 'Stockholm County', 'SWE', 'port_22');
insert into ship_port values ('LAS', 'Port of Los Angeles', 'Los Angeles', 'California', 'USA', 'port_23');
insert into person values ('p0', 'Martin', 'van Basten');
insert into person values ('p1', 'Jeanne', 'Nelson');
insert into person values ('p2', 'Roxanne', 'Byrd');
insert into person values ('p3', 'Tanya', 'Nguyen');
insert into person values ('p4', 'Kendra', 'Jacobs');
insert into person values ('p5', 'Jeff', 'Burton');
insert into person values ('p6', 'Randal', 'Parks');
insert into person values ('p7', 'Sonya', 'Owens');
insert into person values ('p8', 'Bennie', 'Palmer');
insert into person values ('p9', 'Marlene', 'Warner');
insert into person values ('p10', 'Lawrence', 'Morgan');
insert into person values ('p11', 'Sandra', 'Cruz');
insert into person values ('p12', 'Dan', 'Ball');
insert into person values ('p13', 'Bryant', 'Figueroa');
insert into person values ('p14', 'Dana', 'Perry');
insert into person values ('p15', 'Matt', 'Hunt');
insert into person values ('p16', 'Edna', 'Brown');
insert into person values ('p17', 'Ruby', 'Burgess');
insert into person values ('p18', 'Esther', 'Pittman');
insert into person values ('p19', 'Doug', 'Fowler');
insert into person values ('p20', 'Thomas', 'Olson');
insert into person values ('p21', 'Mona', 'Harrison');
insert into person values ('p22', 'Arlene', 'Massey');
insert into person values ('p23', 'Judith', 'Patrick');
insert into person values ('p24', 'Reginald', 'Rhodes');
insert into person values ('p25', 'Vincent', 'Garcia');
insert into person values ('p26', 'Cheryl', 'Moore');
insert into person values ('p27', 'Michael', 'Rivera');
insert into person values ('p28', 'Luther', 'Matthews');
insert into person values ('p29', 'Moses', 'Parks');
insert into person values ('p30', 'Ora', 'Steele');
insert into person values ('p31', 'Antonio', 'Flores');
insert into person values ('p32', 'Glenn', 'Ross');
insert into person values ('p33', 'Irma', 'Thomas');
insert into person values ('p34', 'Ann', 'Maldonado');
insert into person values ('p35', 'Jeffrey', 'Cruz');
insert into person values ('p36', 'Sonya', 'Price');
insert into person values ('p37', 'Tracy', 'Hale');
insert into person values ('p38', 'Albert', 'Simmons');
insert into person values ('p39', 'Karen', 'Terry');
insert into person values ('p40', 'Glen', 'Kelley');
insert into person values ('p41', 'Brooke', 'Little');
insert into person values ('p42', 'Daryl', 'Nguyen');
insert into person values ('p43', 'Judy', 'Willis');
insert into person values ('p44', 'Marco', 'Klein');
insert into person values ('p45', 'Angelica', 'Hampton');
insert into person values ('p46', 'Peppermint', 'Patty');
insert into person values ('p47', 'Charlie', 'Brown');
insert into person values ('p48', 'Lucy', 'van Pelt');
insert into person values ('p49', 'Linus', 'van Pelt');
insert into passenger values ('p21', 771, 700);
insert into passenger values ('p22', 374, 200);
insert into passenger values ('p23', 414, 400);
insert into passenger values ('p24', 292, 500);
insert into passenger values ('p25', 390, 300);
insert into passenger values ('p26', 302, 600);
insert into passenger values ('p27', 470, 400);
insert into passenger values ('p28', 208, 400);
insert into passenger values ('p29', 292, 700);
insert into passenger values ('p30', 686, 500);
insert into passenger values ('p31', 547, 400);
insert into passenger values ('p32', 257, 500);
insert into passenger values ('p33', 564, 600);
insert into passenger values ('p34', 211, 200);
insert into passenger values ('p35', 233, 500);
insert into passenger values ('p36', 293, 400);
insert into passenger values ('p37', 552, 700);
insert into passenger values ('p38', 812, 700);
insert into passenger values ('p39', 541, 400);
insert into passenger values ('p40', 441, 700);
insert into passenger values ('p41', 875, 300);
insert into passenger values ('p42', 691, 500);
insert into passenger values ('p43', 572, 300);
insert into passenger values ('p44', 572, 500);
insert into passenger values ('p45', 663, 500);
insert into passenger values ('p46', 1002, 300);
insert into passenger values ('p47', 4000, 800);
insert into passenger values ('p48', 244, 650);
insert into person_occupies values ('p21', 'ship_1');
insert into person_occupies values ('p22', 'ship_1');
insert into person_occupies values ('p23', 'ship_1');
insert into person_occupies values ('p24', 'ship_1');
insert into person_occupies values ('p1', 'ship_1');
insert into person_occupies values ('p2', 'ship_1');
insert into person_occupies values ('p12', 'ship_1');
insert into person_occupies values ('p25', 'ship_23');
insert into person_occupies values ('p26', 'ship_23');
insert into person_occupies values ('p27', 'ship_23');
insert into person_occupies values ('p28', 'ship_23');
insert into person_occupies values ('p3', 'ship_23');
insert into person_occupies values ('p4', 'ship_23');
insert into person_occupies values ('p29', 'ship_7');
insert into person_occupies values ('p6', 'ship_7');
insert into person_occupies values ('p0', 'port_1');
insert into person_occupies values ('p29', 'port_1');
insert into person_occupies values ('p30', 'port_1');
insert into person_occupies values ('p31', 'port_1');
insert into person_occupies values ('p32', 'port_1');
insert into person_occupies values ('p5', 'port_1');
insert into person_occupies values ('p6', 'port_1');
insert into person_occupies values ('p33', 'ship_24');
insert into person_occupies values ('p34', 'ship_24');
insert into person_occupies values ('p35', 'ship_24');
insert into person_occupies values ('p36', 'ship_24');
insert into person_occupies values ('p7', 'ship_24');
insert into person_occupies values ('p9', 'ship_24');
insert into person_occupies values ('p15', 'ship_24');
insert into person_occupies values ('p10', 'ship_24');
insert into person_occupies values ('p37', 'ship_26');
insert into person_occupies values ('p38', 'ship_26');
insert into person_occupies values ('p39', 'ship_26');
insert into person_occupies values ('p40', 'ship_26');
insert into person_occupies values ('p11', 'ship_26');
insert into person_occupies values ('p13', 'ship_26');
insert into person_occupies values ('p14', 'ship_26');
insert into person_occupies values ('p41', 'ship_25');
insert into person_occupies values ('p42', 'ship_25');
insert into person_occupies values ('p43', 'ship_25');
insert into person_occupies values ('p44', 'ship_25');
insert into person_occupies values ('p16', 'ship_25');
insert into person_occupies values ('p17', 'ship_25');
insert into person_occupies values ('p18', 'ship_25');
insert into person_occupies values ('p41', 'port_14');
insert into person_occupies values ('p42', 'port_14');
insert into person_occupies values ('p43', 'port_14');
insert into person_occupies values ('p44', 'port_14');
insert into person_occupies values ('p16', 'port_14');
insert into person_occupies values ('p17', 'port_14');
insert into person_occupies values ('p18', 'port_14');
insert into person_occupies values ('p8', 'ship_21');
insert into person_occupies values ('p19', 'ship_21');
insert into person_occupies values ('p20', 'ship_21');
insert into person_occupies values ('p45', 'port_7');
insert into person_occupies values ('p46', 'port_7');
insert into person_occupies values ('p47', 'port_7');
insert into person_occupies values ('p48', 'port_7');
insert into person_occupies values ('p8', 'port_7');
insert into person_occupies values ('p19', 'port_7');
insert into person_occupies values ('p20', 'port_7');
insert into leg values ('leg_1', 792, 'NSU', 'SJN');
insert into leg values ('leg_2', 190, 'MIA', 'NSU');
insert into leg values ('leg_31', 1139, 'LAS', 'SEA');
insert into leg values ('leg_4', 29, 'MIA', 'EGS');
insert into leg values ('leg_14', 126, 'SEA', 'VAN');
insert into leg values ('leg_15', 312, 'MAR', 'CVA');
insert into leg values ('leg_27', 941, 'CVA', 'VEN');
insert into leg values ('leg_33', 855, 'VEN', 'PIR');
insert into leg values ('leg_47', 185, 'BCA', 'MAR');
insert into leg values ('leg_64', 427, 'STM', 'COP');
insert into leg values ('leg_78', 803, 'COP', 'SHA');
insert into route values ('americas_one');
insert into route values ('americas_three');
insert into route values ('americas_two');
insert into route values ('big_mediterranean_loop');
insert into route values ('euro_north');
insert into route values ('euro_south');
insert into route_path values ('americas_one', 'leg_2', 1);
insert into route_path values ('americas_one', 'leg_1', 2);
insert into route_path values ('americas_three', 'leg_31', 1);
insert into route_path values ('americas_three', 'leg_14', 2);
insert into route_path values ('americas_two', 'leg_4', 1);
insert into route_path values ('big_mediterranean_loop', 'leg_47', 1);
insert into route_path values ('big_mediterranean_loop', 'leg_15', 2);
insert into route_path values ('big_mediterranean_loop', 'leg_27', 3);
insert into route_path values ('big_mediterranean_loop', 'leg_33', 4);
insert into route_path values ('euro_north', 'leg_64', 1);
insert into route_path values ('euro_north', 'leg_78', 2);
insert into route_path values ('euro_south', 'leg_47', 1);
insert into route_path values ('euro_south', 'leg_15', 2);
insert into cruise values ('rc_10', 'americas_one', 'Royal Caribbean', 'Symphony of the Seas', 1, 'sailing', '08:00:00', 200);
insert into cruise values ('cn_38', 'americas_three', 'Carnival', 'Carnival Vista', 2, 'sailing', '14:30:00', 200);
insert into cruise values ('dy_61', 'americas_two', 'Disney', 'Disney Dream', 0, 'docked', '09:30:00', 200);
insert into cruise values ('nw_20', 'euro_north', 'Norwegian', 'Norwegian Bliss', 2, 'sailing', '11:00:00', 300);
insert into cruise values ('pn_16', 'euro_south', 'Ponant', 'Le Lyrial', 1, 'sailing', '14:00:00', 400);
insert into cruise values ('rc_51', 'big_mediterranean_loop', 'Royal Caribbean', 'Oasis of the Seas', 3, 'docked', '11:30:00', 100);
insert into cruise values ('hg_99', 'euro_south', 'Hurtigruten', 'MS Roald Amundsen', 2, 'docked', '12:30:00', 150);
insert into cruise values ('mc_47', 'euro_south', 'Cunard', 'Queen Mary 2', 2, 'docked', '14:30:00', 150);
insert into passenger_books values ('p21', 'rc_10');
insert into passenger_books values ('p22', 'rc_10');
insert into passenger_books values ('p23', 'rc_10');
insert into passenger_books values ('p24', 'rc_10');
insert into passenger_books values ('p25', 'cn_38');
insert into passenger_books values ('p26', 'cn_38');
insert into passenger_books values ('p27', 'cn_38');
insert into passenger_books values ('p28', 'cn_38');
insert into passenger_books values ('p29', 'dy_61');
insert into passenger_books values ('p30', 'dy_61');
insert into passenger_books values ('p31', 'dy_61');
insert into passenger_books values ('p32', 'dy_61');
insert into passenger_books values ('p33', 'nw_20');
insert into passenger_books values ('p34', 'nw_20');
insert into passenger_books values ('p35', 'nw_20');
insert into passenger_books values ('p36', 'nw_20');
insert into passenger_books values ('p37', 'pn_16');
insert into passenger_books values ('p38', 'pn_16');
insert into passenger_books values ('p39', 'pn_16');
insert into passenger_books values ('p40', 'pn_16');
insert into passenger_books values ('p41', 'rc_51');
insert into passenger_books values ('p42', 'rc_51');
insert into passenger_books values ('p43', 'rc_51');
insert into passenger_books values ('p44', 'rc_51');
insert into passenger_books values ('p45', 'hg_99');
insert into passenger_books values ('p46', 'hg_99');
insert into passenger_books values ('p47', 'hg_99');
insert into passenger_books values ('p48', 'hg_99');
insert into crew values ('p0', '560-14-7807', 20, null);
insert into crew values ('p1', '330-12-6907', 31, 'rc_10');
insert into crew values ('p2', '842-88-1257', 9, 'rc_10');
insert into crew values ('p12', '680-92-5329', 24, 'rc_10');
insert into crew values ('p3', '750-24-7616', 11, 'cn_38');
insert into crew values ('p4', '776-21-8098', 24, 'cn_38');
insert into crew values ('p5', '933-93-2165', 27, 'dy_61');
insert into crew values ('p6', '707-84-4555', 38, 'dy_61');
insert into crew values ('p7', '450-25-5617', 13, 'nw_20');
insert into crew values ('p9', '936-44-6941', 13, 'nw_20');
insert into crew values ('p15', '153-47-8101', 30, 'nw_20');
insert into crew values ('p10', '769-60-1266', 15, 'nw_20');
insert into crew values ('p11', '369-22-9505', 22, 'pn_16');
insert into crew values ('p13', '513-40-4168', 24, 'pn_16');
insert into crew values ('p14', '454-71-7847', 13, 'pn_16');
insert into crew values ('p16', '598-47-5172', 28, 'rc_51');
insert into crew values ('p17', '865-71-6800', 36, 'rc_51');
insert into crew values ('p18', '250-86-2784', 23, 'rc_51');
insert into crew values ('p8', '701-38-2179', 12, 'hg_99');
insert into crew values ('p19', '386-39-7881', 2, 'hg_99');
insert into crew values ('p20', '522-44-3098', 28, 'hg_99');
insert into licenses values ('p0', 'ocean_liner');
insert into licenses values ('p1', 'ocean_liner');
insert into licenses values ('p2', 'river');
insert into licenses values ('p2', 'ocean_liner');
insert into licenses values ('p3', 'ocean_liner');
insert into licenses values ('p4', 'ocean_liner');
insert into licenses values ('p4', 'river');
insert into licenses values ('p5', 'ocean_liner');
insert into licenses values ('p6', 'ocean_liner');
insert into licenses values ('p6', 'river');
insert into licenses values ('p7', 'ocean_liner');
insert into licenses values ('p8', 'ocean_liner');
insert into licenses values ('p10', 'ocean_liner');
insert into licenses values ('p11', 'ocean_liner');
insert into licenses values ('p11', 'river');
insert into licenses values ('p12', 'river');
insert into licenses values ('p13', 'river');
insert into licenses values ('p14', 'ocean_liner');
insert into licenses values ('p14', 'river');
insert into licenses values ('p15', 'ocean_liner');
insert into licenses values ('p15', 'river');
insert into licenses values ('p16', 'ocean_liner');
insert into licenses values ('p17', 'ocean_liner');
insert into licenses values ('p17', 'river');
insert into licenses values ('p18', 'ocean_liner');
insert into licenses values ('p19', 'ocean_liner');
insert into licenses values ('p20', 'ocean_liner');
end //
delimiter ;
-- ----------------------------------------------------------------------------------
-- [2] Create views to evaluate the queries & transactions
-- ----------------------------------------------------------------------------------
-- Create one view per original base table and student-created view to be used
-- to evaluate the transaction results.
create or replace view practiceQuery10 as select * from cruiseline;
create or replace view practiceQuery11 as select * from location;
create or replace view practiceQuery12 as select * from ship;
create or replace view practiceQuery13 as select * from ship_port;
create or replace view practiceQuery14 as select * from person;
create or replace view practiceQuery15 as select * from passenger;
create or replace view practiceQuery16 as select * from person_occupies;
create or replace view practiceQuery17 as select * from leg;
create or replace view practiceQuery18 as select * from route;
create or replace view practiceQuery19 as select * from route_path;
create or replace view practiceQuery20 as select * from cruise;
create or replace view practiceQuery21 as select * from passenger_books;
create or replace view practiceQuery22 as select * from crew;
create or replace view practiceQuery23 as select * from licenses;
create or replace view practiceQuery30 as select * from cruises_at_sea;
create or replace view practiceQuery31 as select * from cruises_docked;
create or replace view practiceQuery32 as select * from people_at_sea;
create or replace view practiceQuery33 as select * from people_docked;
create or replace view practiceQuery34 as select * from route_summary;
create or replace view practiceQuery35 as select * from alternative_ports;
-- ----------------------------------------------------------------------------------
-- [3] Prepare to capture the query results for later analysis
-- ----------------------------------------------------------------------------------
-- The magic44_data_capture table is used to store the data created by the student's queries
-- The table is populated by the magic44_evaluate_queries stored procedure
-- The data in the table is used to populate the magic44_test_results table for analysis
drop table if exists magic44_data_capture;
create table magic44_data_capture (
stepID integer, queryID integer,
columnDump0 varchar(1000), columnDump1 varchar(1000), columnDump2 varchar(1000), columnDump3 varchar(1000), columnDump4 varchar(1000),
columnDump5 varchar(1000), columnDump6 varchar(1000), columnDump7 varchar(1000), columnDump8 varchar(1000), columnDump9 varchar(1000),
columnDump10 varchar(1000), columnDump11 varchar(1000), columnDump12 varchar(1000), columnDump13 varchar(1000), columnDump14 varchar(1000)
);
-- The magic44_column_listing table is used to help prepare the insert statements for the magic44_data_capture
-- table for the student's queries which may have variable numbers of columns (the table is prepopulated)
drop table if exists magic44_column_listing;
create table magic44_column_listing (
columnPosition integer,
simpleColumnName varchar(50),
nullColumnName varchar(50)
);
insert into magic44_column_listing (columnPosition, simpleColumnName) values
(0, 'columnDump0'), (1, 'columnDump1'), (2, 'columnDump2'), (3, 'columnDump3'), (4, 'columnDump4'),
(5, 'columnDump5'), (6, 'columnDump6'), (7, 'columnDump7'), (8, 'columnDump8'), (9, 'columnDump9'),
(10, 'columnDump10'), (11, 'columnDump11'), (12, 'columnDump12'), (13, 'columnDump13'), (14, 'columnDump14');
drop function if exists magic44_gen_simple_template;
delimiter //
create function magic44_gen_simple_template(numberOfColumns integer)
returns varchar(1000) reads sql data
begin
return (select group_concat(simpleColumnName separator ', ') from magic44_column_listing
where columnPosition < numberOfColumns);
end //
delimiter ;
-- Create a variable to effectively act as a program counter for the testing process/steps
set @stepCounter = 0;
-- The magic44_query_capture function is used to construct the instruction
-- that can be used to execute and store the results of a query
drop function if exists magic44_query_capture;
delimiter //
create function magic44_query_capture(thisQuery integer)
returns varchar(2000) reads sql data
begin
set @numberOfColumns = (select count(*) from information_schema.columns
where table_schema = @thisDatabase
and table_name = concat('practiceQuery', thisQuery));
set @buildQuery = 'insert into magic44_data_capture (stepID, queryID, ';
set @buildQuery = concat(@buildQuery, magic44_gen_simple_template(@numberOfColumns));
set @buildQuery = concat(@buildQuery, ') select ');
set @buildQuery = concat(@buildQuery, @stepCounter, ', ');
set @buildQuery = concat(@buildQuery, thisQuery, ', practiceQuery');
set @buildQuery = concat(@buildQuery, thisQuery, '.* from practiceQuery');
set @buildQuery = concat(@buildQuery, thisQuery, ';');
return @buildQuery;
end //
delimiter ;
drop function if exists magic44_query_exists;
delimiter //
create function magic44_query_exists(thisQuery integer)
returns integer deterministic
begin
return (select exists (select * from information_schema.views
where table_schema = @thisDatabase
and table_name like concat('practiceQuery', thisQuery)));
end //
delimiter ;
-- Exception checking has been implemented to prevent (as much as reasonably possible) errors
-- in the queries being evaluated from interrupting the testing process
-- The magic44_log_query_errors table captures these errors for later review
drop table if exists magic44_log_query_errors;
create table magic44_log_query_errors (
step_id integer,
query_id integer,
query_text varchar(2000),
error_code char(5),
error_message text
);
drop procedure if exists magic44_query_check_and_run;
delimiter //
create procedure magic44_query_check_and_run(in thisQuery integer)
begin
declare err_code char(5) default '00000';
declare err_msg text;
declare continue handler for SQLEXCEPTION
begin
get diagnostics condition 1
err_code = RETURNED_SQLSTATE, err_msg = MESSAGE_TEXT;
end;
declare continue handler for SQLWARNING
begin
get diagnostics condition 1
err_code = RETURNED_SQLSTATE, err_msg = MESSAGE_TEXT;
end;
if magic44_query_exists(thisQuery) then
set @sql_text = magic44_query_capture(thisQuery);
prepare statement from @sql_text;
execute statement;
if err_code <> '00000' then
insert into magic44_log_query_errors values (@stepCounter, thisQuery, @sql_text, err_code, err_msg);
end if;
deallocate prepare statement;
end if;
end //
delimiter ;
-- ----------------------------------------------------------------------------------
-- [4] Organize the testing results by step and query identifiers
-- ----------------------------------------------------------------------------------
drop table if exists magic44_test_case_directory;
create table if not exists magic44_test_case_directory (
base_step_id integer,
number_of_steps integer,
query_label char(20),
query_name varchar(100),
scoring_weight integer
);
insert into magic44_test_case_directory values
(0, 1, '[V_0]', 'initial_state_check', 0),
(20, 1, '[C_1]', 'add_ship', 4),
(40, 1, '[C_2]', 'add_port', 4),
(60, 1, '[C_3]', 'add_person', 4),
(80, 1, '[C_4]', 'grant_or_revoke_crew_license', 4),
(100, 1, '[C_5]', 'offer_cruise', 5),
(120, 1, '[U_1]', 'cruise_arriving', 7),
(140, 1, '[U_2]', 'cruise_departing', 7),
(160, 1, '[U_3]', 'person_boards', 10),
(180, 1, '[U_4]', 'person_disembarks', 10),
(200, 1, '[U_5]', 'assign_crew', 6),
(220, 1, '[R_1]', 'recycle_crew', 5),
(240, 1, '[R_2]', 'retire_cruise', 5),
(280, 1, '[V_1]', 'cruises_at_sea', 5),
(300, 1, '[V_2]', 'cruises_docked', 5),
(320, 1, '[V_3]', 'people_at_sea', 5),
(340, 1, '[V_4]', 'people_docked', 5),
(360, 1, '[V_5]', 'route_summary', 5),
(380, 1, '[V_6]', 'alternative_ports', 4);
drop table if exists magic44_scores_guide;
create table if not exists magic44_scores_guide (
score_tag char(1),
score_category varchar(100),
display_order integer
);
insert into magic44_scores_guide values
('C', 'Create Transactions', 1), ('U', 'Use Case Transactions', 2),
('R', 'Remove Transactions', 3), ('V', 'Global Views/Queries', 4);
-- ----------------------------------------------------------------------------------
-- [5] Test the queries & transactions and store the results
-- ----------------------------------------------------------------------------------
-- ----------------------------------------------------------------------------------
/* Check that the initial state of their database matches the required configuration.
The magic44_reset_database_state() call is deliberately missing in order to evaluate
the state of the submitted database. */
-- ----------------------------------------------------------------------------------
set @stepCounter = 0;
call magic44_query_check_and_run(10); -- cruiseline
call magic44_query_check_and_run(11); -- location
call magic44_query_check_and_run(12); -- ship
call magic44_query_check_and_run(13); -- ship_port
call magic44_query_check_and_run(14); -- person
call magic44_query_check_and_run(15); -- passenger
call magic44_query_check_and_run(16); -- person_occupies
call magic44_query_check_and_run(17); -- leg
call magic44_query_check_and_run(18); -- route
call magic44_query_check_and_run(19); -- route_path
call magic44_query_check_and_run(20); -- cruise
call magic44_query_check_and_run(21); -- passenger_books
call magic44_query_check_and_run(22); -- crew
call magic44_query_check_and_run(23); -- licenses
-- ----------------------------------------------------------------------------------
/* Check the unit test cases here. The magic44_reset_database_state() call is used
for each test to ensure that the database state is set to the initial configuration.
The @stepCounter is set to index the test appropriately, and then the test call is
performed. Finally, calls are made to the appropriate database tables to compare the
actual state changes to the expected state changes per our answer key. */
-- ----------------------------------------------------------------------------------
-- [1] add_ship() SUCCESS case(s)
-- Add test cases that satisfy all guard conditions and change the database state
call magic44_reset_database_state();
set @stepCounter = 20;
call add_ship('Carnival', 'Firenze', 4126, 18, 'ship_41', 'ocean_liner', null, 20);
call magic44_query_check_and_run(12); -- ship
-- [2] add_ship_port() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 40;
call add_port('PDM', 'Port of The Balearic Islands', 'Palma', 'Majorca', 'ESP', 'port_33');
call magic44_query_check_and_run(13); -- ship_port
-- [3] add_person() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 60;
call add_person('p61', 'Sabrina', 'Duncan', 'port_1', '366-50-3732', 27, null, null);
call magic44_query_check_and_run(14); -- person
call magic44_query_check_and_run(16); -- person_occupies
call magic44_query_check_and_run(22); -- crew
call magic44_query_check_and_run(15); -- passenger
-- [4] grant_or_revoke_crew_license() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 80;
call grant_or_revoke_crew_license('p1','river');
call magic44_query_check_and_run(23); -- licenses
-- [5] offer_cruise() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 100;
call offer_cruise('ca_41', 'americas_three', 'Costa', 'Costa Smeralda', 0, '11:30:00', 400);
call magic44_query_check_and_run(20); -- cruise
-- [6] cruise_arriving() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 120;
call cruise_arriving('cn_38');
call magic44_query_check_and_run(22); -- crew
call magic44_query_check_and_run(15); -- passenger
call magic44_query_check_and_run(20); -- cruise
call magic44_query_check_and_run(16); -- person_occupies
-- [7] cruise_departing() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 140;
call cruise_departing('dy_61');
call magic44_query_check_and_run(20); -- cruise
call magic44_query_check_and_run(16); -- person_occupies
-- [8] person_boards() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 160;
call person_boards('p5', 'dy_61');
call magic44_query_check_and_run(16); -- person_occupies
-- [9] person_disembarks() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 180;
call person_disembarks('p41', 'rc_51');
call magic44_query_check_and_run(16); -- person_occupies
-- [10] assign_crew() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 200;
call assign_crew('dy_61', 'p0');
call magic44_query_check_and_run(14); -- person
call magic44_query_check_and_run(22); -- crew
-- [11] recycle_crew() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 220;
call recycle_crew('hg_99');
call magic44_query_check_and_run(14); -- person
call magic44_query_check_and_run(22); -- crew
-- [12] retire_cruise() SUCCESS case(s)
call magic44_reset_database_state();
set @stepCounter = 240;
call retire_cruise('mc_47');
call magic44_query_check_and_run(20); -- cruise
-- [13] cruises_at_sea() INITIAL case
call magic44_reset_database_state();
set @stepCounter = 280;
call magic44_query_check_and_run(30); -- cruises_at_sea
-- [14] cruises_docked() INITIAL case
call magic44_reset_database_state();
set @stepCounter = 300;
call magic44_query_check_and_run(31); -- cruises_docked
-- [15] people_at_sea() INITIAL case
call magic44_reset_database_state();
set @stepCounter = 320;
call magic44_query_check_and_run(32); -- people_at_sea
-- [16] people_docked() INITIAL case
call magic44_reset_database_state();
set @stepCounter = 340;
call magic44_query_check_and_run(33); -- people_docked
-- [17] route_summary() INITIAL case
call magic44_reset_database_state();
set @stepCounter = 360;
call magic44_query_check_and_run(34); -- route_summary
-- [18] alternative_ports() INITIAL case
call magic44_reset_database_state();
set @stepCounter = 380;
call magic44_query_check_and_run(35); -- alternative_ports
-- for consistency with the initial database state after testing
call magic44_reset_database_state();
-- ----------------------------------------------------------------------------------
-- [6] Collect and analyze the testing results for the student's submission
-- ----------------------------------------------------------------------------------
-- These tables are used to store the answers and test results. The answers are generated by executing
-- the test script against our reference solution. The test results are collected by running the test
-- script against your submission in order to compare the results.
-- The results from magic44_data_capture are transferred into the magic44_test_results table
drop table if exists magic44_test_results;
create table magic44_test_results (
step_id integer not null,
query_id integer,
row_hash varchar(2000) not null
);
insert into magic44_test_results
select stepID, queryID, concat_ws('#', ifnull(columndump0, ''), ifnull(columndump1, ''), ifnull(columndump2, ''), ifnull(columndump3, ''),
ifnull(columndump4, ''), ifnull(columndump5, ''), ifnull(columndump6, ''), ifnull(columndump7, ''), ifnull(columndump8, ''), ifnull(columndump9, ''),
ifnull(columndump10, ''), ifnull(columndump11, ''), ifnull(columndump12, ''), ifnull(columndump13, ''), ifnull(columndump14, ''))
from magic44_data_capture;
-- the answers generated from the reference solution are loaded below
drop table if exists magic44_expected_results;
create table magic44_expected_results (
step_id integer not null,
query_id integer,
row_hash varchar(2000) not null,
index (step_id),
index (query_id)
);
insert into magic44_expected_results values
(0,10,'aida##############'),
(0,10,'azamara##############'),
(0,10,'carnival##############'),
(0,10,'celebrity##############'),
(0,10,'celestyalcruises##############'),
(0,10,'costa##############'),
(0,10,'cunard##############'),
(0,10,'disney##############'),
(0,10,'hollandamerica##############'),
(0,10,'hurtigruten##############'),
(0,10,'marellacruises##############'),
(0,10,'msc##############'),
(0,10,'norwegian##############'),
(0,10,'oceania##############'),
(0,10,'p&ocruises##############'),
(0,10,'paulgauguincruises##############'),
(0,10,'ponant##############'),
(0,10,'princess##############'),
(0,10,'regent##############'),
(0,10,'royalcaribbean##############'),
(0,10,'sagacruises##############'),
(0,10,'seabourn##############'),
(0,10,'silversea##############'),
(0,10,'starclippers##############'),
(0,10,'vikingocean##############'),
(0,10,'windstar##############'),
(0,11,'port_1##############'),
(0,11,'port_10##############'),
(0,11,'port_11##############'),
(0,11,'port_12##############'),
(0,11,'port_13##############'),
(0,11,'port_14##############'),
(0,11,'port_15##############'),
(0,11,'port_16##############'),
(0,11,'port_17##############'),
(0,11,'port_18##############'),
(0,11,'port_19##############'),
(0,11,'port_2##############'),
(0,11,'port_20##############'),
(0,11,'port_21##############'),
(0,11,'port_22##############'),
(0,11,'port_23##############'),
(0,11,'port_3##############'),
(0,11,'port_4##############'),
(0,11,'port_5##############'),
(0,11,'port_6##############'),
(0,11,'port_7##############'),
(0,11,'port_8##############'),
(0,11,'port_9##############'),
(0,11,'ship_1##############'),
(0,11,'ship_10##############'),
(0,11,'ship_11##############'),
(0,11,'ship_12##############'),
(0,11,'ship_13##############'),
(0,11,'ship_14##############'),
(0,11,'ship_15##############'),
(0,11,'ship_16##############'),
(0,11,'ship_17##############'),
(0,11,'ship_18##############'),
(0,11,'ship_19##############'),
(0,11,'ship_2##############'),
(0,11,'ship_20##############'),
(0,11,'ship_21##############'),
(0,11,'ship_22##############'),
(0,11,'ship_23##############'),
(0,11,'ship_24##############'),
(0,11,'ship_25##############'),
(0,11,'ship_26##############'),
(0,11,'ship_27##############'),
(0,11,'ship_3##############'),
(0,11,'ship_4##############'),
(0,11,'ship_5##############'),
(0,11,'ship_6##############'),
(0,11,'ship_7##############'),
(0,11,'ship_8##############'),
(0,11,'ship_9##############'),
(0,12,'aida#aidanova#6600#21.5#ship_4#ocean_liner##35#######'),
(0,12,'azamara#azamaraquest#686#18.5#ship_18#river#1########'),
(0,12,'carnival#carnivalvista#3934#23#ship_23#ocean_liner##2#######'),
(0,12,'celebrity#celebrityedge#2908#22#ship_6#ocean_liner##20#######'),
(0,12,'celestyalcruises#celestyalcrystal#1200#18.5#ship_16#river#0########'),
(0,12,'costa#costasmeralda#6554#23#ship_2##########'),
(0,12,'cunard#queenmary2#2691#30#ship_14#ocean_liner##40#######'),
(0,12,'disney#disneydream#4000#23.5#ship_7#ocean_liner##20#######'),
(0,12,'hollandamerica#msnieuwstatendam#2666#23#ship_8#ocean_liner##30#######'),
(0,12,'hurtigruten#msroaldamundsen#530#15.5#ship_21#ocean_liner##10#######'),
(0,12,'marellacruises#marellaexplorer#1924#21.5#ship_27#ocean_liner##2#######'),
(0,12,'msc#meraviglia#4488#22.700000762939453#ship_22#ocean_liner##20#######'),
(0,12,'norwegian#norwegianbliss#4004#22.5#ship_24#ocean_liner##15#######'),
(0,12,'oceania#marina#1250#20#ship_11#ocean_liner##25#######'),
(0,12,'p&ocruises#iona#5200#22.600000381469727#ship_3#ocean_liner##20#######'),
(0,12,'paulgauguincruises#paulgauguin#332#18#ship_15##########'),
(0,12,'ponant#lelyrial#264#16#ship_26#river#1########'),
(0,12,'princess#crownprincess#3080#23#ship_5#ocean_liner##20#######'),
(0,12,'regent#sevenseasexplorer#750#19.5#ship_10#ocean_liner##20#######'),
(0,12,'royalcaribbean#oasisoftheseas#1325#18#ship_25#ocean_liner##30#######'),
(0,12,'royalcaribbean#symphonyoftheseas#6680#22#ship_1#ocean_liner##20#######'),
(0,12,'sagacruises#spiritofdiscovery#999#21#ship_17#ocean_liner##2#######'),
(0,12,'seabourn#seabournovation#604#19#ship_12#ocean_liner##20#######'),
(0,12,'silversea#silvermuse#596#19.799999237060547#ship_13#ocean_liner##30#######'),
(0,12,'starclippers#royalclipper#227#17#ship_19#river#1########'),
(0,12,'vikingocean#vikingorion#930#20#ship_9#ocean_liner##20#######'),
(0,12,'windstar#windsurf#342#15#ship_20#river#0########'),
(0,13,'bca#portofbarcelona#barcelona#catalonia#esp#port_6#########'),
(0,13,'bri#portofbridgetown#bridgetown#saintmichael#brb#port_19#########'),
(0,13,'cnl#portcanaveral#capecanaveral#florida#usa#port_4#########'),
(0,13,'cop#portofcopenhagen#copenhagen#hovedstaden#den#port_18#########'),
(0,13,'cva#portofcivitavecchia#civitavecchia#lazio#ita#port_7#########'),
(0,13,'czl#portofcozumel#cozumel#quintanaroo#mex#port_3#########'),
(0,13,'egs#porteverglades#fortlauderdale#florida#usa#port_2#########'),
(0,13,'gvn#portofgalveston#galveston#texas#usa#port_10#########'),
(0,13,'las#portoflosangeles#losangeles#california#usa#port_23#########'),
(0,13,'mar#portofmarseille#marseille#provence-alpes-côted\'azur#fra#port_17#########'),
(0,13,'mia#portofmiami#miami#florida#usa#port_1#########'),
(0,13,'nos#portofneworleans#neworleans#louisiana#usa#port_13#########'),
(0,13,'nsu#portofnassau#nassau#newprovidence#bhs#port_5#########'),
(0,13,'pir#portofpiraeus#piraeus#attica#grc#port_20#########'),
(0,13,'sea#portofseattle#seattle#washington#usa#port_11#########'),
(0,13,'sha#portofsouthampton#southhampton#hampshire#gbr#port_8#########'),
(0,13,'sjn#portofsanjuan#sanjuan#puertorico#usa#port_12#########'),
(0,13,'stm#portofstockholm#stockholm#stockholmcounty#swe#port_22#########'),
(0,13,'sts#portofst.thomas#charlotteamalie#st.thomas#usv#port_21#########'),
(0,13,'syd#portofsydney#sydney#newsouthwales#aus#port_9#########'),
(0,13,'tmp#portoftampabay#tampabay#florida#usa#port_15#########'),
(0,13,'van#portofvancouver#vancouver#britishcolumbia#can#port_16#########'),
(0,13,'ven#portofvenice#venice#veneto#ita#port_14#########'),
(0,14,'p0#martin#vanbasten############'),
(0,14,'p1#jeanne#nelson############'),
(0,14,'p10#lawrence#morgan############'),
(0,14,'p11#sandra#cruz############'),
(0,14,'p12#dan#ball############'),
(0,14,'p13#bryant#figueroa############'),
(0,14,'p14#dana#perry############'),
(0,14,'p15#matt#hunt############'),
(0,14,'p16#edna#brown############'),
(0,14,'p17#ruby#burgess############'),
(0,14,'p18#esther#pittman############'),
(0,14,'p19#doug#fowler############'),
(0,14,'p2#roxanne#byrd############'),
(0,14,'p20#thomas#olson############'),
(0,14,'p21#mona#harrison############'),
(0,14,'p22#arlene#massey############'),
(0,14,'p23#judith#patrick############'),
(0,14,'p24#reginald#rhodes############'),
(0,14,'p25#vincent#garcia############'),
(0,14,'p26#cheryl#moore############'),
(0,14,'p27#michael#rivera############'),
(0,14,'p28#luther#matthews############'),
(0,14,'p29#moses#parks############'),
(0,14,'p3#tanya#nguyen############'),
(0,14,'p30#ora#steele############'),
(0,14,'p31#antonio#flores############'),
(0,14,'p32#glenn#ross############'),
(0,14,'p33#irma#thomas############'),
(0,14,'p34#ann#maldonado############'),
(0,14,'p35#jeffrey#cruz############'),
(0,14,'p36#sonya#price############'),
(0,14,'p37#tracy#hale############'),
(0,14,'p38#albert#simmons############'),
(0,14,'p39#karen#terry############'),
(0,14,'p4#kendra#jacobs############'),
(0,14,'p40#glen#kelley############'),
(0,14,'p41#brooke#little############'),
(0,14,'p42#daryl#nguyen############'),
(0,14,'p43#judy#willis############'),
(0,14,'p44#marco#klein############'),
(0,14,'p45#angelica#hampton############'),
(0,14,'p46#peppermint#patty############'),
(0,14,'p47#charlie#brown############'),
(0,14,'p48#lucy#vanpelt############'),
(0,14,'p49#linus#vanpelt############'),
(0,14,'p5#jeff#burton############'),
(0,14,'p6#randal#parks############'),
(0,14,'p7#sonya#owens############'),
(0,14,'p8#bennie#palmer############'),
(0,14,'p9#marlene#warner############'),
(0,15,'p21#771#700############'),
(0,15,'p22#374#200############'),
(0,15,'p23#414#400############'),
(0,15,'p24#292#500############'),
(0,15,'p25#390#300############'),
(0,15,'p26#302#600############'),
(0,15,'p27#470#400############'),
(0,15,'p28#208#400############'),
(0,15,'p29#292#700############'),
(0,15,'p30#686#500############'),
(0,15,'p31#547#400############'),
(0,15,'p32#257#500############'),