-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampleData.sql
More file actions
2818 lines (1945 loc) · 122 KB
/
SampleData.sql
File metadata and controls
2818 lines (1945 loc) · 122 KB
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
/*Inserting Values into Person Table */
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P001', 'John', 'Michael', 'Smith', '123 Main St, Springfield', 'M', date '1985-03-15');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P002', 'Sarah', 'Elizabeth', 'Johnson', '456 Oak Ave, Riverside', 'F', date '1990-07-22');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P003', 'Michael', NULL, 'Williams', '789 Pine Rd, Lakewood', 'M', date '1978-11-30');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P004', 'Emily', 'Grace', 'Brown', '321 Elm St, Hillside', 'F', date '1995-02-14');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P005', 'David', 'James', 'Davis', '654 Maple Dr, Oceanview', 'M', date '1982-09-08');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P006', 'Jennifer', NULL, 'Martinez', '987 Cedar Ln, Mountain View', 'F', date '1988-12-19');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P007', 'Robert', 'William', 'Garcia', '147 Birch Ct, Sunset Hills', 'M', date'1992-05-27');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P008', 'Amanda', 'Marie', 'Rodriguez', '258 Willow Way, Green Valley', 'F', date '1987-08-03');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P009', 'Christopher', 'Lee', 'Wilson', '369 Spruce Blvd, Riverside Park', 'M', date '1980-01-11');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P010', 'Jessica', NULL, 'Anderson', '741 Ash St, Clearwater', 'F', date '1993-06-25');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P011', 'Patricia', 'Ann', 'Thompson', '852 Library Ln, Downtown', 'F', date '1975-04-12');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P012', 'Richard', 'Paul', 'Miller', '963 Archive St, University District', 'M', date '1980-09-25');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P013', 'Linda', 'Sue', 'Taylor', '741 Catalog Ave, Midtown', 'F', date '1983-02-18');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P014', 'James', 'Robert', 'Anderson', '159 Dewey Dr, Eastside', 'M', date '1978-11-07');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P015', 'Barbara', NULL, 'White', '357 Reference Rd, Westwood', 'F', date '1985-06-30');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P016', 'Margaret', 'Louise', 'Harris', '246 Admin Blvd, Central', 'F', date '1977-03-08');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P017', 'Thomas', 'Edward', 'Clark', '582 Management Way, Northside', 'M', date '1981-07-14');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P018', 'Susan', 'Marie', 'Lewis', '913 Supervisor St, Southend', 'F', date '1979-12-22');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P019', 'William', 'Charles', 'Walker', '467 Director Dr, Uptown', 'M', date '1984-05-19');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P020', 'Dorothy', 'Jean', 'Hall', '128 Leadership Ln, West End', 'F', date '1976-10-03');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P021', 'Michelle', 'Rose', 'Young', '532 Front Desk Ave, Plaza', 'F', date '1992-08-15');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P022', 'Daniel', 'Scott', 'King', '847 Welcome St, Gateway', 'M', date '1994-03-27');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P023', 'Nicole', 'Lynn', 'Wright', '215 Reception Rd, Entrance', 'F', date '1991-11-09');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P024', 'Kevin', 'Alexander', 'Lopez', '678 Service Ln, Main Floor', 'M', date '1995-06-18');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P025', 'Angela', 'Marie', 'Hill', '934 Greeting Way, Lobby', 'F', date '1993-02-04');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P026', 'Brian', 'Joseph', 'Scott', '421 Information Blvd, Entry', 'M', date '1990-09-21');
INSERT INTO person (person_ID, Fname, Mname, Lname, Address, Gender, DOB)
VALUES ('P027', 'Stephanie', NULL, 'Green', '756 Concierge Ct, Ground Level', 'F', date '1996-01-12');
/* Inserting Values into Member*/
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P001', 'Gold', date '2020-01-15');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P002', 'Silver', date '2021-03-22');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P003', 'Gold', date '2019-06-10');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P004', 'Silver', date '2022-09-05');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P005', 'Gold', date '2020-11-18');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P006', 'Silver', date '2021-07-30');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P007', 'Silver', date '2023-02-14');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P008', 'Gold', date '2019-12-01');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P009', 'Gold', date '2020-08-25');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P010', 'Silver', date '2022-04-17');
/* Inserting values in for Library Card */
INSERT INTO library_card (card_ID, owner_id)
VALUES (1001, 'P001');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1002, 'P002');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1003, 'P003');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1004, 'P004');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1005, 'P005');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1006, 'P006');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1007, 'P007');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1008, 'P008');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1009, 'P009');
INSERT INTO library_card (card_ID, owner_id)
VALUES (1010, 'P010');
/*Inserting Values into Phone Number */
-- Person P001 - John Smith (2 phone numbers)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P001', '214-555-1001');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P001', '214-555-1002');
-- Person P002 - Sarah Johnson (1 phone number)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P002', '469-555-2001');
-- Person P003 - Michael Williams (3 phone numbers)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P003', '972-555-3001');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P003', '972-555-3002');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P003', '214-555-3003');
-- Person P004 - Emily Brown (1 phone number)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P004', '817-555-4001');
-- Person P005 - David Davis (2 phone numbers)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P005', '469-555-5001');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P005', '214-555-5002');
-- Person P006 - Jennifer Martinez (1 phone number)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P006', '972-555-6001');
-- Person P007 - Robert Garcia (2 phone numbers)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P007', '817-555-7001');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P007', '469-555-7002');
-- Person P008 - Amanda Rodriguez (1 phone number)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P008', '214-555-8001');
-- Person P009 - Christopher Wilson (2 phone numbers)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P009', '972-555-9001');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P009', '817-555-9002');
-- Person P010 - Jessica Anderson (1 phone number)
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P010', '469-555-0001');
/*Promotions*/
INSERT INTO promotion (promocode, description)
VALUES (1001, 'Summer Reading Challenge - Borrow 10 books and get 1 month free membership extension');
INSERT INTO promotion (promocode, description)
VALUES (1002, 'New Member Special - 50% off first year membership fee');
INSERT INTO promotion (promocode, description)
VALUES (1003, 'Student Discount - 25% off annual membership with valid student ID');
INSERT INTO promotion (promocode, description)
VALUES (1004, 'Family Bundle - Add up to 4 family members for the price of 2');
INSERT INTO promotion (promocode, description)
VALUES (1005, 'Early Bird Special - Waived late fees for returns before 9 AM');
INSERT INTO promotion (promocode, description)
VALUES (1006, 'Book Club Members - Free reservation holds for book club selections');
INSERT INTO promotion (promocode, description)
VALUES (1007, 'Senior Citizen Discount - 30% off membership for ages 65+');
INSERT INTO promotion (promocode, description)
VALUES (1008, 'Digital Access Bundle - Free e-book and audiobook access for 3 months');
INSERT INTO promotion (promocode, description)
VALUES (1009, 'Refer-a-Friend - Both get 2 months free when you refer a new member');
INSERT INTO promotion (promocode, description)
VALUES (1010, 'Holiday Special - Double checkout limit during December');
INSERT INTO promotion (promocode, description)
VALUES (1011, 'Birthday Month Bonus - No late fees during your birthday month');
INSERT INTO promotion (promocode, description)
VALUES (1012, 'Weekend Warrior - Extended weekend checkout periods (Friday-Monday)');
INSERT INTO promotion (promocode, description)
VALUES (1013, 'Loyalty Reward - Upgrade to next tier free after 2 years membership');
INSERT INTO promotion (promocode, description)
VALUES (1014, 'Community Partner - Free membership for teachers and librarians');
INSERT INTO promotion (promocode, description)
VALUES (1015, 'Spring Clearance - Purchase retired books at 75% off cover price');
/*Create Associates Table*/
-- Summer Reading Challenge - target younger/active readers
INSERT INTO Associates (promocode, card_id)
VALUES (1001, 1004);
INSERT INTO Associates (promocode, card_id)
VALUES (1001, 1007);
INSERT INTO Associates (promocode, card_id)
VALUES (1001, 1010);
-- New Member Special - target recently enrolled members
INSERT INTO Associates (promocode, card_id)
VALUES (1002, 1007);
INSERT INTO Associates (promocode, card_id)
VALUES (1002, 1010);
-- Student Discount - target younger members
INSERT INTO Associates (promocode, card_id)
VALUES (1003, 1004);
INSERT INTO Associates (promocode, card_id)
VALUES (1003, 1007);
-- Family Bundle - target potential family accounts
INSERT INTO Associates (promocode, card_id)
VALUES (1004, 1001);
INSERT INTO Associates (promocode, card_id)
VALUES (1004, 1005);
INSERT INTO Associates (promocode, card_id)
VALUES (1004, 1009);
-- Early Bird Special - target all active members
INSERT INTO Associates (promocode, card_id)
VALUES (1005, 1002);
INSERT INTO Associates (promocode, card_id)
VALUES (1005, 1006);
INSERT INTO Associates (promocode, card_id)
VALUES (1005, 1008);
-- Book Club Members - target engaged readers
INSERT INTO Associates (promocode, card_id)
VALUES (1006, 1001);
INSERT INTO Associates (promocode, card_id)
VALUES (1006, 1003);
INSERT INTO Associates (promocode, card_id)
VALUES (1006, 1008);
-- Senior Citizen Discount - target older members
INSERT INTO Associates (promocode, card_id)
VALUES (1007, 1003);
INSERT INTO Associates (promocode, card_id)
VALUES (1007, 1009);
-- Digital Access Bundle - target tech-savvy members
INSERT INTO Associates (promocode, card_id)
VALUES (1008, 1002);
INSERT INTO Associates (promocode, card_id)
VALUES (1008, 1004);
INSERT INTO Associates (promocode, card_id)
VALUES (1008, 1006);
INSERT INTO Associates (promocode, card_id)
VALUES (1008, 1010);
-- Refer-a-Friend - target loyal members
INSERT INTO Associates (promocode, card_id)
VALUES (1009, 1001);
INSERT INTO Associates (promocode, card_id)
VALUES (1009, 1003);
INSERT INTO Associates (promocode, card_id)
VALUES (1009, 1005);
INSERT INTO Associates (promocode, card_id)
VALUES (1009, 1008);
-- Holiday Special - broadcast to everyone
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1001);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1002);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1003);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1004);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1005);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1006);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1007);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1008);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1009);
INSERT INTO Associates (promocode, card_id)
VALUES (1010, 1010);
-- Birthday Month Bonus - target select members
INSERT INTO Associates (promocode, card_id)
VALUES (1011, 1002);
INSERT INTO Associates (promocode, card_id)
VALUES (1011, 1005);
INSERT INTO Associates (promocode, card_id)
VALUES (1011, 1009);
-- Loyalty Reward - target long-time members
INSERT INTO Associates (promocode, card_id)
VALUES (1013, 1001);
INSERT INTO Associates (promocode, card_id)
VALUES (1013, 1003);
INSERT INTO Associates (promocode, card_id)
VALUES (1013, 1005);
INSERT INTO Associates (promocode, card_id)
VALUES (1013, 1008);
/*Trainer Table */
INSERT INTO trainer (trainer_id)
VALUES (5001);
INSERT INTO trainer (trainer_id)
VALUES (5002);
INSERT INTO trainer (trainer_id)
VALUES (5003);
INSERT INTO trainer (trainer_id)
VALUES (5004);
INSERT INTO trainer (trainer_id)
VALUES (5005);
INSERT INTO trainer (trainer_id)
VALUES (5006);
INSERT INTO trainer (trainer_id)
VALUES (5007);
INSERT INTO trainer (trainer_id)
VALUES (5008);
INSERT INTO trainer (trainer_id)
VALUES (5009);
INSERT INTO trainer (trainer_id)
VALUES (5010);
/* Cataloging Managers */
INSERT INTO cataloging_manager (person_id, start_date, trainer_id)
VALUES ('P011', date '2015-03-15', 5001);
INSERT INTO cataloging_manager (person_id, start_date, trainer_id)
VALUES ('P012', date '2017-08-22', 5002);
INSERT INTO cataloging_manager (person_id, start_date, trainer_id)
VALUES ('P013', date '2018-01-10', NULL);
INSERT INTO cataloging_manager (person_id, start_date, trainer_id)
VALUES ('P014', date '2016-06-05', 5003);
INSERT INTO cataloging_manager (person_id, start_date, trainer_id)
VALUES ('P015', date '2019-11-18', NULL);
/*Library Supervisors */
INSERT INTO library_supervisor (person_id, start_date, trainer_id)
VALUES ('P016', date '2014-02-10', 5004);
INSERT INTO library_supervisor (person_id, start_date, trainer_id)
VALUES ('P017', date '2016-09-01', 5005);
INSERT INTO library_supervisor (person_id, start_date, trainer_id)
VALUES ('P018', date '2015-05-20', NULL);
INSERT INTO library_supervisor (person_id, start_date, trainer_id)
VALUES ('P019', date '2018-03-12', 5006);
INSERT INTO library_supervisor (person_id, start_date, trainer_id)
VALUES ('P020', date '2013-11-25', NULL);
/*Receptionists */
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P021', date '2022-01-10', 6001);
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P022', date '2021-07-15', 6002);
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P023', date '2020-09-22', 6003);
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P024', date '2023-03-08', 6004);
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P025', date '2022-11-30', 6005);
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P026', date '2021-05-17', 6006);
INSERT INTO receptionist (person_id, start_date, trainee_id)
VALUES ('P027', date '2023-08-25', 6007);
/* Training Table */
-- Trainer 5001 (P011 - Cataloging Manager) trains multiple receptionists
INSERT INTO training (trainer_id, trainee_id)
VALUES (5001, 6001);
INSERT INTO training (trainer_id, trainee_id)
VALUES (5001, 6002);
-- Trainer 5002 (P012 - Cataloging Manager) trains receptionists
INSERT INTO training (trainer_id, trainee_id)
VALUES (5002, 6003);
INSERT INTO training (trainer_id, trainee_id)
VALUES (5002, 6007);
-- Trainer 5003 (P014 - Cataloging Manager) trains a receptionist
INSERT INTO training (trainer_id, trainee_id)
VALUES (5003, 6004);
-- Trainer 5004 (P016 - Library Supervisor) trains multiple receptionists
INSERT INTO training (trainer_id, trainee_id)
VALUES (5004, 6005);
INSERT INTO training (trainer_id, trainee_id)
VALUES (5004, 6006);
-- Trainer 5005 (P017 - Library Supervisor) trains receptionists
INSERT INTO training (trainer_id, trainee_id)
VALUES (5005, 6001);
INSERT INTO training (trainer_id, trainee_id)
VALUES (5005, 6004);
-- Trainer 5006 (P019 - Library Supervisor) trains receptionists
INSERT INTO training (trainer_id, trainee_id)
VALUES (5006, 6002);
INSERT INTO training (trainer_id, trainee_id)
VALUES (5006, 6005);
-- Add some employees as members (not all employees need to be members)
-- Cataloging Managers who are also members
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P011', 'Gold', date '2015-04-01');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P014', 'Gold', date '2016-07-15');
-- Library Supervisors who are also members
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P017', 'Silver', date '2016-10-20');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P020', 'Gold', date '2014-01-10');
-- Receptionists who are also members
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P021', 'Silver', date '2022-02-05');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P023', 'Silver', date '2020-10-30');
INSERT INTO member (person_ID, member_level, enrollment_date)
VALUES ('P026', 'Gold', date '2021-06-12');
-- Add phone numbers for all employees
-- Cataloging Managers phone numbers
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P011', '214-555-1101');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P011', '972-555-1102');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P012', '469-555-1201');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P013', '817-555-1301');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P014', '214-555-1401');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P014', '469-555-1402');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P015', '972-555-1501');
-- Library Supervisors phone numbers
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P016', '817-555-1601');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P017', '214-555-1701');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P017', '972-555-1702');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P018', '469-555-1801');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P019', '817-555-1901');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P020', '214-555-2001');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P020', '469-555-2002');
-- Receptionists phone numbers
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P021', '972-555-2101');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P022', '817-555-2201');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P023', '214-555-2301');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P023', '469-555-2302');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P024', '972-555-2401');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P025', '817-555-2501');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P026', '214-555-2601');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P026', '972-555-2602');
INSERT INTO phone_numbers (person_id, p_number)
VALUES ('P027', '469-555-2701');
--INSERT statements for the inquiry table
-- Member P001 (John Smith) makes inquiries
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7001, 5, TIMESTAMP '2024-11-15 09:30:00', 'P021', 'P001');
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7002, 4, TIMESTAMP '2024-12-01 14:20:00', 'P022', 'P001');
-- Member P002 (Sarah Johnson) makes an inquiry
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7003, 5, TIMESTAMP '2024-11-20 10:15:00', 'P021', 'P002');
-- Member P003 (Michael Williams) makes inquiries
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7004, 3, TIMESTAMP '2024-11-18 16:45:00', 'P023', 'P003');
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7005, 4, TIMESTAMP '2024-12-05 11:30:00', 'P024', 'P003');
-- Member P004 (Emily Brown) makes an inquiry
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7006, 5, TIMESTAMP '2024-11-25 13:00:00', 'P025', 'P004');
-- Member P005 (David Davis) makes inquiries
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7007, 4, TIMESTAMP '2024-12-02 09:00:00', 'P026', 'P005');
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7008, 5, TIMESTAMP '2024-12-08 15:30:00', 'P027', 'P005');
-- Member P006 (Jennifer Martinez) makes an inquiry
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7009, 2, TIMESTAMP '2024-11-22 12:15:00', 'P021', 'P006');
-- Member P007 (Robert Garcia) makes an inquiry
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7010, 5, TIMESTAMP '2024-12-03 10:45:00', 'P022', 'P007');
-- Member P008 (Amanda Rodriguez) makes inquiries
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7011, 4, TIMESTAMP '2024-11-28 14:00:00', 'P023', 'P008');
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7012, 3, TIMESTAMP '2024-12-06 16:20:00', 'P024', 'P008');
-- Member P009 (Christopher Wilson) makes an inquiry
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7013, 5, TIMESTAMP '2024-11-30 11:10:00', 'P025', 'P009');
-- Member P010 (Jessica Anderson) makes an inquiry
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7014, 4, TIMESTAMP '2024-12-04 13:45:00', 'P026', 'P010');
-- Employee members also make inquiries
-- P011 (Patricia Thompson - Cataloging Manager and member)
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7015, 5, TIMESTAMP '2024-11-19 08:30:00', 'P027', 'P011');
-- P014 (James Anderson - Cataloging Manager and member)
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7016, 4, TIMESTAMP '2024-12-07 15:00:00', 'P021', 'P014');
-- P017 (Thomas Clark - Library Supervisor and member)
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7017, 5, TIMESTAMP '2024-11-27 10:30:00', 'P022', 'P017');
-- P020 (Dorothy Hall - Library Supervisor and member)
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7018, 3, TIMESTAMP '2024-12-01 12:00:00', 'P023', 'P020');
-- P021 (Michelle Young - Receptionist and member) - helped by another receptionist
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7019, 4, TIMESTAMP '2024-11-23 09:15:00', 'P022', 'P021');
-- P023 (Nicole Wright - Receptionist and member) - helped by another receptionist
INSERT INTO inquiry (inquiry_id, rating, inquiry_time, receptionist_id, member_id)
VALUES (7020, 5, TIMESTAMP '2024-12-09 14:30:00', 'P024', 'P023');
-- Sample INSERT statements for the guest table
-- Only Gold members can have guests
-- Member P001 (John Smith - GOLD member, card 1001) has guests
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8001, 1001, 'P001', 'Emily Smith', '123 Main St, Springfield', '214-555-8001');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8002, 1001, 'P001', 'Jacob Smith', '123 Main St, Springfield', '214-555-8002');
-- Member P005 (David Davis - GOLD member, card 1005) has guests
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8003, 1005, 'P005', 'Rachel Davis', '654 Maple Dr, Oceanview', '469-555-8003');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8004, 1005, 'P005', 'Andrew Chen', '789 Harbor Ln, Oceanview', '214-555-8004');
-- Member P003 (Michael Williams - Gold member, card 1003) has guests
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8005, 1003, 'P003', 'Lisa Williams', '789 Pine Rd, Lakewood', '972-555-8005');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8006, 1003, 'P003', 'Mark Henderson', '456 Oak Ave, Lakewood', '817-555-8006');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8007, 1003, 'P003', 'Sarah Williams', '789 Pine Rd, Lakewood', '972-555-8007');
-- Member P008 (Amanda Rodriguez - Gold member, card 1008) has guests
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8008, 1008, 'P008', 'Carlos Rodriguez', '258 Willow Way, Green Valley', '214-555-8008');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8009, 1008, 'P008', 'Maria Santos', '135 Garden St, Green Valley', '469-555-8009');
-- Member P009 (Christopher Wilson - Gold member, card 1009) has a guest
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8010, 1009, 'P009', 'Patricia Wilson', '369 Spruce Blvd, Riverside Park', '972-555-8010');
-- Employee members with GOLD status can also have guests
-- Member P011 (Patricia Thompson - Gold, cataloging manager) - needs library card first
INSERT INTO library_card (card_ID, owner_id)
VALUES (1011, 'P011');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8011, 1011, 'P011', 'Robert Thompson', '852 Library Ln, Downtown', '214-555-8011');
-- Member P014 (James Anderson - Gold, cataloging manager) - needs library card first
INSERT INTO library_card (card_ID, owner_id)
VALUES (1014, 'P014');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8012, 1014, 'P014', 'Michelle Anderson', '159 Dewey Dr, Eastside', '817-555-8012');
-- Member P020 (Dorothy Hall - Gold, library supervisor) - needs library card first
INSERT INTO library_card (card_ID, owner_id)
VALUES (1020, 'P020');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8013, 1020, 'P020', 'George Hall', '128 Leadership Ln, West End', '214-555-8013');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8014, 1020, 'P020', 'Nancy Foster', '456 Park Ave, West End', '972-555-8014');
-- Member P026 (Brian Scott - GOLD, receptionist) - needs library card first
INSERT INTO library_card (card_ID, owner_id)
VALUES (1026, 'P026');
INSERT INTO guest (guest_id, host_card_id, host_id, guest_name, address, contact_info)
VALUES (8015, 1026, 'P026', 'Karen Scott', '421 Information Blvd, Entry', '469-555-8015');
--publisher table
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9001, 'Penguin Random House');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9002, 'HarperCollins');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9003, 'Simon Schuster');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9004, 'Macmillan Publishers');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9005, 'Hachette Book Group');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9006, 'Scholastic Corporation');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9007, 'Pearson Education');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9008, 'Oxford University Press');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9009, 'Cambridge Univ Press');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9010, 'Wiley');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9011, 'McGraw-Hill Education');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9012, 'Bloomsbury Publishing');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9013, 'Vintage Books');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9014, 'Knopf Doubleday');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9015, 'Tor Books');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9016, 'Del Rey Books');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9017, 'Houghton Mifflin');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9018, 'Little Brown Company');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9019, 'Faber Faber');
INSERT INTO publisher (publisher_id, publisher_name)
VALUES (9020, 'Grove Press');
-- Sample INSERT statements for the author table
INSERT INTO author (author_id, author_name)
VALUES (10001, 'Margaret Atwood');
INSERT INTO author (author_id, author_name)
VALUES (10002, 'Haruki Murakami');
INSERT INTO author (author_id, author_name)
VALUES (10003, 'Toni Morrison');
INSERT INTO author (author_id, author_name)
VALUES (10004, 'Stephen King');
INSERT INTO author (author_id, author_name)
VALUES (10005, 'Chimamanda Ngozi Adichie');
INSERT INTO author (author_id, author_name)
VALUES (10006, 'Gabriel García Márquez');
INSERT INTO author (author_id, author_name)
VALUES (10007, 'J.K. Rowling');
INSERT INTO author (author_id, author_name)
VALUES (10008, 'Neil Gaiman');
INSERT INTO author (author_id, author_name)
VALUES (10009, 'Ursula K. Le Guin');
INSERT INTO author (author_id, author_name)
VALUES (10010, 'George R.R. Martin');
INSERT INTO author (author_id, author_name)
VALUES (10011, 'Isabel Allende');
INSERT INTO author (author_id, author_name)
VALUES (10012, 'Kazuo Ishiguro');
INSERT INTO author (author_id, author_name)
VALUES (10013, 'Zadie Smith');
INSERT INTO author (author_id, author_name)
VALUES (10014, 'Colson Whitehead');
INSERT INTO author (author_id, author_name)
VALUES (10015, 'Octavia Butler');
INSERT INTO author (author_id, author_name)
VALUES (10016, 'Sally Rooney');
INSERT INTO author (author_id, author_name)
VALUES (10017, 'Ta-Nehisi Coates');
INSERT INTO author (author_id, author_name)
VALUES (10018, 'Elena Ferrante');
INSERT INTO author (author_id, author_name)
VALUES (10019, 'Brandon Sanderson');
INSERT INTO author (author_id, author_name)
VALUES (10020, 'N.K. Jemisin');
INSERT INTO author (author_id, author_name)
VALUES (10021, 'Yuval Noah Harari');
INSERT INTO author (author_id, author_name)
VALUES (10022, 'Michelle Obama');
INSERT INTO author (author_id, author_name)
VALUES (10023, 'Malcolm Gladwell');
INSERT INTO author (author_id, author_name)
VALUES (10024, 'bell hooks');
INSERT INTO author (author_id, author_name)
VALUES (10025, 'Roxane Gay');
/*Book Category*/
INSERT INTO book_category (category_number)
VALUES (1);
INSERT INTO book_category (category_number)
VALUES (2);
INSERT INTO book_category (category_number)
VALUES (3);
--book table
-- Category 1 books
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11001, 'The Handmaid''s Tale', 9001, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11002, 'Norwegian Wood', 9013, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11003, 'Beloved', 9014, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11004, 'The Shining', 9002, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11005, 'Americanah', 9014, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11006, 'One Hundred Years of Solitude', 9002, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11007, 'Harry Potter and the Sorcerer''s Stone', 9012, 1);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11008, 'American Gods', 9002, 1);
-- Category 2 books
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11009, 'The Left Hand of Darkness', 9001, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11010, 'A Game of Thrones', 9005, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11011, 'The House of the Spirits', 9013, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11012, 'Never Let Me Go', 9014, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11013, 'White Teeth', 9001, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11014, 'The Underground Railroad', 9002, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11015, 'Parable of the Sower', 9020, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11016, 'Normal People', 9005, 2);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11017, 'Between the World and Me', 9003, 2);
-- Category 3 books
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11018, 'My Brilliant Friend', 9018, 3);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11019, 'The Way of Kings', 9015, 3);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11020, 'The Fifth Season', 9016, 3);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11021, 'Sapiens: A Brief History of Humankind', 9002, 3);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11022, 'Becoming', 9001, 3);
INSERT INTO book (book_id, title, publisher_id, category_number)
VALUES (11023, 'Outliers', 9018, 3);