lklimkiewicz commited on
Commit
43af969
1 Parent(s): 40b5d04

Add all database in one directory

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +6 -0
  2. all_databases/address_1/address_1.sqlite +0 -0
  3. all_databases/address_1/link.txt +1 -0
  4. all_databases/address_1/schema.sql +218 -0
  5. all_databases/allergy_1/allergy_1.sqlite +0 -0
  6. all_databases/allergy_1/schema.sql +132 -0
  7. all_databases/architecture/architecture.sqlite +0 -0
  8. all_databases/architecture/schema.sql +65 -0
  9. all_databases/baseball_1/baseball_1.sqlite +3 -0
  10. all_databases/baseball_1/schema.sql +3 -0
  11. all_databases/battle_death/battle_death.sqlite +0 -0
  12. all_databases/battle_death/schema.sql +65 -0
  13. all_databases/behavior_monitoring/behavior_monitoring.sqlite +0 -0
  14. all_databases/behavior_monitoring/schema.sql +258 -0
  15. all_databases/bike_racing/bike_racing.sqlite +0 -0
  16. all_databases/bike_racing/schema.sql +56 -0
  17. all_databases/bike_racing/schema_old.sql +56 -0
  18. all_databases/book_press/book_press.sqlite +0 -0
  19. all_databases/book_press/schema.sql +67 -0
  20. all_databases/browser_web/browser_web.sqlite +0 -0
  21. all_databases/browser_web/schema.sql +58 -0
  22. all_databases/candidate_poll/candidate_poll.sqlite +0 -0
  23. all_databases/candidate_poll/schema.sql +42 -0
  24. all_databases/car_racing/car_racing.sqlite +0 -0
  25. all_databases/car_racing/schema.sql +91 -0
  26. all_databases/car_road_race/car_road_race.sqlite +0 -0
  27. all_databases/car_road_race/schema.sql +49 -0
  28. all_databases/chinook_1/annotation.json +5 -0
  29. all_databases/chinook_1/chinook_1.sqlite +0 -0
  30. all_databases/cinema/cinema.sqlite +0 -0
  31. all_databases/cinema/schema.sql +60 -0
  32. all_databases/city_record/city_record.sqlite +0 -0
  33. all_databases/city_record/schema.sql +88 -0
  34. all_databases/club_1/club_1.sqlite +0 -0
  35. all_databases/club_1/schema.sql +73 -0
  36. all_databases/college_2/TextBookExampleSchema.sql +0 -0
  37. all_databases/college_2/college_2.sqlite +3 -0
  38. all_databases/college_2/link.txt +1 -0
  39. all_databases/company_1/company_1.sqlite +0 -0
  40. all_databases/company_1/link.txt +1 -0
  41. all_databases/company_employee/company_employee.sqlite +0 -0
  42. all_databases/company_employee/schema.sql +72 -0
  43. all_databases/country_language/country_language.sqlite +0 -0
  44. all_databases/country_language/schema.sql +68 -0
  45. all_databases/cre_Doc_Template_Mgt/cre_Doc_Template_Mgt.sqlite +0 -0
  46. all_databases/cre_Doc_Template_Mgt/schema.sql +90 -0
  47. all_databases/cre_Doc_Tracking_DB/cre_Doc_Tracking_DB.sqlite +0 -0
  48. all_databases/cre_Doc_Tracking_DB/schema.sql +164 -0
  49. all_databases/cre_Doc_Workflow/cre_Doc_Workflow.sqlite +0 -0
  50. all_databases/cre_Doc_Workflow/schema.sql +164 -0
.gitattributes CHANGED
@@ -67,3 +67,9 @@ test_database/flight_4/flight_4.sqlite filter=lfs diff=lfs merge=lfs -text
67
  test_database/store_1/store_1.sqlite filter=lfs diff=lfs merge=lfs -text
68
  test_database/wta_1/wta_1.sqlite filter=lfs diff=lfs merge=lfs -text
69
  train_spider.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
67
  test_database/store_1/store_1.sqlite filter=lfs diff=lfs merge=lfs -text
68
  test_database/wta_1/wta_1.sqlite filter=lfs diff=lfs merge=lfs -text
69
  train_spider.json filter=lfs diff=lfs merge=lfs -text
70
+ all_databases/baseball_1/baseball_1.sqlite filter=lfs diff=lfs merge=lfs -text
71
+ all_databases/baseball_1/schema.sql filter=lfs diff=lfs merge=lfs -text
72
+ all_databases/college_2/college_2.sqlite filter=lfs diff=lfs merge=lfs -text
73
+ all_databases/flight_4/flight_4.sqlite filter=lfs diff=lfs merge=lfs -text
74
+ all_databases/store_1/store_1.sqlite filter=lfs diff=lfs merge=lfs -text
75
+ all_databases/wta_1/wta_1.sqlite filter=lfs diff=lfs merge=lfs -text
all_databases/address_1/address_1.sqlite ADDED
Binary file (20.5 kB). View file
 
all_databases/address_1/link.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ http://www.cs.jhu.edu/~yarowsky/jhu.sql
all_databases/address_1/schema.sql ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ create table Student (
2
+ StuID INTEGER PRIMARY KEY,
3
+ LName VARCHAR(12),
4
+ Fname VARCHAR(12),
5
+ Age INTEGER,
6
+ Sex VARCHAR(1),
7
+ Major INTEGER,
8
+ Advisor INTEGER,
9
+ city_code VARCHAR(3),
10
+ FOREIGN KEY(city_code) REFERENCES City(city_code)
11
+ );
12
+
13
+ create table Direct_distance (
14
+ city1_code varchar(3) ,
15
+ city2_code varchar(3) ,
16
+ distance INTEGER,
17
+ FOREIGN KEY(city1_code) REFERENCES City(city_code),
18
+ FOREIGN KEY(city2_code) REFERENCES City(city_code)
19
+
20
+ ) ;
21
+
22
+
23
+ create table City (
24
+ city_code VARCHAR(3) PRIMARY KEY,
25
+ city_name VARCHAR(25),
26
+ state VARCHAR(2),
27
+ country VARCHAR(25),
28
+ latitude FLOAT,
29
+ longitude FLOAT
30
+ );
31
+
32
+
33
+ insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
34
+ insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
35
+ insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
36
+ insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
37
+ insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
38
+ insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
39
+ insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
40
+ insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
41
+ insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
42
+ insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
43
+ insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
44
+ insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
45
+ insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
46
+ insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
47
+ insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
48
+ insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
49
+ insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
50
+ insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
51
+ insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
52
+ insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
53
+ insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
54
+ insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
55
+ insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
56
+ insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
57
+ insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
58
+ insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
59
+ insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
60
+ insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
61
+ insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
62
+ insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
63
+ insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
64
+ insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
65
+ insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
66
+ insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
67
+
68
+ insert into Direct_distance values ( 'BAL' , 'ATL' , 576 ) ;
69
+ insert into Direct_distance values ( 'BAL' , 'BAL' , 0 ) ;
70
+ insert into Direct_distance values ( 'BAL' , 'BKK' , 9631 ) ;
71
+ insert into Direct_distance values ( 'BAL' , 'BOS' , 370 ) ;
72
+ insert into Direct_distance values ( 'BAL' , 'CHI' , 621 ) ;
73
+ insert into Direct_distance values ( 'BAL' , 'CPK' , 21 ) ;
74
+ insert into Direct_distance values ( 'BAL' , 'DAL' , 1217 ) ;
75
+ insert into Direct_distance values ( 'BAL' , 'DEL' , 7469 ) ;
76
+ insert into Direct_distance values ( 'BAL' , 'DET' , 408 ) ;
77
+ insert into Direct_distance values ( 'BAL' , 'EWR' , 169 ) ;
78
+ insert into Direct_distance values ( 'BAL' , 'FRE' , 35 ) ;
79
+ insert into Direct_distance values ( 'BAL' , 'HKG' , 8409 ) ;
80
+ insert into Direct_distance values ( 'BAL' , 'HON' , 4832 ) ;
81
+ insert into Direct_distance values ( 'BAL' , 'HOU' , 1240 ) ;
82
+ insert into Direct_distance values ( 'BAL' , 'JNB' , 7850 ) ;
83
+ insert into Direct_distance values ( 'BAL' , 'LON' , 3652 ) ;
84
+ insert into Direct_distance values ( 'BAL' , 'LOS' , 2329 ) ;
85
+ insert into Direct_distance values ( 'BAL' , 'MIA' , 946 ) ;
86
+ insert into Direct_distance values ( 'BAL' , 'NAR' , 71 ) ;
87
+ insert into Direct_distance values ( 'BAL' , 'NYC' , 185 ) ;
88
+ insert into Direct_distance values ( 'BAL' , 'PAR' , 3800 ) ;
89
+ insert into Direct_distance values ( 'BAL' , 'PEK' , 8041 ) ;
90
+ insert into Direct_distance values ( 'BAL' , 'PHL' , 105 ) ;
91
+ insert into Direct_distance values ( 'BAL' , 'PIT' , 210 ) ;
92
+ insert into Direct_distance values ( 'BAL' , 'PVD' , 328 ) ;
93
+ insert into Direct_distance values ( 'BAL' , 'ROC' , 277 ) ;
94
+ insert into Direct_distance values ( 'BAL' , 'SAN' , 2295 ) ;
95
+ insert into Direct_distance values ( 'BAL' , 'SFO' , 2457 ) ;
96
+ insert into Direct_distance values ( 'BAL' , 'TYO' , 6740 ) ;
97
+ insert into Direct_distance values ( 'BAL' , 'WAS' , 35 ) ;
98
+ insert into Direct_distance values ( 'BAL' , 'YYZ' , 347 ) ;
99
+ insert into Direct_distance values ( 'ATL' , 'BAL' , 576 ) ;
100
+ insert into Direct_distance values ( 'ATL' , 'PHL' , 665 ) ;
101
+ insert into Direct_distance values ( 'BKK' , 'BAL' , 9631 ) ;
102
+ insert into Direct_distance values ( 'BOS' , 'BAL' , 370 ) ;
103
+ insert into Direct_distance values ( 'BOS' , 'EWR' , 200 ) ;
104
+ insert into Direct_distance values ( 'BOS' , 'PAR' , 3448 ) ;
105
+ insert into Direct_distance values ( 'BOS' , 'PHL' , 280 ) ;
106
+ insert into Direct_distance values ( 'CHI' , 'BAL' , 621 ) ;
107
+ insert into Direct_distance values ( 'CHI' , 'PHL' , 678 ) ;
108
+ insert into Direct_distance values ( 'CPK' , 'BAL' , 21 ) ;
109
+ insert into Direct_distance values ( 'DAL' , 'BAL' , 1217 ) ;
110
+ insert into Direct_distance values ( 'DEL' , 'BAL' , 7469 ) ;
111
+ insert into Direct_distance values ( 'DET' , 'BAL' , 408 ) ;
112
+ insert into Direct_distance values ( 'DET' , 'EWR' , 488 ) ;
113
+ insert into Direct_distance values ( 'DET' , 'PHL' , 453 ) ;
114
+ insert into Direct_distance values ( 'EWR' , 'BAL' , 169 ) ;
115
+ insert into Direct_distance values ( 'EWR' , 'BOS' , 200 ) ;
116
+ insert into Direct_distance values ( 'EWR' , 'DET' , 488 ) ;
117
+ insert into Direct_distance values ( 'EWR' , 'LON' , 3458 ) ;
118
+ insert into Direct_distance values ( 'EWR' , 'LOS' , 2454 ) ;
119
+ insert into Direct_distance values ( 'EWR' , 'LOS' , 2454 ) ;
120
+ insert into Direct_distance values ( 'EWR' , 'PHL' , 89 ) ;
121
+ insert into Direct_distance values ( 'EWR' , 'SAN' , 2425 ) ;
122
+ insert into Direct_distance values ( 'EWR' , 'WAS' , 199 ) ;
123
+ insert into Direct_distance values ( 'FRE' , 'BAL' , 35 ) ;
124
+ insert into Direct_distance values ( 'HKG' , 'BAL' , 8409 ) ;
125
+ insert into Direct_distance values ( 'HON' , 'BAL' , 4832 ) ;
126
+ insert into Direct_distance values ( 'HOU' , 'BAL' , 1240 ) ;
127
+ insert into Direct_distance values ( 'HOU' , 'LOS' , 1385 ) ;
128
+ insert into Direct_distance values ( 'HOU' , 'PHL' , 1324 ) ;
129
+ insert into Direct_distance values ( 'HOU' , 'SAN' , 1270 ) ;
130
+ insert into Direct_distance values ( 'HOU' , 'SFO' , 1635 ) ;
131
+ insert into Direct_distance values ( 'JNB' , 'BAL' , 7850 ) ;
132
+ insert into Direct_distance values ( 'LON' , 'BAL' , 3652 ) ;
133
+ insert into Direct_distance values ( 'LON' , 'EWR' , 3458 ) ;
134
+ insert into Direct_distance values ( 'LON' , 'NYC' , 3452 ) ;
135
+ insert into Direct_distance values ( 'LON' , 'PHL' , 3546 ) ;
136
+ insert into Direct_distance values ( 'LON' , 'TYO' , 5975 ) ;
137
+ insert into Direct_distance values ( 'LON' , 'WAS' , 3650 ) ;
138
+ insert into Direct_distance values ( 'LOS' , 'BAL' , 2329 ) ;
139
+ insert into Direct_distance values ( 'LOS' , 'EWR' , 2454 ) ;
140
+ insert into Direct_distance values ( 'LOS' , 'EWR' , 2454 ) ;
141
+ insert into Direct_distance values ( 'LOS' , 'HOU' , 1385 ) ;
142
+ insert into Direct_distance values ( 'LOS' , 'PHL' , 2401 ) ;
143
+ insert into Direct_distance values ( 'LOS' , 'SAN' , 109 ) ;
144
+ insert into Direct_distance values ( 'MIA' , 'BAL' , 946 ) ;
145
+ insert into Direct_distance values ( 'NAR' , 'BAL' , 71 ) ;
146
+ insert into Direct_distance values ( 'NYC' , 'BAL' , 185 ) ;
147
+ insert into Direct_distance values ( 'NYC' , 'LON' , 3452 ) ;
148
+ insert into Direct_distance values ( 'PAR' , 'BAL' , 3800 ) ;
149
+ insert into Direct_distance values ( 'PAR' , 'BOS' , 3448 ) ;
150
+ insert into Direct_distance values ( 'PEK' , 'BAL' , 8041 ) ;
151
+ insert into Direct_distance values ( 'PHL' , 'ATL' , 665 ) ;
152
+ insert into Direct_distance values ( 'PHL' , 'BAL' , 105 ) ;
153
+ insert into Direct_distance values ( 'PHL' , 'BOS' , 280 ) ;
154
+ insert into Direct_distance values ( 'PHL' , 'CHI' , 678 ) ;
155
+ insert into Direct_distance values ( 'PHL' , 'DET' , 453 ) ;
156
+ insert into Direct_distance values ( 'PHL' , 'EWR' , 89 ) ;
157
+ insert into Direct_distance values ( 'PHL' , 'HOU' , 1324 ) ;
158
+ insert into Direct_distance values ( 'PHL' , 'LON' , 3546 ) ;
159
+ insert into Direct_distance values ( 'PHL' , 'LOS' , 2401 ) ;
160
+ insert into Direct_distance values ( 'PHL' , 'PIT' , 267 ) ;
161
+ insert into Direct_distance values ( 'PHL' , 'SAN' , 2369 ) ;
162
+ insert into Direct_distance values ( 'PHL' , 'SFO' , 2521 ) ;
163
+ insert into Direct_distance values ( 'PHL' , 'WAS' , 119 ) ;
164
+ insert into Direct_distance values ( 'PIT' , 'BAL' , 210 ) ;
165
+ insert into Direct_distance values ( 'PIT' , 'PHL' , 267 ) ;
166
+ insert into Direct_distance values ( 'PIT' , 'SAN' , 2106 ) ;
167
+ insert into Direct_distance values ( 'PVD' , 'BAL' , 328 ) ;
168
+ insert into Direct_distance values ( 'ROC' , 'BAL' , 277 ) ;
169
+ insert into Direct_distance values ( 'ROC' , 'WAS' , 296 ) ;
170
+ insert into Direct_distance values ( 'SAN' , 'BAL' , 2295 ) ;
171
+ insert into Direct_distance values ( 'SAN' , 'EWR' , 2425 ) ;
172
+ insert into Direct_distance values ( 'SAN' , 'HOU' , 1270 ) ;
173
+ insert into Direct_distance values ( 'SAN' , 'LOS' , 109 ) ;
174
+ insert into Direct_distance values ( 'SAN' , 'PHL' , 2369 ) ;
175
+ insert into Direct_distance values ( 'SAN' , 'PIT' , 2106 ) ;
176
+ insert into Direct_distance values ( 'SFO' , 'BAL' , 2457 ) ;
177
+ insert into Direct_distance values ( 'SFO' , 'HOU' , 1635 ) ;
178
+ insert into Direct_distance values ( 'SFO' , 'PHL' , 2521 ) ;
179
+ insert into Direct_distance values ( 'TYO' , 'BAL' , 6740 ) ;
180
+ insert into Direct_distance values ( 'TYO' , 'LON' , 5975 ) ;
181
+ insert into Direct_distance values ( 'WAS' , 'BAL' , 35 ) ;
182
+ insert into Direct_distance values ( 'WAS' , 'EWR' , 199 ) ;
183
+ insert into Direct_distance values ( 'WAS' , 'LON' , 3650 ) ;
184
+ insert into Direct_distance values ( 'WAS' , 'PHL' , 119 ) ;
185
+ insert into Direct_distance values ( 'WAS' , 'ROC' , 296 ) ;
186
+ insert into Direct_distance values ( 'YYZ' , 'BAL' , 347 ) ;
187
+
188
+ insert into City values ( 'BAL' , 'Baltimore' , 'MD' , 'USA' , 39.288 , -76.617 ) ;
189
+ insert into City values ( 'PIT' , 'Pittsburgh' , 'PA' , 'USA' , 40.437 , -80.000 ) ;
190
+ insert into City values ( 'PHL' , 'Philadelphia' , 'PA' , 'USA' , 39.950 , -75.150 ) ;
191
+ insert into City values ( 'WAS' , 'Washington' , 'DC' , 'USA' , 38.892 , -77.017 ) ;
192
+ insert into City values ( 'NYC' , 'New York' , 'NY' , 'USA' , 40.849 , -73.867) ;
193
+ insert into City values ( 'ATL' , 'Atlanta' , 'GA' , 'USA' , 33.763 , -84.317 ) ;
194
+ insert into City values ( 'EWR' , 'Newark' , 'NJ' , 'USA' , 40.737 , -74.167 );
195
+ insert into City values ( 'FRE' , 'Frederick' , 'MD' , 'USA' , 39.415 , -77.417 ) ;
196
+ insert into City values ( 'NAR' , 'Newark' , 'DE' , 'USA' , 39.683 , -75.750 );
197
+ insert into City values ( 'SAN' , 'San Diego' , 'CA' , 'USA' , 32.713 , -117.150) ;
198
+ insert into City values ( 'LOS' , 'Los Angeles' , 'CA' , 'USA' , 34.058 ,-118.250) ;
199
+ insert into City values ( 'HON' , 'Honolulu' , 'HI' , 'USA' , 21.313 , -157.850 ) ;
200
+ insert into City values ( 'SFO' , 'San Francisco' , 'CA' , 'USA' , 37.775 ,-122.417) ;
201
+ insert into City values ( 'PVD' , 'Providence' , 'RI' , 'USA' , 41.817 , -71.400 ) ;
202
+ insert into City values ( 'BOS' , 'Boston' , 'MA' , 'USA' , 42.362 , -71.050 );
203
+ insert into City values ( 'DET' , 'Detroit' , 'MI' , 'USA' , 42.323 , -83.167 ) ;
204
+ insert into City values ( 'CHI' , 'Chicago' , 'IL' , 'USA' , 41.883 , -87.617 ) ;
205
+ insert into City values ( 'ROC' , 'Rochester' , 'NY' , 'USA' , 43.158 , -77.600 ) ;
206
+ insert into City values ( 'DAL' , 'Dallas' , 'TX' , 'USA' , 32.777 , -96.800 );
207
+ insert into City values ( 'HOU' , 'Houston' , 'TX' , 'USA' , 29.834 , -95.000 ) ;
208
+ insert into City values ( 'MIA' , 'Miami' , 'FL' , 'USA' , 25.465 , -80.150 ) ;
209
+ insert into City values ( 'CPK' , 'College Park' , 'MD' , 'USA' , 38.987 ,-76.933) ;
210
+ insert into City values ( 'YYZ' , 'Toronto' , 'ON' , 'CANADA' , 43.650 , -79.333 ) ;
211
+ insert into City values ( 'DEL' , 'Delhi' , 'DE' , 'INDIA' , 28.617 , 77.217 );
212
+ insert into City values ( 'PEK' , 'Beijing' , 'BE' , 'CHINA' , 39.917 ,116.417) ;
213
+ insert into City values ( 'HKG' , 'Hong Kong' , 'HK' , 'CHINA' , 22.250 ,114.167) ;
214
+ insert into City values ( 'TYO' , 'Tokyo' , 'XX' , 'JAPAN' , 35.700 , 139.767 ) ;
215
+ insert into City values ( 'LON' , 'London' , 'EN' , 'UK' , 51.500 , -0.167 ) ;
216
+ insert into City values ( 'PAR' , 'Paris' , 'XX' , 'FRANCE' , 48.867 , 2.333 );
217
+ insert into City values ( 'JNB' , 'Johannesburg' , 'XX' , 'SAFRICA' , -25.550 , 28.000 ) ;
218
+ insert into City values ( 'BKK' , 'Bangkok' , 'XX' , 'THAILAND' , 13.733 , 100.500 ) ;
all_databases/allergy_1/allergy_1.sqlite ADDED
Binary file (20.5 kB). View file
 
all_databases/allergy_1/schema.sql ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ create table Allergy_Type (
2
+ Allergy VARCHAR(20) PRIMARY KEY,
3
+ AllergyType VARCHAR(20)
4
+ );
5
+
6
+ create table Has_Allergy (
7
+ StuID INTEGER,
8
+ Allergy VARCHAR(20),
9
+ FOREIGN KEY(StuID) REFERENCES Student(StuID),
10
+ FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)
11
+ );
12
+
13
+ create table Student (
14
+ StuID INTEGER PRIMARY KEY,
15
+ LName VARCHAR(12),
16
+ Fname VARCHAR(12),
17
+ Age INTEGER,
18
+ Sex VARCHAR(1),
19
+ Major INTEGER,
20
+ Advisor INTEGER,
21
+ city_code VARCHAR(3)
22
+ );
23
+
24
+ insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
25
+ insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
26
+ insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
27
+ insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
28
+ insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
29
+ insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
30
+ insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
31
+ insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
32
+ insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
33
+ insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
34
+ insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
35
+ insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
36
+ insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
37
+ insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
38
+ insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
39
+ insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
40
+ insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
41
+ insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
42
+ insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
43
+ insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
44
+ insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
45
+ insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
46
+ insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
47
+ insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
48
+ insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
49
+ insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
50
+ insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
51
+ insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
52
+ insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
53
+ insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
54
+ insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
55
+ insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
56
+ insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
57
+ insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
58
+
59
+ insert into Has_Allergy values ( 1001, 'Cat' );
60
+ insert into Has_Allergy values ( 1002, 'Shellfish' );
61
+ insert into Has_Allergy values ( 1002, 'Tree Pollen' );
62
+ insert into Has_Allergy values ( 1003, 'Dog' );
63
+ insert into Has_Allergy values ( 1004, 'Nuts' );
64
+ insert into Has_Allergy values ( 1005, 'Nuts' );
65
+ insert into Has_Allergy values ( 1005, 'Tree Pollen' );
66
+ insert into Has_Allergy values ( 1006, 'Nuts' );
67
+ insert into Has_Allergy values ( 1007, 'Ragweed' );
68
+ insert into Has_Allergy values ( 1007, 'Tree Pollen' );
69
+ insert into Has_Allergy values ( 1007, 'Grass Pollen' );
70
+ insert into Has_Allergy values ( 1007, 'Eggs' );
71
+ insert into Has_Allergy values ( 1007, 'Milk' );
72
+ insert into Has_Allergy values ( 1007, 'Shellfish' );
73
+ insert into Has_Allergy values ( 1007, 'Anchovies' );
74
+ insert into Has_Allergy values ( 1007, 'Cat' );
75
+ insert into Has_Allergy values ( 1007, 'Dog' );
76
+ insert into Has_Allergy values ( 1009, 'Tree Pollen' );
77
+ insert into Has_Allergy values ( 1010, 'Ragweed' );
78
+ insert into Has_Allergy values ( 1010, 'Tree Pollen' );
79
+ insert into Has_Allergy values ( 1010, 'Grass Pollen' );
80
+ insert into Has_Allergy values ( 1010, 'Eggs' );
81
+ insert into Has_Allergy values ( 1010, 'Milk' );
82
+ insert into Has_Allergy values ( 1010, 'Shellfish' );
83
+ insert into Has_Allergy values ( 1010, 'Anchovies' );
84
+ insert into Has_Allergy values ( 1010, 'Cat' );
85
+ insert into Has_Allergy values ( 1010, 'Dog' );
86
+ insert into Has_Allergy values ( 1011, 'Ragweed' );
87
+ insert into Has_Allergy values ( 1012, 'Ragweed' );
88
+ insert into Has_Allergy values ( 1013, 'Ragweed' );
89
+ insert into Has_Allergy values ( 1014, 'Nuts' );
90
+ insert into Has_Allergy values ( 1015, 'Nuts' );
91
+ insert into Has_Allergy values ( 1015, 'Soy' );
92
+ insert into Has_Allergy values ( 1016, 'Nuts' );
93
+ insert into Has_Allergy values ( 1016, 'Milk' );
94
+ insert into Has_Allergy values ( 1017, 'Tree Pollen' );
95
+ insert into Has_Allergy values ( 1018, 'Nuts' );
96
+ insert into Has_Allergy values ( 1018, 'Soy' );
97
+ insert into Has_Allergy values ( 1019, 'Tree Pollen' );
98
+ insert into Has_Allergy values ( 1020, 'Tree Pollen' );
99
+ insert into Has_Allergy values ( 1021, 'Tree Pollen' );
100
+ insert into Has_Allergy values ( 1022, 'Nuts' );
101
+ insert into Has_Allergy values ( 1022, 'Anchovies' );
102
+ insert into Has_Allergy values ( 1023, 'Rodent' );
103
+ insert into Has_Allergy values ( 1023, 'Cat' );
104
+ insert into Has_Allergy values ( 1023, 'Nuts' );
105
+ insert into Has_Allergy values ( 1024, 'Ragweed' );
106
+ insert into Has_Allergy values ( 1024, 'Tree Pollen' );
107
+ insert into Has_Allergy values ( 1025, 'Tree Pollen' );
108
+ insert into Has_Allergy values ( 1026, 'Grass Pollen' );
109
+ insert into Has_Allergy values ( 1027, 'Tree Pollen' );
110
+ insert into Has_Allergy values ( 1028, 'Tree Pollen' );
111
+ insert into Has_Allergy values ( 1029, 'Soy' );
112
+ insert into Has_Allergy values ( 1029, 'Nuts' );
113
+ insert into Has_Allergy values ( 1029, 'Eggs' );
114
+ insert into Has_Allergy values ( 1030, 'Grass Pollen' );
115
+ insert into Has_Allergy values ( 1031, 'Nuts' );
116
+ insert into Has_Allergy values ( 1031, 'Shellfish' );
117
+ insert into Has_Allergy values ( 1031, 'Soy' );
118
+
119
+ insert into Allergy_Type values ( 'Eggs', 'food' );
120
+ insert into Allergy_Type values ( 'Nuts', 'food' );
121
+ insert into Allergy_Type values ( 'Milk', 'food' );
122
+ insert into Allergy_Type values ( 'Shellfish', 'food' );
123
+ insert into Allergy_Type values ( 'Anchovies', 'food' );
124
+ insert into Allergy_Type values ( 'Wheat', 'food' );
125
+ insert into Allergy_Type values ( 'Soy', 'food' );
126
+ insert into Allergy_Type values ( 'Ragweed', 'environmental' );
127
+ insert into Allergy_Type values ( 'Tree Pollen', 'environmental' );
128
+ insert into Allergy_Type values ( 'Grass Pollen', 'environmental' );
129
+ insert into Allergy_Type values ( 'Cat', 'animal' );
130
+ insert into Allergy_Type values ( 'Dog', 'animal' );
131
+ insert into Allergy_Type values ( 'Rodent', 'animal' );
132
+ insert into Allergy_Type values ( 'Bee Stings', 'animal' );
all_databases/architecture/architecture.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/architecture/schema.sql ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "architect" (
4
+ "id" text,
5
+ "name" text,
6
+ "nationality" text,
7
+ "gender" text,
8
+ primary key("id")
9
+ );
10
+
11
+ CREATE TABLE "bridge" (
12
+ "architect_id" int,
13
+ "id" int,
14
+ "name" text,
15
+ "location" text,
16
+ "length_meters" real,
17
+ "length_feet" real,
18
+ primary key("id"),
19
+ foreign key ("architect_id" ) references `architect`("id")
20
+ );
21
+
22
+ CREATE TABLE "mill" (
23
+ "architect_id" int,
24
+ "id" int,
25
+ "location" text,
26
+ "name" text,
27
+ "type" text,
28
+ "built_year" int,
29
+ "notes" text,
30
+ primary key ("id"),
31
+ foreign key ("architect_id" ) references `architect`("id")
32
+ );
33
+
34
+
35
+ INSERT INTO "architect" VALUES (1, "Frank Lloyd Wright", "American", "male");
36
+ INSERT INTO "architect" VALUES (2, "Frank Gehry", "Canadian", "male");
37
+ INSERT INTO "architect" VALUES (3, "Zaha Hadid", "Iraqi, British", "female");
38
+ INSERT INTO "architect" VALUES (4, "Mies Van Der Rohe", "German, American", "male");
39
+ INSERT INTO "architect" VALUES (5, "Le Corbusier", "Swiss, French", "male");
40
+
41
+
42
+ INSERT INTO "bridge" VALUES (1,"1","Xian Ren Qiao (Fairy Bridge)","Guangxi , China","121","400");
43
+ INSERT INTO "bridge" VALUES (2,"2","Landscape Arch","Arches National Park , Utah , USA","88","290");
44
+ INSERT INTO "bridge" VALUES (3,"3","Kolob Arch","Zion National Park , Utah , USA","87","287");
45
+ INSERT INTO "bridge" VALUES (4,"4","Aloba Arch","Ennedi Plateau , Chad","76","250");
46
+ INSERT INTO "bridge" VALUES (5,"5","Morning Glory Natural Bridge","Negro Bill Canyon , Utah , USA","74","243");
47
+ INSERT INTO "bridge" VALUES (5,"6","Rainbow Bridge","Glen Canyon National Recreation Area , Utah , USA","71","234");
48
+ INSERT INTO "bridge" VALUES (4,"7","Gaotun Natural Bridge","Guizhou , China","70","230");
49
+ INSERT INTO "bridge" VALUES (3,"8","Sipapu Natural Bridge","Natural Bridges National Monument , Utah , USA","69","225");
50
+ INSERT INTO "bridge" VALUES (2,"9","Stevens Arch","Escalante Canyon , Utah , USA","67","220");
51
+ INSERT INTO "bridge" VALUES (1,"10","Shipton's Arch","Xinjiang , China","65","212");
52
+ INSERT INTO "bridge" VALUES (1,"11","Jiangzhou Arch","Guangxi , China","65","212");
53
+ INSERT INTO "bridge" VALUES (1,"12","Hazarchishma Natural Bridge","Bamiyan Province , Afghanistan","64.2","210.6");
54
+ INSERT INTO "bridge" VALUES (2,"13","Outlaw Arch","Dinosaur National Monument , Colorado , USA","63","206");
55
+ INSERT INTO "bridge" VALUES (2,"14","Snake Bridge","Sanostee , New Mexico , USA","62","204");
56
+ INSERT INTO "bridge" VALUES (5,"15","Wrather Arch","Wrather Canyon , Arizona , USA","75","246");
57
+
58
+
59
+ INSERT INTO "mill" VALUES (1,1,"Coswarem","Le Vieux Molen","Grondzeiler","1840","Molenechos (Dutch)");
60
+ INSERT INTO "mill" VALUES (1,2,"Donceel","Moulin Bertrand","Grondzeiler","1890","Molenechos (Dutch)");
61
+ INSERT INTO "mill" VALUES (2,3,"Fexhe-le-haut-Clocher","Moulin de Fexhe","Grondzeiler","1843","Molenechos (Dutch)");
62
+ INSERT INTO "mill" VALUES (3,4,"Momalle","Moulin de Momalle","Bergmolen","1850","Molenechos (Dutch)");
63
+ INSERT INTO "mill" VALUES (4,5,"Othée","Moulin du Château","Grondzeiler","1856","Molenechos (Dutch)");
64
+ INSERT INTO "mill" VALUES (4,6,"Pousset","Moulin de Pousset","Grondzeiler","1819","Molenechos (Dutch)");
65
+
all_databases/baseball_1/baseball_1.sqlite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbeb49298ffc84465f7a27f3477fe73e05a2ced8d4c3c972d20d75c25820f29b
3
+ size 29794304
all_databases/baseball_1/schema.sql ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2e61f0638e45f4d9f869c377b56f99f988d58f2a64999637c93691ebf2eb3a2
3
+ size 57608249
all_databases/battle_death/battle_death.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/battle_death/schema.sql ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+ CREATE TABLE "battle" (
3
+ "id" int,
4
+ "name" text,
5
+ "date" text,
6
+ "bulgarian_commander" text,
7
+ "latin_commander" text,
8
+ "result" text,
9
+ primary key("id")
10
+ );
11
+
12
+ CREATE TABLE "ship" (
13
+ "lost_in_battle" int,
14
+ "id" int,
15
+ "name" text,
16
+ "tonnage" text,
17
+ "ship_type" text,
18
+ "location" text,
19
+ "disposition_of_ship" text,
20
+ primary key("id"),
21
+ foreign key (`lost_in_battle`) references `battle`("id")
22
+ );
23
+
24
+
25
+ CREATE TABLE "death" (
26
+ "caused_by_ship_id" int,
27
+ "id" int,
28
+ "note" text,
29
+ "killed" int,
30
+ "injured" int,
31
+ primary key("id"),
32
+ foreign key ("caused_by_ship_id") references `ship`("id")
33
+ );
34
+
35
+ INSERT INTO "battle" VALUES (1,"Battle of Adrianople","14 April 1205","Kaloyan","Baldwin I","Bulgarian victory");
36
+ INSERT INTO "battle" VALUES (2,"Battle of Serres","June 1205","Kaloyan","Unknown","Bulgarian victory");
37
+ INSERT INTO "battle" VALUES (3,"Battle of Rusion","31 January 1206","Kaloyan","Thierry de Termond","Bulgarian victory");
38
+ INSERT INTO "battle" VALUES (4,"Battle of Rodosto","February 1206","Kaloyan","Unknown","Bulgarian victory");
39
+ INSERT INTO "battle" VALUES (5,"Battle of Messinopolis","4 September 1207","Unknown","Boniface of Montferrat","Bulgarian victory");
40
+ INSERT INTO "battle" VALUES (6,"Battle of Boruy","June 1205","Boril","Henry I","Bulgarian victory");
41
+ INSERT INTO "battle" VALUES (7,"Battle of Philippopolis","31 June 1208","Boril","Henry I","Latin victory");
42
+ INSERT INTO "battle" VALUES (8,"Siege of Constantinople","1235","Ivan Asen II","John of Brienne","Two Year Truce");
43
+
44
+
45
+ INSERT INTO "ship" VALUES (8, 1, "Lettice","t","Brig","English Channel","Captured");
46
+ INSERT INTO "ship" VALUES (7, 2, "Bon Accord","t","Brig","English Channel","Captured");
47
+ INSERT INTO "ship" VALUES (6, 3, "Mary","t","Brig","English Channel","Captured");
48
+ INSERT INTO "ship" VALUES (5, 4, "HMS Avon","391","18-gun Brig","English Channel","Wrecked");
49
+ INSERT INTO "ship" VALUES (5, 5, "Three Brothers","t","Brig","SW Approaches","Scuttled");
50
+ INSERT INTO "ship" VALUES (4, 6, "Bacchus","t","Brig","English Channel","Sank");
51
+ INSERT INTO "ship" VALUES (8, 7, "HMS Atalanta","225","8 gun Brig","Mid-Atlantic","Captured");
52
+
53
+ INSERT INTO "death" VALUES (1, "1","Dantewada, Chhattisgarh","8","0");
54
+ INSERT INTO "death" VALUES (2, "2","Dantewada, Chhattisgarh","3","0");
55
+ INSERT INTO "death" VALUES (3, "13","Erraboru, Chhattisgarh","25","0");
56
+ INSERT INTO "death" VALUES (3, "3","East Champaran, Bihar","2","0");
57
+ INSERT INTO "death" VALUES (4, "4","Gajapati, Odisha","3","0");
58
+ INSERT INTO "death" VALUES (4, "5","Sundargarh, Odisha","0","9");
59
+ INSERT INTO "death" VALUES (5, "6","Dantewada, Chhattisgarh","0","0");
60
+ INSERT INTO "death" VALUES (5, "7","Dantewada, Chhattisgarh","4","5");
61
+ INSERT INTO "death" VALUES (6, "8","Kanker, Chhattisgarh","0","0");
62
+ INSERT INTO "death" VALUES (1, "9","Dantewada, Chhattisgarh","29","0");
63
+ INSERT INTO "death" VALUES (3, "10","WestMidnapore, West Bengal","0","0");
64
+ INSERT INTO "death" VALUES (2, "11","Bastar, Chattisgarh","0","0");
65
+ INSERT INTO "death" VALUES (5, "12","Bokaro, Jharkhand","14","0");
all_databases/behavior_monitoring/behavior_monitoring.sqlite ADDED
Binary file (65.5 kB). View file
 
all_databases/behavior_monitoring/schema.sql ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+ CREATE TABLE `Ref_Address_Types` (
3
+ `address_type_code` VARCHAR(15) PRIMARY KEY,
4
+ `address_type_description` VARCHAR(80)
5
+ );
6
+ CREATE TABLE `Ref_Detention_Type` (
7
+ `detention_type_code` VARCHAR(10) PRIMARY KEY,
8
+ `detention_type_description` VARCHAR(80)
9
+ );
10
+ CREATE TABLE `Ref_Incident_Type` (
11
+ `incident_type_code` VARCHAR(10) PRIMARY KEY,
12
+ `incident_type_description` VARCHAR(80)
13
+ );
14
+
15
+ INSERT INTO Ref_Address_Types (`address_type_code`, `address_type_description`) VALUES ('BILL', 'Billing');
16
+ INSERT INTO Ref_Address_Types (`address_type_code`, `address_type_description`) VALUES ('HOME', 'Home or Residence');
17
+ INSERT INTO Ref_Detention_Type (`detention_type_code`, `detention_type_description`) VALUES ('BREAK ', 'During Break time');
18
+ INSERT INTO Ref_Detention_Type (`detention_type_code`, `detention_type_description`) VALUES ('AFTER', 'After School');
19
+ INSERT INTO Ref_Detention_Type (`detention_type_code`, `detention_type_description`) VALUES ('LUNCH', 'Lunch-time');
20
+ INSERT INTO Ref_Incident_Type (`incident_type_code`, `incident_type_description`) VALUES ('NOISE', 'Noise');
21
+ INSERT INTO Ref_Incident_Type (`incident_type_code`, `incident_type_description`) VALUES ('VIOLENCE', 'Violence');
22
+ INSERT INTO Ref_Incident_Type (`incident_type_code`, `incident_type_description`) VALUES ('DISTURB', 'Disturbance');
23
+
24
+
25
+
26
+
27
+ CREATE TABLE `Addresses` (
28
+ `address_id` INTEGER PRIMARY KEY,
29
+ `line_1` VARCHAR(120),
30
+ `line_2` VARCHAR(120),
31
+ `line_3` VARCHAR(120),
32
+ `city` VARCHAR(80),
33
+ `zip_postcode` VARCHAR(20),
34
+ `state_province_county` VARCHAR(50),
35
+ `country` VARCHAR(50),
36
+ `other_address_details` VARCHAR(255)
37
+ );
38
+
39
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (1, '020 Orie Canyon', NULL, NULL, 'North Loyceville', '197', 'Hawaii', 'USA', NULL);
40
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (2, '1333 Boyle Lane', NULL, NULL, 'West Sean', '937', 'Illinois', 'USA', NULL);
41
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (3, '027 Kim Divide Apt. 492', NULL, NULL, 'Beierview', '918', 'Texas', 'USA', NULL);
42
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (4, '056 Murphy Stravenue Apt. 600', NULL, NULL, 'Elinoreport', '238', 'Wisconsin', 'USA', NULL);
43
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (5, '719 Pfannerstill Ridge Suite 663', NULL, NULL, 'Meganeland', '002', 'SouthDakota', 'USA', NULL);
44
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (6, '420 Zieme Oval', NULL, NULL, 'Corkeryborough', '744', 'Wisconsin', 'USA', NULL);
45
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (7, '27712 Marks Lake Apt. 752', NULL, NULL, 'Gleasonshire', '182', 'Maryland', 'USA', NULL);
46
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (8, '6960 O''Connell Dale Suite 622', NULL, NULL, 'New Annabellefort', '062', 'Kentucky', 'USA', NULL);
47
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (9, '18327 Jaime Terrace Suite 343', NULL, NULL, 'Edmundton', '520', 'Oregon', 'USA', NULL);
48
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (10, '3069 Garrison Squares', NULL, NULL, 'Lake Ahmadland', '748', 'Nevada', 'USA', NULL);
49
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (11, '668 Wilkinson Corners Apt. 992', NULL, NULL, 'North Jayceton', '612', 'Illinois', 'USA', NULL);
50
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (12, '11940 Pauline Shoals', NULL, NULL, 'West Lianafurt', '619', 'Arkansas', 'USA', NULL);
51
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (13, '39834 Anne Mission Apt. 956', NULL, NULL, 'North Orlobury', '663', 'Utah', 'USA', NULL);
52
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (14, '4115 Ebert Fall', NULL, NULL, 'North Fletcherside', '607', 'Arizona', 'USA', NULL);
53
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (15, '920 Brayan Harbors', NULL, NULL, 'Caitlynstad', '435', 'Montana', 'USA', NULL);
54
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (16, '014 Runte Haven Apt. 870', NULL, NULL, 'Tressamouth', '637', 'NewYork', 'USA', NULL);
55
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (17, '654 Fisher Roads', NULL, NULL, 'Hegmannborough', '397', 'Tennessee', 'USA', NULL);
56
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (18, '266 Kub Crossing', NULL, NULL, 'Hintzport', '865', 'Alabama', 'USA', NULL);
57
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (19, '51391 Dach Parkways Apt. 124', NULL, NULL, 'Unachester', '753', 'Wisconsin', 'USA', NULL);
58
+ INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (20, '2451 Wiza Inlet', NULL, NULL, 'Larkinport', '545', 'NewYork', 'USA', NULL);
59
+
60
+
61
+ CREATE TABLE `Students` (
62
+ `student_id` INTEGER PRIMARY KEY,
63
+ `address_id` INTEGER NOT NULL,
64
+ `first_name` VARCHAR(80),
65
+ `middle_name` VARCHAR(40),
66
+ `last_name` VARCHAR(40),
67
+ `cell_mobile_number` VARCHAR(40),
68
+ `email_address` VARCHAR(40),
69
+ `date_first_rental` DATETIME,
70
+ `date_left_university` DATETIME,
71
+ `other_student_details` VARCHAR(255),
72
+ FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )
73
+ );
74
+
75
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (1, 19, 'Emma', 'Frederic', 'Rohan', '235.899.9744', 'derrick.jenkins@example.com', '2017-12-05 15:20:04', '2018-03-03 03:33:05', NULL);
76
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (2, 9, 'Louvenia', 'Fatima', 'Hansen', '1-247-673-8446', 'rohan.clarabelle@example.org', '2017-08-08 22:30:36', '2018-02-24 11:12:11', NULL);
77
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (3, 10, 'Rhea', 'Gardner', 'Bergnaum', '1-751-162-9676x115', 'kkirlin@example.org', '2017-11-15 04:57:28', '2018-03-19 12:49:20', NULL);
78
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (4, 8, 'David', 'Darlene', 'Gorczany', '1-895-196-9979', 'eolson@example.com', '2018-02-15 20:03:11', '2018-03-11 02:21:24', NULL);
79
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (5, 8, 'Lucile', 'Stone', 'Gottlieb', '1-036-062-5465', 'dicki.kathryne@example.org', '2017-07-20 18:20:27', '2018-03-18 16:07:42', NULL);
80
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (6, 12, 'Antonietta', 'Crystal', 'Fahey', '(874)070-9495', 'norwood.howell@example.org', '2017-10-31 12:33:09', '2018-03-20 22:01:07', NULL);
81
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (7, 20, 'Rupert', 'Lincoln', 'Marks', '763.072.5520x5907', 'lisette.brekke@example.net', '2017-09-25 12:02:23', '2018-03-01 08:56:04', 'first honor');
82
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (8, 14, 'Julia', 'Arno', 'Balistreri', '319.497.4575x2214', 'jasmin.schuppe@example.com', '2018-02-23 02:28:07', '2018-03-01 16:03:55', NULL);
83
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (9, 19, 'Christy', 'Devonte', 'Huels', '(568)451-0917x3945', 'dora.zboncak@example.org', '2018-01-11 19:49:39', '2018-03-15 01:47:11', NULL);
84
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (10, 2, 'Adella', 'Chesley', 'Krajcik', '08605192839', 'frederique.mante@example.org', '2017-07-05 19:15:29', '2018-03-11 15:57:19', 'first honor');
85
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (11, 2, 'Isac', 'Cleta', 'Fadel', '+60(5)3280072514', 'qharvey@example.com', '2017-09-13 04:06:15', '2018-03-05 07:30:22', 'first honor');
86
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (12, 1, 'Ferne', 'Jerod', 'Weimann', '(921)011-7909x3518', 'mitchel55@example.net', '2017-05-24 05:00:18', '2018-02-28 12:33:53', NULL);
87
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (13, 17, 'Misael', 'Justyn', 'Will', '(062)892-7033', 'gbeatty@example.com', '2017-10-15 06:52:46', '2018-03-18 07:01:27', NULL);
88
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (14, 9, 'Fanny', 'Ashlee', 'Haley', '(820)260-5721', 'foster.zemlak@example.com', '2018-03-14 11:37:10', '2018-03-12 15:05:53', NULL);
89
+ INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (15, 15, 'Eugene', 'Mustafa', 'Tremblay', '1-498-138-8088', 'kertzmann.devon@example.net', '2018-03-11 22:42:47', '2018-03-07 11:41:26', 'first honor');
90
+
91
+
92
+ CREATE TABLE `Teachers` (
93
+ `teacher_id` INTEGER PRIMARY KEY,
94
+ `address_id` INTEGER NOT NULL,
95
+ `first_name` VARCHAR(80),
96
+ `middle_name` VARCHAR(80),
97
+ `last_name` VARCHAR(80),
98
+ `gender` VARCHAR(1),
99
+ `cell_mobile_number` VARCHAR(40),
100
+ `email_address` VARCHAR(40),
101
+ `other_details` VARCHAR(255),
102
+ FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )
103
+ );
104
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (1, 15, 'Lyla', 'Wilson', 'Medhurst', '1', '792.333.7714', 'ohammes@example.com', NULL);
105
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (2, 7, 'Sid', 'Tremayne', 'Brakus', '1', '202.626.1698x9242', 'deborah37@example.com', NULL);
106
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (3, 8, 'Trystan', 'Alexane', 'Schuster', '1', '583-467-0403x647', 'hilll.kitty@example.com', NULL);
107
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (4, 7, 'Donnie', 'Morgan', 'Kuhic', '1', '07928511102', 'destany.reichert@example.net', NULL);
108
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (5, 15, 'Aniya', 'Ian', 'Becker', '1', '599.373.0773x67706', 'hahn.isom@example.com', 'Dean');
109
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (6, 16, 'Citlalli', 'Ahmad', 'Kuhic', '1', '017.636.7409', 'kozey.adeline@example.org', NULL);
110
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (7, 3, 'Alvis', 'Macey', 'Schultz', '1', '944-154-5379x4990', 'everardo.lynch@example.net', NULL);
111
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (8, 13, 'Cecilia', 'Mitchel', 'Ward', '0', '809.852.7009', 'paula.abbott@example.org', NULL);
112
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (9, 2, 'Woodrow', 'Lilla', 'Goldner', '1', '084-270-4880', 'ierdman@example.com', NULL);
113
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (10, 8, 'Gregory', 'Ardith', 'Heller', '0', '908-759-1808x63115', 'valentina.yost@example.com', NULL);
114
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (11, 12, 'Edmond', 'Kailyn', 'Lang', '0', '(659)018-0143x379', 'lila58@example.com', NULL);
115
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (12, 10, 'Camren', 'Kendall', 'Moore', '1', '(381)799-4759x169', 'randy.gerhold@example.org', NULL);
116
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (13, 19, 'Stephanie', 'Tamara', 'Price', '0', '952.821.3392', 'kiana.lang@example.net', NULL);
117
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (14, 14, 'Evelyn', 'Keanu', 'Hansen', '0', '1-787-044-8336x606', 'maribel21@example.org', NULL);
118
+ INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (15, 10, 'Hobart', 'Michel', 'Bergnaum', '1', '796-453-5175x64012', 'willms.lane@example.com', NULL);
119
+
120
+
121
+ CREATE TABLE `Assessment_Notes` (
122
+ `notes_id` INTEGER NOT NULL ,
123
+ `student_id` INTEGER,
124
+ `teacher_id` INTEGER NOT NULL,
125
+ `date_of_notes` DATETIME,
126
+ `text_of_notes` VARCHAR(255),
127
+ `other_details` VARCHAR(255),
128
+ FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),
129
+ FOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )
130
+ );
131
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (1, 7, 3, '1978-04-15 04:49:18', NULL, NULL);
132
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (2, 11, 10, '2005-06-30 02:48:35', NULL, NULL);
133
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (3, 15, 3, '1988-06-09 00:24:01', NULL, NULL);
134
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (4, 12, 9, '1991-08-15 01:22:08', NULL, NULL);
135
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (5, 4, 10, '1971-05-05 20:07:08', NULL, NULL);
136
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (6, 12, 6, '2014-01-31 02:05:02', NULL, NULL);
137
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (7, 12, 7, '1984-12-13 23:04:28', NULL, NULL);
138
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (8, 7, 14, '1988-04-11 04:56:26', NULL, NULL);
139
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (9, 14, 15, '1972-04-27 04:51:51', NULL, NULL);
140
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (10, 13, 6, '2017-12-14 08:21:54', NULL, NULL);
141
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (11, 3, 14, '1993-08-16 17:39:53', NULL, NULL);
142
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (12, 1, 1, '1991-08-20 08:03:23', NULL, NULL);
143
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (13, 13, 3, '2014-04-28 02:07:53', NULL, NULL);
144
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (14, 14, 15, '1974-11-26 04:23:22', NULL, NULL);
145
+ INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (15, 1, 9, '1984-09-10 01:18:34', NULL, NULL);
146
+
147
+
148
+ CREATE TABLE `Behavior_Incident` (
149
+ `incident_id` INTEGER PRIMARY KEY,
150
+ `incident_type_code` VARCHAR(10) NOT NULL,
151
+ `student_id` INTEGER NOT NULL,
152
+ `date_incident_start` DATETIME,
153
+ `date_incident_end` DATETIME,
154
+ `incident_summary` VARCHAR(255),
155
+ `recommendations` VARCHAR(255),
156
+ `other_details` VARCHAR(255),
157
+ FOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),
158
+ FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )
159
+ );
160
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (1, 'NOISE', 6, '2017-07-09 10:04:13', '2018-03-08 14:08:54', NULL, NULL, NULL);
161
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (2, 'DISTURB', 13, '2018-01-31 10:51:13', '2018-03-18 18:40:05', NULL, NULL, NULL);
162
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (3, 'VIOLENCE', 1, '2017-10-10 22:43:54', '2018-03-22 02:10:35', NULL, 'Transfer schools', NULL);
163
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (4, 'VIOLENCE', 10, '2017-07-20 17:43:50', '2018-03-09 06:28:44', NULL, NULL, NULL);
164
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (5, 'NOISE', 7, '2017-08-13 22:15:05', '2018-02-25 05:38:58', NULL, NULL, NULL);
165
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (6, 'VIOLENCE', 8, '2017-06-09 18:32:28', '2018-03-20 10:32:10', NULL, NULL, NULL);
166
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (7, 'VIOLENCE', 4, '2017-04-23 07:03:17', '2018-03-19 02:35:39', NULL, NULL, NULL);
167
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (8, 'DISTURB', 1, '2017-05-02 12:52:09', '2018-03-18 01:23:29', NULL, NULL, NULL);
168
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (9, 'NOISE', 11, '2017-06-19 14:25:54', '2018-03-08 09:36:36', NULL, NULL, NULL);
169
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (10, 'NOISE', 1, '2018-01-27 09:24:45', '2018-03-13 05:18:05', NULL, NULL, NULL);
170
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (11, 'VIOLENCE', 9, '2018-03-06 21:03:58', '2018-03-06 14:44:37', NULL, 'Transfer schools', NULL);
171
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (12, 'DISTURB', 7, '2017-08-27 03:21:30', '2018-03-02 16:06:34', NULL, NULL, NULL);
172
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (13, 'VIOLENCE', 5, '2017-05-25 15:02:53', '2018-03-10 21:12:22', NULL, NULL, NULL);
173
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (14, 'NOISE', 1, '2017-08-29 20:48:56', '2018-03-16 14:37:20', NULL, 'Transfer schools', NULL);
174
+ INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (15, 'NOISE', 15, '2018-02-05 13:13:45', '2018-03-08 09:00:48', NULL, NULL, NULL);
175
+
176
+
177
+ CREATE TABLE `Detention` (
178
+ `detention_id` INTEGER PRIMARY KEY,
179
+ `detention_type_code` VARCHAR(10) NOT NULL,
180
+ `teacher_id` INTEGER,
181
+ `datetime_detention_start` DATETIME,
182
+ `datetime_detention_end` DATETIME,
183
+ `detention_summary` VARCHAR(255),
184
+ `other_details` VARCHAR(255),
185
+ FOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),
186
+ FOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )
187
+ );
188
+
189
+ CREATE TABLE `Student_Addresses` (
190
+ `student_id` INTEGER NOT NULL,
191
+ `address_id` INTEGER NOT NULL,
192
+ `date_address_from` DATETIME NOT NULL,
193
+ `date_address_to` DATETIME,
194
+ `monthly_rental` DECIMAL(19,4),
195
+ `other_details` VARCHAR(255),
196
+ FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),
197
+ FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )
198
+ );
199
+
200
+ CREATE TABLE `Students_in_Detention` (
201
+ `student_id` INTEGER NOT NULL,
202
+ `detention_id` INTEGER NOT NULL,
203
+ `incident_id` INTEGER NOT NULL,
204
+ FOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),
205
+ FOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),
206
+ FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )
207
+ );
208
+
209
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (1, 'AFTER', 7, '2017-09-05 00:38:25', '2018-03-08 02:08:32', NULL, NULL);
210
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (2, 'AFTER', 14, '2018-01-10 08:09:02', '2018-03-07 04:24:48', NULL, NULL);
211
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (3, 'BREAK ', 11, '2017-12-14 06:40:29', '2018-03-08 09:16:38', NULL, NULL);
212
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (4, 'AFTER', 8, '2017-06-09 06:13:09', '2018-03-21 19:34:56', NULL, NULL);
213
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (5, 'BREAK ', 3, '2017-08-25 12:00:46', '2018-03-11 13:21:07', NULL, NULL);
214
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (6, 'BREAK ', 12, '2017-10-20 22:34:44', '2018-03-11 12:58:40', NULL, NULL);
215
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (7, 'BREAK ', 15, '2018-02-19 11:44:52', '2018-03-17 12:35:41', NULL, NULL);
216
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (8, 'BREAK ', 5, '2017-11-26 15:05:05', '2018-03-16 01:37:25', NULL, NULL);
217
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (9, 'LUNCH', 15, '2017-10-30 16:04:00', '2018-03-22 20:15:47', NULL, NULL);
218
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (10, 'AFTER', 15, '2018-01-29 20:43:45', '2018-03-05 03:31:24', NULL, NULL);
219
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (11, 'AFTER', 8, '2017-10-03 18:44:31', '2018-03-03 14:58:43', NULL, NULL);
220
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (12, 'LUNCH', 3, '2018-01-20 19:06:56', '2018-02-25 07:20:30', NULL, NULL);
221
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (13, 'BREAK ', 10, '2017-08-02 07:46:39', '2018-03-10 14:58:31', NULL, NULL);
222
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (14, 'AFTER', 12, '2017-12-18 13:47:51', '2018-03-04 20:52:51', NULL, NULL);
223
+ INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (15, 'LUNCH', 11, '2017-08-21 06:41:29', '2018-03-13 20:37:39', NULL, NULL);
224
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (6, 12, '2017-10-16 13:56:34', '2018-03-15 10:37:19', '826.4319', 'house');
225
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (3, 18, '2017-06-19 12:39:39', '2018-03-02 00:19:57', '1113.0996', 'house');
226
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (8, 1, '2017-10-31 12:40:34', '2018-02-25 05:21:34', '1297.3186', 'apartment');
227
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (7, 3, '2017-04-28 06:27:14', '2018-03-23 09:52:56', '894.0958', 'house');
228
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (13, 16, '2018-03-23 08:25:36', '2018-03-12 17:21:24', '1297.8070', 'apartment');
229
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (11, 12, '2018-02-18 06:58:49', '2018-02-27 04:45:57', '747.5312', 'house');
230
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (4, 1, '2017-06-22 12:20:52', '2018-03-04 17:04:35', '756.6745', 'house');
231
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (2, 8, '2017-07-21 10:13:10', '2018-03-20 09:02:48', '1287.5604', 'house');
232
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (7, 13, '2018-01-13 22:56:06', '2018-03-22 17:56:20', '1067.8383', 'house');
233
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (4, 2, '2017-09-10 19:41:10', '2018-03-04 06:51:19', '1132.7420', 'house');
234
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (8, 16, '2018-01-12 13:23:23', '2018-03-04 06:05:45', '683.0735', 'house');
235
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (5, 13, '2017-03-29 18:22:55', '2018-03-14 09:12:05', '1036.8462', 'apartment');
236
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (2, 3, '2017-08-12 18:28:31', '2018-03-06 21:41:20', '800.1214', 'house');
237
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (2, 8, '2017-04-18 05:36:44', '2018-03-07 04:29:28', '865.2615', 'house');
238
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (9, 9, '2018-02-04 02:28:04', '2018-03-12 02:57:48', '679.2988', 'house');
239
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (13, 19, '2017-08-17 11:51:00', '2018-03-04 13:24:28', '644.9306', 'apartment');
240
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (15, 1, '2018-03-05 19:28:26', '2018-03-15 04:44:58', '1032.8717', 'apartment');
241
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (12, 10, '2017-09-23 05:16:17', '2018-03-05 21:12:37', '1032.9782', 'apartment');
242
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (1, 5, '2017-11-12 04:24:02', '2018-03-14 17:00:44', '1007.2597', 'apartment');
243
+ INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (10, 18, '2017-10-09 17:31:44', '2018-03-18 03:28:47', '620.2801', 'house');
244
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (3, 15, 1);
245
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (8, 13, 3);
246
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (11, 6, 11);
247
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (12, 12, 1);
248
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (14, 15, 13);
249
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (7, 7, 8);
250
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (13, 9, 12);
251
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (10, 14, 8);
252
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (12, 2, 13);
253
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (12, 12, 1);
254
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (9, 15, 15);
255
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (10, 7, 12);
256
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (13, 3, 3);
257
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (8, 15, 14);
258
+ INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (8, 14, 14);
all_databases/bike_racing/bike_racing.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/bike_racing/schema.sql ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys=ON;
2
+ BEGIN TRANSACTION;
3
+ CREATE TABLE IF NOT EXISTS "bike" (
4
+ "id" int,
5
+ "product_name" text,
6
+ "weight" int,
7
+ "price" real,
8
+ "material" text,
9
+ primary key("id")
10
+ );
11
+ INSERT INTO bike VALUES(1,'BIANCHI SPECIALISSIMA',780,9998.9999999999999999,'Carbon CC');
12
+ INSERT INTO bike VALUES(2,'CANNONDALE SUPERSIX EVO HI-MOD DURA ACE',850,5329.9999999999999999,'carbon fiber');
13
+ INSERT INTO bike VALUES(3,'CANYON AEROAD CF SLX 8.0 DI2',880,3049.9999999999999999,'Toray T700 and T800 carbon fiber');
14
+ INSERT INTO bike VALUES(4,'GIANT TCR ADVANCED SL 0',750,9000.0,'Carbon CC');
15
+ INSERT INTO bike VALUES(5,'Ibis',800,3598.9999999999999998,'Carbon CC');
16
+ INSERT INTO bike VALUES(6,'Ibis ||',760,5000, 'carbon fiber');
17
+ CREATE TABLE IF NOT EXISTS "cyclist" (
18
+ "id" int,
19
+ "heat" int,
20
+ "name" text,
21
+ "nation" text,
22
+ "result" real,
23
+ primary key("id")
24
+ );
25
+ INSERT INTO cyclist VALUES(1,4,'Bradley Wiggins','Great Britain','4:16.571');
26
+ INSERT INTO cyclist VALUES(2,3,'Hayden Roulston','New Zealand','4:19.232');
27
+ INSERT INTO cyclist VALUES(3,1,'Steven Burke','Great Britain','4:21.558');
28
+ INSERT INTO cyclist VALUES(4,2,'Alexei Markov','Russia','4:22.308');
29
+ INSERT INTO cyclist VALUES(5,1,'Volodymyr Dyudya','Ukraine','4:22.471');
30
+ INSERT INTO cyclist VALUES(6,2,'Antonio Tauler','Spain','4:24.974');
31
+ INSERT INTO cyclist VALUES(7,4,'Alexander Serov','Russia','4:25.391');
32
+ INSERT INTO cyclist VALUES(8,3,'Taylor Phinney','United States','4:26.644');
33
+ CREATE TABLE IF NOT EXISTS "cyclists_own_bikes" (
34
+ "cyclist_id" int,
35
+ "bike_id" int,
36
+ "purchase_year" int,
37
+ primary key("cyclist_id", "bike_id"),
38
+ foreign key("cyclist_id") references `cyclist`("id"),
39
+ foreign key("bike_id") references `bike`("id")
40
+ );
41
+ INSERT INTO cyclists_own_bikes VALUES(1,2,2011);
42
+ INSERT INTO cyclists_own_bikes VALUES(1,3,2015);
43
+ INSERT INTO cyclists_own_bikes VALUES(2,3,2017);
44
+ INSERT INTO cyclists_own_bikes VALUES(2,5,2013);
45
+ INSERT INTO cyclists_own_bikes VALUES(2,4,2018);
46
+ INSERT INTO cyclists_own_bikes VALUES(3,4,2017);
47
+ INSERT INTO cyclists_own_bikes VALUES(4,4,2017);
48
+ INSERT INTO cyclists_own_bikes VALUES(5,5,2016);
49
+ INSERT INTO cyclists_own_bikes VALUES(6,5,2016);
50
+ INSERT INTO cyclists_own_bikes VALUES(7,5,2010);
51
+ INSERT INTO cyclists_own_bikes VALUES(7,4,2011);
52
+ INSERT INTO cyclists_own_bikes VALUES(7,2,2012);
53
+ INSERT INTO cyclists_own_bikes VALUES(7,1,2013);
54
+ INSERT INTO cyclists_own_bikes VALUES(7,3,2014);
55
+ COMMIT;
56
+
all_databases/bike_racing/schema_old.sql ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys=ON;
2
+ BEGIN TRANSACTION;
3
+ CREATE TABLE IF NOT EXISTS "bike" (
4
+ "id" int,
5
+ "product_name" text,
6
+ "weight" int,
7
+ "price" real,
8
+ "material" text,
9
+ primary key("id")
10
+ );
11
+ INSERT INTO bike VALUES(1,'BIANCHI SPECIALISSIMA',780,9998.9999999999999999,'Carbon CC');
12
+ INSERT INTO bike VALUES(2,'CANNONDALE SUPERSIX EVO HI-MOD DURA ACE',850,5329.9999999999999999,'carbon fiber');
13
+ INSERT INTO bike VALUES(3,'CANYON AEROAD CF SLX 8.0 DI2',880,3049.9999999999999999,'Toray T700 and T800 carbon fiber');
14
+ INSERT INTO bike VALUES(4,'GIANT TCR ADVANCED SL 0',750,9000.0,'Carbon CC');
15
+ INSERT INTO bike VALUES(5,'Ibis',800,3598.9999999999999998,'Carbon CC');
16
+ INSERT INTO bike VALUES(6,'Ibis ||',760,5000, 'carbon fiber');
17
+ CREATE TABLE IF NOT EXISTS "cyclist" (
18
+ "id" int,
19
+ "heat" int,
20
+ "name" text,
21
+ "nation" text,
22
+ "result" real,
23
+ primary key("id")
24
+ );
25
+ INSERT INTO cyclist VALUES(1,4,'Bradley Wiggins','Great Britain','4:16.571');
26
+ INSERT INTO cyclist VALUES(2,3,'Hayden Roulston','New Zealand','4:19.232');
27
+ INSERT INTO cyclist VALUES(3,1,'Steven Burke','Great Britain','4:21.558');
28
+ INSERT INTO cyclist VALUES(4,2,'Alexei Markov','Russia','4:22.308');
29
+ INSERT INTO cyclist VALUES(5,1,'Volodymyr Dyudya','Ukraine','4:22.471');
30
+ INSERT INTO cyclist VALUES(6,2,'Antonio Tauler','Spain','4:24.974');
31
+ INSERT INTO cyclist VALUES(7,4,'Alexander Serov','Russia','4:25.391');
32
+ INSERT INTO cyclist VALUES(8,3,'Taylor Phinney','United States','4:26.644');
33
+ CREATE TABLE IF NOT EXISTS "cyclists_own_bikes" (
34
+ "cyclist_id" int,
35
+ "bike_id" int,
36
+ "purchase_year" int,
37
+ primary key("cyclist_id", "bike_id"),
38
+ foreign key("cyclist_id") references "cyclist"("id"),
39
+ foreign key("bike_id") references "bike"("id")
40
+ );
41
+ INSERT INTO cyclists_own_bikes VALUES(1,2,2011);
42
+ INSERT INTO cyclists_own_bikes VALUES(1,3,2015);
43
+ INSERT INTO cyclists_own_bikes VALUES(2,3,2017);
44
+ INSERT INTO cyclists_own_bikes VALUES(2,5,2013);
45
+ INSERT INTO cyclists_own_bikes VALUES(2,4,2018);
46
+ INSERT INTO cyclists_own_bikes VALUES(3,4,2017);
47
+ INSERT INTO cyclists_own_bikes VALUES(4,4,2017);
48
+ INSERT INTO cyclists_own_bikes VALUES(5,5,2016);
49
+ INSERT INTO cyclists_own_bikes VALUES(6,5,2016);
50
+ INSERT INTO cyclists_own_bikes VALUES(7,5,2010);
51
+ INSERT INTO cyclists_own_bikes VALUES(7,4,2011);
52
+ INSERT INTO cyclists_own_bikes VALUES(7,2,2012);
53
+ INSERT INTO cyclists_own_bikes VALUES(7,1,2013);
54
+ INSERT INTO cyclists_own_bikes VALUES(7,3,2014);
55
+ COMMIT;
56
+
all_databases/book_press/book_press.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/book_press/schema.sql ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "author" (
4
+ "Author_ID" int,
5
+ "Name" text,
6
+ "Age" int,
7
+ "Gender" text,
8
+ PRIMARY KEY ("Author_ID")
9
+ );
10
+
11
+
12
+ INSERT INTO "author" VALUES (1,"Derrick Kosinski",45,"Male");
13
+ INSERT INTO "author" VALUES (2,"Evelyn Smith",32,"Female");
14
+ INSERT INTO "author" VALUES (3,"Johnny Devenanzio",54,"Male");
15
+ INSERT INTO "author" VALUES (4,"Kenny Santucci",21,"Male");
16
+ INSERT INTO "author" VALUES (5,"Jenn Grijalva",19,"Female");
17
+ INSERT INTO "author" VALUES (6,"Paula Meronek",23,"Female");
18
+ INSERT INTO "author" VALUES (7,"Robin Hibbard",52,"Female");
19
+
20
+
21
+ CREATE TABLE "press" (
22
+ "Press_ID" int,
23
+ "Name" text,
24
+ "Month_Profits_billion" real,
25
+ "Year_Profits_billion" real,
26
+ PRIMARY KEY ("Press_ID")
27
+ );
28
+
29
+
30
+ INSERT INTO "press" VALUES (1,"Accor","0.65","6.02");
31
+ INSERT INTO "press" VALUES (2,"Air Liquide","4.08","29.49");
32
+ INSERT INTO "press" VALUES (3,"Alstom","0.96","9.40");
33
+ INSERT INTO "press" VALUES (4,"ArcelorMittal","1.69","15.4");
34
+ INSERT INTO "press" VALUES (5,"STMicroelectronics","0.54","5.25");
35
+ INSERT INTO "press" VALUES (6,"Technip","1.18","9.24");
36
+ INSERT INTO "press" VALUES (7,"Total","11.96","86.94");
37
+ INSERT INTO "press" VALUES (8,"Unibail-Rodamco","2.31","16.80");
38
+ INSERT INTO "press" VALUES (9,"Vallourec","0.58","4.56");
39
+ INSERT INTO "press" VALUES (10,"Veolia Environnement","0.44","5.01");
40
+
41
+
42
+
43
+
44
+ CREATE TABLE "book" (
45
+ "Book_ID" int,
46
+ "Title" text,
47
+ "Book_Series" text,
48
+ "Author_ID" int,
49
+ "Press_ID" int,
50
+ "Sale_Amount" text,
51
+ "Release_date" text,
52
+ PRIMARY KEY ("Book_ID"),
53
+ FOREIGN KEY (`Author_ID`) REFERENCES `author`(`Author_ID`),
54
+ FOREIGN KEY (`Press_ID`) REFERENCES `press`(`Press_ID`)
55
+ );
56
+
57
+ INSERT INTO "book" VALUES (1,"Book Revue","LT",1,1,"1234","2016-01-05");
58
+ INSERT INTO "book" VALUES (2,"Baseball Bugs","LT",2,2,"1214","2016-02-02");
59
+ INSERT INTO "book" VALUES (3,"Holiday for Shoestrings","MM",3,3,"714","2016-02-23");
60
+ INSERT INTO "book" VALUES (4,"Quentin Quail","MM",4,4,"615","2016-03-02");
61
+ INSERT INTO "book" VALUES (5,"Baby Bottleneck","LT",5,5,"1256","2016-03-16");
62
+ INSERT INTO "book" VALUES (6,"Hare Remover","MM",5,4,"1014","2016-03-23");
63
+ INSERT INTO "book" VALUES (7,"Daffy Doodles","MM",1,9,"1307","2016-04-06");
64
+ INSERT INTO "book" VALUES (8,"Hollywood Canine Canteen","MM",1,2,"1114","2016-04-20");
65
+ INSERT INTO "book" VALUES (9,"Hush My Mouse","LT",2,3,"1258","2016-05-04");
66
+ INSERT INTO "book" VALUES (10,"Hair-Raising Hare","MM",5,2,"115","2016-05-25");
67
+
all_databases/browser_web/browser_web.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/browser_web/schema.sql ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys=OFF;
2
+ BEGIN TRANSACTION;
3
+ CREATE TABLE IF NOT EXISTS "Web_client_accelerator" (
4
+ "id" int,
5
+ "name" text,
6
+ "Operating_system" text,
7
+ "Client" text,
8
+ "Connection" text,
9
+ primary key("id")
10
+ );
11
+ INSERT INTO Web_client_accelerator VALUES(1,'CACHEbox','Appliance (Linux)','End user, ISP','Broadband, Satellite, Wireless, Fiber, DSL');
12
+ INSERT INTO Web_client_accelerator VALUES(2,'CProxy','Windows','user','up to 756kbit/s');
13
+ INSERT INTO Web_client_accelerator VALUES(3,'Fasterfox','Windows, Mac, Linux and Mobile devices','user','Dialup, Wireless, Broadband, DSL');
14
+ INSERT INTO Web_client_accelerator VALUES(4,'fasTun','Any','All','Any');
15
+ INSERT INTO Web_client_accelerator VALUES(5,'Freewire','Windows, except NT and 95','ISP','Dial-up');
16
+ INSERT INTO Web_client_accelerator VALUES(6,'Google Web Accelerator (discontinued)','Windows','user/Google server','Broadband');
17
+ INSERT INTO Web_client_accelerator VALUES(7,'Heigh Speed','Windows','All','Any');
18
+ INSERT INTO Web_client_accelerator VALUES(8,'Netfury','Windows, Mac','End User, ISP','Dial-up, Broadband, DSL, ISDN, Satellite, Wireless');
19
+ INSERT INTO Web_client_accelerator VALUES(9,'Nitro','Windows, Mac','End User, ISP','Dial-up, Broadband, DSL, ISDN, Satellite, Wireless');
20
+ INSERT INTO Web_client_accelerator VALUES(10,'ONSPEED','Windows, Mac and Mobile devices','user','Dialup, Wireless, Broadband, DSL');
21
+ INSERT INTO Web_client_accelerator VALUES(11,'Opera Turbo','Android, Linux, Mac and Windows devices','user/Opera server','Any');
22
+ INSERT INTO Web_client_accelerator VALUES(12,'Polipo','Unix (Linux, *BSD, Mac OS X, others), Windows','user/ISP','Any');
23
+ INSERT INTO Web_client_accelerator VALUES(13,'Propel','Windows, Mac','End User, ISP','Dial, DSL, ISDN, Satellite, wireless');
24
+ INSERT INTO Web_client_accelerator VALUES(14,'Proxyconn Web Accelerator','Windows, Mac, Mobile devices','user','Dialup, Wireless, Broadband, DSL');
25
+ INSERT INTO Web_client_accelerator VALUES(15,'RabbIT','Any system with Java 1.6 VM available','ISP','Any');
26
+ INSERT INTO Web_client_accelerator VALUES(16,'Squid','Unix (Linux, *BSD, Mac OS X, others), Windows','user/ISP','Any');
27
+ INSERT INTO Web_client_accelerator VALUES(17,'Toonel','Windows, Linux, Mac OS, Symbian, WindowsMobile','user/ISP','Any');
28
+ INSERT INTO Web_client_accelerator VALUES(18,'WinGate','Windows (2000 onwards)','All','Any');
29
+ INSERT INTO Web_client_accelerator VALUES(19,'Ziproxy','Unix (Linux, *BSD, Mac OS X, others)','ISP','Any');
30
+ CREATE TABLE IF NOT EXISTS "browser" (
31
+ "id" int,
32
+ "name" text,
33
+ "market_share" real,
34
+ primary key("id")
35
+ );
36
+ INSERT INTO browser VALUES(1,'Internet Explorer',28.960000000000000852);
37
+ INSERT INTO browser VALUES(2,'Firefox',18.109999999999999431);
38
+ INSERT INTO browser VALUES(3,'Safari',8.5399999999999991473);
39
+ INSERT INTO browser VALUES(4,'Opera',1.1999999999999999555);
40
+ CREATE TABLE IF NOT EXISTS "accelerator_compatible_browser" (
41
+ "accelerator_id" int,
42
+ "browser_id" int,
43
+ "compatible_since_year" int,
44
+ primary key("accelerator_id", "browser_id"),
45
+ foreign key ("accelerator_id") references `Web_client_accelerator`("id"),
46
+ foreign key ("browser_id") references `browser`("id")
47
+ );
48
+ INSERT INTO accelerator_compatible_browser VALUES(1,1,1995);
49
+ INSERT INTO accelerator_compatible_browser VALUES(1,2,1996);
50
+ INSERT INTO accelerator_compatible_browser VALUES(2,3,1996);
51
+ INSERT INTO accelerator_compatible_browser VALUES(2,4,2000);
52
+ INSERT INTO accelerator_compatible_browser VALUES(3,1,2005);
53
+ INSERT INTO accelerator_compatible_browser VALUES(3,2,2007);
54
+ INSERT INTO accelerator_compatible_browser VALUES(3,3,2008);
55
+ INSERT INTO accelerator_compatible_browser VALUES(4,4,2009);
56
+ INSERT INTO accelerator_compatible_browser VALUES(9,1,2010);
57
+ COMMIT;
58
+
all_databases/candidate_poll/candidate_poll.sqlite ADDED
Binary file (20.5 kB). View file
 
all_databases/candidate_poll/schema.sql ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "candidate" (
4
+ "Candidate_ID" int,
5
+ "People_ID" int,
6
+ "Poll_Source" text,
7
+ "Date" text,
8
+ "Support_rate" real,
9
+ "Consider_rate" real,
10
+ "Oppose_rate" real,
11
+ "Unsure_rate" real,
12
+ PRIMARY KEY ("Candidate_ID"),
13
+ FOREIGN KEY ("People_ID") REFERENCES "people"("People_ID")
14
+ );
15
+
16
+ CREATE TABLE "people" (
17
+ "People_ID" int,
18
+ "Sex" text,
19
+ "Name" text,
20
+ "Date_of_Birth" text,
21
+ "Height" real,
22
+ "Weight" real,
23
+ PRIMARY KEY ("People_ID")
24
+ );
25
+
26
+ INSERT INTO "people" VALUES (1,"M","Hubert Henno","06.10.1976","188","83");
27
+ INSERT INTO "people" VALUES (2,"M","Dominique Daquin","10.11.1972","197","85");
28
+ INSERT INTO "people" VALUES (3,"F","Stéphane Antiga","03.02.1976","200","94");
29
+ INSERT INTO "people" VALUES (4,"M","Laurent Capet","05.05.1972","202","92");
30
+ INSERT INTO "people" VALUES (5,"F","Frantz Granvorka","10.03.1976","195","90");
31
+ INSERT INTO "people" VALUES (6,"M","Vincent Montméat","01.09.1977","196","88");
32
+ INSERT INTO "people" VALUES (7,"M","Loïc De Kergret","20.08.1970","193","89");
33
+ INSERT INTO "people" VALUES (8,"M","Philippe Barça-Cysique","22.04.1977","194","88");
34
+ INSERT INTO "people" VALUES (9,"M","Guillaume Samica","28.09.1981","196","82");
35
+
36
+ INSERT INTO "candidate" VALUES (1,1,"WNBC/Marist Poll","Feb 12–15, 2007","0.25","0.30","0.43","0.2");
37
+ INSERT INTO "candidate" VALUES (2,3,"WNBC/Marist Poll","Feb 12–15, 2007","0.17","0.42","0.32","0.9");
38
+ INSERT INTO "candidate" VALUES (3,4,"FOX News/Opinion Dynamics Poll","Feb 13–14, 2007","0.18","0.34","0.44","0.3");
39
+ INSERT INTO "candidate" VALUES (4,6,"Newsweek Poll","Nov 9–10, 2006","0.33","0.20","0.45","0.2");
40
+ INSERT INTO "candidate" VALUES (5,7,"Newsweek Poll","Nov 9–10, 2006","0.24","0.30","0.32","0.4");
41
+ INSERT INTO "candidate" VALUES (6,9,"Newsweek Poll","Nov 9–10, 2006","0.24","0.27","0.43","0.2");
42
+
all_databases/car_racing/car_racing.sqlite ADDED
Binary file (36.9 kB). View file
 
all_databases/car_racing/schema.sql ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+
4
+ CREATE TABLE "country" (
5
+ "Country_Id" int,
6
+ "Country" text,
7
+ "Capital" text,
8
+ "Official_native_language" text,
9
+ "Regoin" text,
10
+ PRIMARY KEY ("Country_Id")
11
+ );
12
+
13
+ INSERT INTO "country" VALUES (1,"Japan","Tokyo","Japanese","Asia");
14
+ INSERT INTO "country" VALUES (2,"USA","Washington","English","North America");
15
+ INSERT INTO "country" VALUES (6,"Britain","London","British English","Europe");
16
+ INSERT INTO "country" VALUES (3,"China","Beijing","Chinese","Asia");
17
+ INSERT INTO "country" VALUES (4,"Ireland","Dublin","Irish English","Europe");
18
+ INSERT INTO "country" VALUES (5,"Isle of Man","Douglas","English Manx","Europe");
19
+
20
+
21
+
22
+ CREATE TABLE `team` (
23
+ "Team_ID" int,
24
+ "Team" text,
25
+ "Make" text,
26
+ "Manager" text,
27
+ "Sponsor" text,
28
+ "Car_Owner" text,
29
+ PRIMARY KEY ("Team_ID")
30
+ );
31
+
32
+ CREATE TABLE `driver` (
33
+ "Driver_ID" int,
34
+ "Driver" text,
35
+ "Country" int,
36
+ "Age" int,
37
+ "Car_#" real,
38
+ "Make" text,
39
+ "Points" text,
40
+ "Laps" real,
41
+ "Winnings" text,
42
+ PRIMARY KEY ("Driver_ID"),
43
+ FOREIGN KEY (`Country`) REFERENCES `country`(`Country_ID`)
44
+ );
45
+
46
+
47
+
48
+ CREATE TABLE `team_driver` (
49
+ "Team_ID" int,
50
+ "Driver_ID" int,
51
+ PRIMARY KEY ("Team_ID","Driver_ID"),
52
+ FOREIGN KEY (`Team_ID`) REFERENCES `team`(`Team_ID`),
53
+ FOREIGN KEY (`Driver_ID`) REFERENCES `driver`(`Driver_ID`)
54
+ );
55
+
56
+
57
+ INSERT INTO "team" VALUES (1,"Arrington Racing","Chrysler Imperial","Buddy Arrington","Arrington Racing","Buddy Arrington");
58
+ INSERT INTO "team" VALUES (2,"Benfield Racing","Buick Regal","Joe Ruttman","Levi Garrett","Ron Benfield");
59
+ INSERT INTO "team" VALUES (3,"Blue Max Racing","Pontiac Grand Prix","Tim Richmond","Old Milwaukee","Raymond Beadle");
60
+ INSERT INTO "team" VALUES (4,"Bobby Hawkins Racing","Chevrolet Monte Carlo","David Pearson","Chattanooga Chew","Bobby Hawkins");
61
+ INSERT INTO "team" VALUES (5,"Bud Moore Engineering","Ford Thunderbird","Dale Earnhardt","Wrangler Jeans","Bud Moore");
62
+ INSERT INTO "team" VALUES (6,"Cliff Stewart Racing","Pontiac Grand Prix","Geoff Bodine","Gatorade","Cliff Stewart");
63
+ INSERT INTO "team" VALUES (7,"DiGard Motorsports","Buick Regal","Bobby Allison","Miller American","Bill Gardner");
64
+ INSERT INTO "team" VALUES (8,"Donlavey Racing","Ford Thunderbird","Dick Brooks","Chameleon Sunglasses","Junie Donlavey");
65
+ INSERT INTO "team" VALUES (9,"Ellington Racing","Chevrolet Monte Carlo","Lake Speed","UNO / Bull Frog Knits","Hoss Ellington");
66
+ INSERT INTO "team" VALUES (10,"Hagan Racing","Chevrolet Monte Carlo","Terry Labonte","Budweiser","Billy Hagan");
67
+ INSERT INTO "team" VALUES (11,"Hamby Motorsports","Pontiac Grand Prix","Sterling Marlin (R)","Hesco Exhaust Systems","Roger Hamby");
68
+ INSERT INTO "team" VALUES (12,"Henderson Motorsports","Chevrolet Monte Carlo Buick Regal","Ronnie Hopkins (R)","Food Country USA","Charlie Henderson");
69
+
70
+ INSERT INTO "driver" VALUES (1,"Kasey Kahne",2,23,"9","Dodge","185","334","$530,164");
71
+ INSERT INTO "driver" VALUES (2,"Matt Kenseth",2,21,"17","Ford","175","334","$362,491");
72
+ INSERT INTO "driver" VALUES (3,"Tony Stewart",2,19,"20","Chevrolet","175","334","$286,386");
73
+ INSERT INTO "driver" VALUES (4,"Denny Hamlin *",2,25,"11","Chevrolet","165","334","$208,500");
74
+ INSERT INTO "driver" VALUES (5,"Kevin Li",3,23,"29","Chevrolet","160","334","$204,511");
75
+ INSERT INTO "driver" VALUES (6,"Jeff Chen",3,25,"31","Chevrolet","150","334","$172,220");
76
+ INSERT INTO "driver" VALUES (7,"Scott Riggs",1,22,"10","Dodge","146","334","$133,850");
77
+ INSERT INTO "driver" VALUES (8,"Mali Lu Jr. *",3,29,"1","Chevrolet","147","334","$156,608");
78
+ INSERT INTO "driver" VALUES (9,"Mark Martin",5,21,"6","Ford","143","334","$151,850");
79
+ INSERT INTO "driver" VALUES (10,"Bobby Labonte",4,25,"43","Dodge","134","334","$164,211");
80
+
81
+ INSERT INTO "team_driver" VALUES (1,1);
82
+ INSERT INTO "team_driver" VALUES (2,3);
83
+ INSERT INTO "team_driver" VALUES (1,5);
84
+ INSERT INTO "team_driver" VALUES (5,4);
85
+ INSERT INTO "team_driver" VALUES (1,9);
86
+ INSERT INTO "team_driver" VALUES (1,10);
87
+ INSERT INTO "team_driver" VALUES (10,7);
88
+ INSERT INTO "team_driver" VALUES (9,6);
89
+ INSERT INTO "team_driver" VALUES (1,2);
90
+ INSERT INTO "team_driver" VALUES (1,8);
91
+
all_databases/car_road_race/car_road_race.sqlite ADDED
Binary file (20.5 kB). View file
 
all_databases/car_road_race/schema.sql ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "driver" (
4
+ "Driver_ID" int,
5
+ "Driver_Name" text,
6
+ "Entrant" text,
7
+ "Constructor" text,
8
+ "Chassis" text,
9
+ "Engine" text,
10
+ "Age" int,
11
+ PRIMARY KEY ("Driver_ID")
12
+ );
13
+
14
+ CREATE TABLE "race" (
15
+ "Road" int,
16
+ "Driver_ID" int,
17
+ "Race_Name" text,
18
+ "Pole_Position" text,
19
+ "Fastest_Lap" text,
20
+ "Winning_driver" text,
21
+ "Winning_team" text,
22
+ "Report" text,
23
+ PRIMARY KEY ("Road"),
24
+ FOREIGN KEY (`Driver_ID`) REFERENCES `driver`(`Driver_ID`)
25
+ );
26
+
27
+ INSERT INTO "driver" VALUES ("1","Ernst-Günther Burggaller","German Bugatti Team","Bugatti","Bugatti T35B","2.3 L8","18");
28
+ INSERT INTO "driver" VALUES ("2","Hermann zu Leiningen","German Bugatti Team","Bugatti","Bugatti T35C","2.0 L8","20");
29
+ INSERT INTO "driver" VALUES ("3","Heinrich-Joachim von Morgen","German Bugatti Team","Bugatti","Bugatti T35B","2.3 L8","23");
30
+ INSERT INTO "driver" VALUES ("4","Rudolf Caracciola","Private entry","Mercedes-Benz","Mercedes-Benz SSK L","7.1 L6","24");
31
+ INSERT INTO "driver" VALUES ("5","Earl Howe","Private entry","Bugatti","Bugatti T51","2.3 L8","26");
32
+ INSERT INTO "driver" VALUES ("6","Clifton Penn-Hughes","Private entry","Bugatti","Bugatti T35","2.0 L8","21");
33
+ INSERT INTO "driver" VALUES ("7","Henry Birkin","Private entry","Maserati","Maserati 26M","2.5 L8","28");
34
+ INSERT INTO "driver" VALUES ("8","Bernhard Ackerl","Private entry","Bugatti","Bugatti T37","1.5 L4","29");
35
+ INSERT INTO "driver" VALUES ("9","Juan Zanelli","Private entry","Bugatti","Bugatti T35B","2.3 L8","26");
36
+ INSERT INTO "driver" VALUES ("10","Guy Bouriat","Automobiles Ettore Bugatti","Bugatti","Bugatti T51","2.3 L8","28");
37
+ INSERT INTO "driver" VALUES ("11","Louis Chiron","Automobiles Ettore Bugatti","Bugatti","Bugatti T51","2.3 L8","35");
38
+
39
+
40
+
41
+ INSERT INTO "race" VALUES ("2","1","Monterey Festival of Speed","James Hinchcliffe","Douglas Soares","James Hinchcliffe","Forsythe Pettit Racing","Report");
42
+ INSERT INTO "race" VALUES ("3","2","Sommet des Legends","Junior Strous","Junior Strous","Junior Strous","Condor Motorsports","Report");
43
+ INSERT INTO "race" VALUES ("4","1","Rexall Grand Prix of Edmonton - Race 1","James Hinchcliffe","David Garza Pérez","Jonathan Bomarito","Mathiasen Motorsports","Report");
44
+ INSERT INTO "race" VALUES ("5","3","Rexall Grand Prix of Edmonton - Race 2","Carl Skerlong","Carl Skerlong","Jonathan Summerton","Newman Wachs Racing","Report");
45
+ INSERT INTO "race" VALUES ("6","4","Road Race Showcase/Road America - Race 1","Dane Cameron","Tõnis Kasemets","Jonathan Bomarito","Mathiasen Motorsports","Report");
46
+ INSERT INTO "race" VALUES ("7","9","Road Race Showcase/Road America - Race 2","Jonathan Bomarito","Dane Cameron","Jonathan Summerton","Newman Wachs Racing","Report");
47
+ INSERT INTO "race" VALUES ("8","10","Grand Prix de Trois-Rivières","Jonathan Bomarito","Jonathan Summerton","Jonathan Bomarito","Mathiasen Motorsports","Report");
48
+ INSERT INTO "race" VALUES ("9","1","Mazda Formula Zoom Zoom","Carl Skerlong","Carl Skerlong","Carl Skerlong","Pacific Coast Motorsports","Report");
49
+ INSERT INTO "race" VALUES ("10","2","SunRichGourmet.com 1000","Markus Niemelä","Carl Skerlong","Markus Niemelä","Brooks Associates Racing","Report");
all_databases/chinook_1/annotation.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "label_id": null,
3
+ "data": [],
4
+ "review_id": null
5
+ }
all_databases/chinook_1/chinook_1.sqlite ADDED
Binary file (901 kB). View file
 
all_databases/cinema/cinema.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/cinema/schema.sql ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ PRAGMA foreign_keys = ON;
3
+
4
+
5
+ CREATE TABLE "film" (
6
+ "Film_ID" int,
7
+ "Rank_in_series" int,
8
+ "Number_in_season" int,
9
+ "Title" text,
10
+ "Directed_by" text,
11
+ "Original_air_date" text,
12
+ "Production_code" text,
13
+ PRIMARY KEY ("Film_ID")
14
+ );
15
+
16
+ CREATE TABLE "cinema" (
17
+ "Cinema_ID" int,
18
+ "Name" text,
19
+ "Openning_year" int,
20
+ "Capacity" int,
21
+ "Location" text,
22
+ PRIMARY KEY ("Cinema_ID"));
23
+
24
+ INSERT INTO "film" VALUES (1,"26","1","The Case of the Mystery Weekend","Bill Schreiner","September 21–25, 1992","50021–50025");
25
+ INSERT INTO "film" VALUES (2,"27","2","The Case of the Smart Dummy","Bill Schreiner","September 28–October 2, 1992","50231–50235");
26
+ INSERT INTO "film" VALUES (3,"28","3","The Case: Off the Record","Bill Schreiner","October 5–9, 1992","50011–50015");
27
+ INSERT INTO "film" VALUES (4,"29","4","The Case of the Bermuda Triangle","Jesus Salvador Treviño","October 12–16, 1992","50251–50255");
28
+ INSERT INTO "film" VALUES (5,"30","5","The Case of the Piggy Banker","Bill Schreiner","October 19–23, 1992","50241–50245");
29
+
30
+ INSERT INTO "cinema" VALUES (1,"Codling","2010","1100","County Wicklow");
31
+ INSERT INTO "cinema" VALUES (2,"Carrowleagh","2012","368","County Cork");
32
+ INSERT INTO "cinema" VALUES (3,"Dublin Array","2015","364","County Dublin");
33
+ INSERT INTO "cinema" VALUES (4,"Glenmore","2009","305","County Clare");
34
+ INSERT INTO "cinema" VALUES (5,"Glenough","2010","325","County Tipperary");
35
+ INSERT INTO "cinema" VALUES (6,"Gortahile","2010","208","County Laois");
36
+ INSERT INTO "cinema" VALUES (7,"Grouse Lodge","2011","203","County Tipperary");
37
+ INSERT INTO "cinema" VALUES (8,"Moneypoint","2011","225","County Clare");
38
+ INSERT INTO "cinema" VALUES (9,"Mount Callan","2011","908","County Clare");
39
+ INSERT INTO "cinema" VALUES (10,"Oriel","2013","330","County Louth");
40
+
41
+ CREATE TABLE "schedule" (
42
+ "Cinema_ID" int,
43
+ "Film_ID" int,
44
+ "Date" text,
45
+ "Show_times_per_day" int,
46
+ "Price" float,
47
+ PRIMARY KEY ("Cinema_ID","Film_ID"),
48
+ FOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),
49
+ FOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)
50
+ );
51
+
52
+
53
+ INSERT INTO "schedule" VALUES (1,1,"21 May",5,12.99);
54
+ INSERT INTO "schedule" VALUES (1,2,"21 May",3,12.99);
55
+ INSERT INTO "schedule" VALUES (1,3,"21 Jun",2,8.99);
56
+ INSERT INTO "schedule" VALUES (2,1,"11 July",5,9.99);
57
+ INSERT INTO "schedule" VALUES (6,5,"2 Aug",4,12.99);
58
+ INSERT INTO "schedule" VALUES (9,4,"20 May",5,9.99);
59
+ INSERT INTO "schedule" VALUES (10,1,"19 May",5,15.99);
60
+
all_databases/city_record/city_record.sqlite ADDED
Binary file (36.9 kB). View file
 
all_databases/city_record/schema.sql ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+
4
+ CREATE TABLE "city" (
5
+ "City_ID" int,
6
+ "City" text,
7
+ "Hanzi" text,
8
+ "Hanyu_Pinyin" text,
9
+ "Regional_Population" int,
10
+ "GDP" real,
11
+ PRIMARY KEY ("City_ID")
12
+ );
13
+
14
+ CREATE TABLE "match" (
15
+ "Match_ID" int,
16
+ "Date" text,
17
+ "Venue" text,
18
+ "Score" text,
19
+ "Result" text,
20
+ "Competition" text,
21
+ PRIMARY KEY ("Match_ID")
22
+ );
23
+
24
+
25
+
26
+ CREATE TABLE "temperature" (
27
+ "City_ID" int,
28
+ "Jan" real,
29
+ "Feb" real,
30
+ "Mar" real,
31
+ "Apr" real,
32
+ "Jun" real,
33
+ "Jul" real,
34
+ "Aug" real,
35
+ "Sep" real,
36
+ "Oct" real,
37
+ "Nov" real,
38
+ "Dec" real,
39
+ PRIMARY KEY ("City_ID"),
40
+ FOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)
41
+ );
42
+
43
+ INSERT INTO "city" VALUES (1,"Shanghai","上海","Shànghǎi","23019148","1919.57");
44
+ INSERT INTO "city" VALUES (2,"Nanjing ( Jiangsu )","南京","Nánjīng","8004680","614.55");
45
+ INSERT INTO "city" VALUES (3,"Hangzhou ( Zhejiang )","杭州","Hángzhōu","8700400","701.18");
46
+ INSERT INTO "city" VALUES (4,"Suzhou ( Jiangsu )","苏州/ 蘇州","Sūzhōu","10465994","1071.70");
47
+ INSERT INTO "city" VALUES (5,"Ningbo ( Zhejiang )","宁波/ 寧波","Níngbō","7605689","601.05");
48
+ INSERT INTO "city" VALUES (6,"Wuxi ( Jiangsu )","无锡/ 無錫","Wúxī","6372624","688.02");
49
+ INSERT INTO "city" VALUES (7,"Nantong ( Jiangsu )","南通","Nántōng","7282835","408.02");
50
+ INSERT INTO "city" VALUES (8,"Shaoxing ( Zhejiang )","绍兴/ 紹興","Shàoxīng","4912200","329.12");
51
+ INSERT INTO "city" VALUES (9,"Changzhou ( Jiangsu )","常州","Chángzhōu","4591972","358.04");
52
+ INSERT INTO "city" VALUES (10,"Jinhua ( Zhejiang )","金华/ 金華","Jīnhuá","4614100","244.77");
53
+ INSERT INTO "city" VALUES (11,"Jiaxing ( Zhejiang )","嘉兴/ 嘉興","Jiāxīng","4501700","266.81");
54
+ INSERT INTO "city" VALUES (12,"Taizhou ( Zhejiang )","台州","Tāizhōu","5968800","279.49");
55
+ INSERT INTO "city" VALUES (13,"Yangzhou ( Jiangsu )","扬州/ 揚州","Yángzhōu","4459760","263.03");
56
+
57
+ INSERT INTO "temperature" VALUES (1,17.8,17.8,18.3,18.9,20.0,20.6,20.6,20.6,20.0,19.4,18.3);
58
+ INSERT INTO "temperature" VALUES (2,26.1,26.1,26.1,26.1,27.8,27.8,28.3,28.3,28.3,27.2,26.7);
59
+ INSERT INTO "temperature" VALUES (3,18.9,18.3,19.4,20.0,22.2,23.3,23.9,23.3,22.8,21.7,20.0);
60
+ INSERT INTO "temperature" VALUES (4,26.7,27.2,27.8,28.3,30.6,31.1,31.7,31.7,30.6,28.9,27.8);
61
+ INSERT INTO "temperature" VALUES (6,17.2,17.2,18.3,18.9,20.6,21.7,21.7,21.1,20.6,20.0,18.3);
62
+ INSERT INTO "temperature" VALUES (10,26.7,27.2,27.8,27.8,30.0,30.6,31.1,31.1,30.6,28.9,27.8);
63
+ INSERT INTO "temperature" VALUES (7,18.3,18.9,19.4,20.6,22.8,23.3,23.3,23.3,22.8,21.7,20.0);
64
+ INSERT INTO "temperature" VALUES (11,25.6,26.6,26.6,26.1,28.3,28.9,29.4,29.4,28.9,27.2,26.1);
65
+
66
+ INSERT INTO "match" VALUES (1,"18 February 1992","Estadio Cuscatlán , San Salvador , El Salvador","1-0","2-0","Friendly match");
67
+ INSERT INTO "match" VALUES (2,"19 July 1992","Estadio Rigoberto López , Managua , Nicaragua","3-0","5-0","1994 FIFA World Cup qualification");
68
+ INSERT INTO "match" VALUES (3,"23 July 1992","Estadio Cuscatlán , San Salvador , El Salvador","1-0","5-1","1994 FIFA World Cup qualification");
69
+ INSERT INTO "match" VALUES (4,"23 July 1992","Estadio Cuscatlán , San Salvador , El Salvador","3-0","5-1","1994 FIFA World Cup qualification");
70
+ INSERT INTO "match" VALUES (5,"4 April 1993","Estadio Cuscatlán , San Salvador , El Salvador","1–0","2–1","1994 FIFA World Cup qualification");
71
+ INSERT INTO "match" VALUES (6,"23 July 2000","Estadio Cuscatlán , San Salvador , El Salvador","2–1","7–1","2002 FIFA World Cup qualification");
72
+
73
+
74
+ CREATE TABLE "hosting_city" (
75
+ "Year" int,
76
+ "Match_ID" int,
77
+ "Host_City" text,
78
+ PRIMARY KEY ("Year"),
79
+ FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),
80
+ FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)
81
+ );
82
+
83
+ INSERT INTO "hosting_city" VALUES ("2008",1,1);
84
+ INSERT INTO "hosting_city" VALUES ("2009",2,2);
85
+ INSERT INTO "hosting_city" VALUES ("2010",3,2);
86
+ INSERT INTO "hosting_city" VALUES ("2011",4,6);
87
+ INSERT INTO "hosting_city" VALUES ("2012",5,12);
88
+ INSERT INTO "hosting_city" VALUES ("2013",6,11);
all_databases/club_1/club_1.sqlite ADDED
Binary file (16.4 kB). View file
 
all_databases/club_1/schema.sql ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ create table Student (
2
+ StuID INTEGER PRIMARY KEY,
3
+ LName VARCHAR(12),
4
+ Fname VARCHAR(12),
5
+ Age INTEGER,
6
+ Sex VARCHAR(1),
7
+ Major INTEGER,
8
+ Advisor INTEGER,
9
+ city_code VARCHAR(3)
10
+ );
11
+
12
+
13
+ create table Club (
14
+ ClubID INTEGER PRIMARY KEY,
15
+ ClubName VARCHAR(40),
16
+ ClubDesc VARCHAR(1024),
17
+ ClubLocation VARCHAR(40)
18
+ );
19
+
20
+ create table Member_of_club (
21
+ StuID INTEGER,
22
+ ClubID INTEGER,
23
+ Position VARCHAR(40),
24
+ FOREIGN KEY(StuID) REFERENCES Student(StuID),
25
+ FOREIGN KEY(ClubID) REFERENCES Club(ClubID)
26
+ );
27
+
28
+
29
+ insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
30
+ insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
31
+ insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
32
+ insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
33
+ insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
34
+ insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
35
+ insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
36
+ insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
37
+ insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
38
+ insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
39
+ insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
40
+ insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
41
+ insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
42
+ insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
43
+ insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
44
+ insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
45
+ insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
46
+ insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
47
+ insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
48
+ insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
49
+ insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
50
+ insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
51
+ insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
52
+ insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
53
+ insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
54
+ insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
55
+ insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
56
+ insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
57
+ insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
58
+ insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
59
+ insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
60
+ insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
61
+ insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
62
+ insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
63
+
64
+
65
+ insert into Club values ( 1, 'Bootup Baltimore', 'Refurbish computers; teach kids and adults about computer basics.', 'AKW');
66
+ insert into Club values ( 2, 'Hopkins Student Enterprises', 'Venture capital fund for student business.', 'AKW');
67
+ insert into Club values ( 3, 'Pen and Paper Gaming', 'Play pen and paper games on campus.', 'HHH');
68
+ insert into Club values ( 4, 'Tennis Club', 'A competitive tennis club.', 'AKW');
69
+
70
+ insert into Member_of_club values ( 1001, 1, 'President');
71
+ insert into Member_of_club values ( 1007, 4, 'Vice-President');
72
+ insert into Member_of_club values ( 1008, 2, 'CTO');
73
+ insert into Member_of_club values ( 1010, 1, 'Teaching Coordinator');
all_databases/college_2/TextBookExampleSchema.sql ADDED
The diff for this file is too large to render. See raw diff
 
all_databases/college_2/college_2.sqlite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb729920ad0b7f06d38a12f6f678307964acc7d3417af83d98c519c65c90d386
3
+ size 2117632
all_databases/college_2/link.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ http://www.cs.dartmouth.edu/~cs61/Examples/
all_databases/company_1/company_1.sqlite ADDED
Binary file (12.3 kB). View file
 
all_databases/company_1/link.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ https://www.classes.cs.uchicago.edu/archive/2009/spring/23500-1/homework.html
all_databases/company_employee/company_employee.sqlite ADDED
Binary file (28.7 kB). View file
 
all_databases/company_employee/schema.sql ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "people" (
4
+ "People_ID" int,
5
+ "Age" int,
6
+ "Name" text,
7
+ "Nationality" text,
8
+ "Graduation_College" text,
9
+ PRIMARY KEY ("People_ID")
10
+ );
11
+
12
+
13
+ INSERT INTO "people" VALUES ("1","27","Reggie Lewis","United States","Northeastern");
14
+ INSERT INTO "people" VALUES ("2","25","Brad Lohaus","United States","Iowa");
15
+ INSERT INTO "people" VALUES ("3","37","Tom Sheehey","United Kindom","Virginia");
16
+ INSERT INTO "people" VALUES ("4","31","Darryl Kennedy","United States","Oklahoma");
17
+ INSERT INTO "people" VALUES ("5","34","David Butler","United Kindom","California");
18
+ INSERT INTO "people" VALUES ("6","37","Tim Naegeli","United States","Wisconsin–Stevens Point");
19
+ INSERT INTO "people" VALUES ("7","30","Jerry Corcoran","United States","Northeastern");
20
+
21
+
22
+
23
+ CREATE TABLE "company" (
24
+ "Company_ID" real,
25
+ "Name" text,
26
+ "Headquarters" text,
27
+ "Industry" text,
28
+ "Sales_in_Billion" real,
29
+ "Profits_in_Billion" real,
30
+ "Assets_in_Billion" real,
31
+ "Market_Value_in_Billion" real,
32
+ PRIMARY KEY ("Company_ID")
33
+ );
34
+
35
+
36
+ INSERT INTO "company" VALUES ("1","ExxonMobil","USA","Oil and gas","433.5","41.1","331.1","407.4");
37
+ INSERT INTO "company" VALUES ("2","JPMorgan Chase","USA","Banking","110.8","19","2265.8","170.1");
38
+ INSERT INTO "company" VALUES ("3","General Electric","USA","Conglomerate","147.3","14.2","717.2","213.7");
39
+ INSERT INTO "company" VALUES ("4","Royal Dutch Shell","Netherlands","Oil and gas","470.2","30.9","340.5","227.6");
40
+ INSERT INTO "company" VALUES ("5","Industrial and Commercial Bank of China","China","Banking","82.6","25.1","2039.1","237.4");
41
+ INSERT INTO "company" VALUES ("6","HSBC","UK","Banking","102","16.2","2550","164.3");
42
+ INSERT INTO "company" VALUES ("7","PetroChina","China","Oil and gas","310.1","20.6","304.7","294.7");
43
+ INSERT INTO "company" VALUES ("8","Berkshire Hathaway","USA","Conglomerate","143.7","10.3","392.6","202.2");
44
+ INSERT INTO "company" VALUES ("9","Wells Fargo","USA","Banking","87.6","15.9","1313.9","178.7");
45
+ INSERT INTO "company" VALUES ("10","Petrobras","Brazil","Oil and gas","145.9","20.1","319.4","180");
46
+ INSERT INTO "company" VALUES ("11","BP","UK","Oil and gas","375.5","25.7","292.5","147.4");
47
+ INSERT INTO "company" VALUES ("12","Chevron","USA","Oil and gas","236.3","26.9","209.5","218");
48
+ INSERT INTO "company" VALUES ("13","China Construction Bank","China","Banking","68.7","20.5","1637.8","201.9");
49
+ INSERT INTO "company" VALUES ("14","Citigroup","USA","Banking","102.6","11.1","1873.9","107.5");
50
+ INSERT INTO "company" VALUES ("15","Gazprom","Russia","Oil and gas","117.6","31.7","302.6","159.8");
51
+ INSERT INTO "company" VALUES ("16","Walmart","USA","Retailing","447","15.7","193.4","208.4");
52
+ INSERT INTO "company" VALUES ("17","Volkswagen Group","Germany","Automotive","221.9","21.5","328.7","79.5");
53
+ INSERT INTO "company" VALUES ("18","Total","France","Oil and gas","216.2","15.9","213","132.4");
54
+ INSERT INTO "company" VALUES ("19","Agricultural Bank of China","China","Banking","62.4","14.4","1563.9","154.8");
55
+
56
+
57
+
58
+ CREATE TABLE "employment" (
59
+ "Company_ID" int,
60
+ "People_ID" int,
61
+ "Year_working" int,
62
+ PRIMARY KEY ("Company_ID","People_ID"),
63
+ FOREIGN KEY ("Company_ID") REFERENCES `company`("Company_ID"),
64
+ FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID")
65
+ );
66
+
67
+ INSERT INTO "employment" VALUES (11,3,2);
68
+ INSERT INTO "employment" VALUES (13,2,3);
69
+ INSERT INTO "employment" VALUES (17,7,4);
70
+ INSERT INTO "employment" VALUES (15,1,1);
71
+ INSERT INTO "employment" VALUES (7,4,1);
72
+
all_databases/country_language/country_language.sqlite ADDED
Binary file (20.5 kB). View file
 
all_databases/country_language/schema.sql ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE "languages" (
4
+ "id" integer,
5
+ "name" text,
6
+ PRIMARY KEY ("id")
7
+ );
8
+
9
+ INSERT INTO "languages" VALUES ("1","Icelandic");
10
+ INSERT INTO "languages" VALUES ("2","Swedish");
11
+ INSERT INTO "languages" VALUES ("3","English");
12
+ INSERT INTO "languages" VALUES ("4","Danish");
13
+ INSERT INTO "languages" VALUES ("5","Finnish");
14
+ INSERT INTO "languages" VALUES ("6","German");
15
+ INSERT INTO "languages" VALUES ("7","French");
16
+ INSERT INTO "languages" VALUES ("8","Norwegian");
17
+ INSERT INTO "languages" VALUES ("9","Italian");
18
+ INSERT INTO "languages" VALUES ("10","Romansh");
19
+
20
+ CREATE TABLE "countries" (
21
+ "id" integer,
22
+ "name" text,
23
+ "overall_score" real,
24
+ "justice_score" real,
25
+ "health_score" real,
26
+ "education_score" real,
27
+ "economics_score" real,
28
+ "politics_score" real,
29
+ PRIMARY KEY ("id")
30
+ );
31
+
32
+
33
+
34
+
35
+ INSERT INTO "countries" VALUES ("1","Iceland","100.0","100.0","90.5","96.7","88.0","92.8");
36
+ INSERT INTO "countries" VALUES ("2","Sweden","99.2","90.8","94.8","95.5","90.3","93.1");
37
+ INSERT INTO "countries" VALUES ("3","Canada","96.6","100.0","92.7","92.0","91.0","66.9");
38
+ INSERT INTO "countries" VALUES ("4","Denmark","95.3","86.1","94.9","97.6","88.5","78.4");
39
+ INSERT INTO "countries" VALUES ("5","Finland","92.8","80.2","91.4","91.3","86.8","100.0");
40
+ INSERT INTO "countries" VALUES ("6","Switzerland","91.9","87.9","94.4","97.3","82.6","74.6");
41
+ INSERT INTO "countries" VALUES ("7","Norway","91.3","79.3","100.0","74.0","93.5","93.9");
42
+ INSERT INTO "countries" VALUES ("8","United States","89.8","82.9","92.8","97.3","83.9","68.6");
43
+ INSERT INTO "countries" VALUES ("9","Australia","88.2","80.7","93.3","93.9","85.3","65.1");
44
+
45
+
46
+ CREATE TABLE "official_languages" (
47
+ "language_id" integer,
48
+ "country_id" integer,
49
+ PRIMARY KEY ("language_id", "country_id"),
50
+ FOREIGN KEY ("language_id") REFERENCES "languages"("id"),
51
+ FOREIGN KEY ("country_id") REFERENCES "countries"("id")
52
+ );
53
+
54
+
55
+
56
+ INSERT INTO "official_languages" VALUES (1,1);
57
+ INSERT INTO "official_languages" VALUES (2,2);
58
+ INSERT INTO "official_languages" VALUES (3,3);
59
+ INSERT INTO "official_languages" VALUES (4,4);
60
+ INSERT INTO "official_languages" VALUES (5,5);
61
+ INSERT INTO "official_languages" VALUES (6,6);
62
+ INSERT INTO "official_languages" VALUES (7,6);
63
+ INSERT INTO "official_languages" VALUES (9,6);
64
+ INSERT INTO "official_languages" VALUES (10,6);
65
+ INSERT INTO "official_languages" VALUES (8,7);
66
+ INSERT INTO "official_languages" VALUES (3,8);
67
+ INSERT INTO "official_languages" VALUES (3,9);
68
+
all_databases/cre_Doc_Template_Mgt/cre_Doc_Template_Mgt.sqlite ADDED
Binary file (24.6 kB). View file
 
all_databases/cre_Doc_Template_Mgt/schema.sql ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+ CREATE TABLE Ref_Template_Types (
3
+ Template_Type_Code CHAR(15) NOT NULL,
4
+ Template_Type_Description VARCHAR(255) NOT NULL,
5
+ PRIMARY KEY (Template_Type_Code)
6
+ );
7
+ CREATE TABLE Templates (
8
+ Template_ID INTEGER NOT NULL,
9
+ Version_Number INTEGER NOT NULL,
10
+ Template_Type_Code CHAR(15) NOT NULL,
11
+ Date_Effective_From DATETIME,
12
+ Date_Effective_To DATETIME,
13
+ Template_Details VARCHAR(255) NOT NULL,
14
+ PRIMARY KEY (Template_ID),
15
+ FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)
16
+ );
17
+ CREATE TABLE Documents (
18
+ Document_ID INTEGER NOT NULL,
19
+ Template_ID INTEGER,
20
+ Document_Name VARCHAR(255),
21
+ Document_Description VARCHAR(255),
22
+ Other_Details VARCHAR(255),
23
+ PRIMARY KEY (Document_ID),
24
+ FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)
25
+ );
26
+ CREATE TABLE Paragraphs (
27
+ Paragraph_ID INTEGER NOT NULL,
28
+ Document_ID INTEGER NOT NULL,
29
+ Paragraph_Text VARCHAR(255),
30
+ Other_Details VARCHAR(255),
31
+ PRIMARY KEY (Paragraph_ID),
32
+ FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)
33
+ );
34
+ INSERT INTO Ref_Template_Types (`Template_Type_Code`, `Template_Type_Description`) VALUES ('PPT', 'Presentation');
35
+ INSERT INTO Ref_Template_Types (`Template_Type_Code`, `Template_Type_Description`) VALUES ('CV', 'CV');
36
+ INSERT INTO Ref_Template_Types (`Template_Type_Code`, `Template_Type_Description`) VALUES ('AD', 'Advertisement');
37
+ INSERT INTO Ref_Template_Types (`Template_Type_Code`, `Template_Type_Description`) VALUES ('PP', 'Paper');
38
+ INSERT INTO Ref_Template_Types (`Template_Type_Code`, `Template_Type_Description`) VALUES ('BK', 'Book');
39
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (0, 5, 'PP', '2005-11-12 07:09:48', '2008-01-05 14:19:28', '');
40
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (1, 9, 'PP', '2010-09-24 01:15:11', '1999-07-08 03:31:04', '');
41
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (4, 4, 'BK', '2002-03-02 14:39:49', '2001-04-18 09:29:52', '');
42
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (6, 2, 'PPT', '1975-05-20 22:51:19', '1992-05-02 20:06:11', '');
43
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (7, 8, 'PPT', '1993-10-07 02:33:04', '1975-07-16 04:52:10', '');
44
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (8, 3, 'BK', '1983-07-16 21:16:16', '1976-10-28 10:08:50', '');
45
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (9, 2, 'BK', '1997-04-17 08:29:44', '1994-12-07 13:26:23', '');
46
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (10, 1, 'PPT', '2003-06-05 04:03:45', '2007-06-06 06:18:53', '');
47
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (11, 6, 'BK', '1996-02-04 11:27:24', '1995-09-19 22:27:48', '');
48
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (14, 7, 'AD', '1975-10-20 02:28:58', '1979-11-04 08:58:39', '');
49
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (15, 9, 'CV', '1986-12-09 14:51:36', '1993-03-24 14:30:23', '');
50
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (16, 5, 'CV', '2012-04-05 07:11:42', '1980-05-07 12:15:47', '');
51
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (18, 5, 'PP', '1984-08-07 13:36:26', '1998-05-12 12:51:29', '');
52
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (19, 7, 'AD', '1999-06-21 11:10:30', '1974-09-14 06:34:39', '');
53
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (20, 6, 'BK', '1986-11-14 12:20:18', '2008-08-08 18:36:43', '');
54
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (21, 9, 'AD', '2002-08-25 13:26:23', '2015-09-06 01:08:44', '');
55
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (22, 0, 'PP', '2005-02-20 00:31:34', '1989-11-24 19:06:06', '');
56
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (23, 2, 'BK', '1979-12-24 10:28:16', '2000-10-22 11:57:12', '');
57
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (24, 8, 'PP', '2008-08-01 13:57:26', '1973-01-12 14:13:34', '');
58
+ INSERT INTO Templates (`Template_ID`, `Version_Number`, `Template_Type_Code`, `Date_Effective_From`, `Date_Effective_To`, `Template_Details`) VALUES (25, 5, 'PP', '1979-10-20 21:23:20', '2006-02-06 23:52:04', '');
59
+
60
+
61
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (0, 7, 'Introduction of OS', 'n', NULL);
62
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (1, 25, 'Understanding DB', 'y', NULL);
63
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (3, 6, 'Summer Show', 'u', NULL);
64
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (76, 20, 'Robbin CV', 'y', NULL);
65
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (80, 14, 'Welcome to NY', 'h', NULL);
66
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (82, 11, 'Data base', 'w', NULL);
67
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (2394, 10, 'Customer reviews', 'y', NULL);
68
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (3830, 14, 'Do not panic', 'k', NULL);
69
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (33930, 1, 'How Google people work', 'z', NULL);
70
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (50123, 22, 'Learning French', 'r', NULL);
71
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (651512, 21, 'How to write a CV', 'f', NULL);
72
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (801801, 4, 'How to read a book', 'w', NULL);
73
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (3540024, 8, 'Palm reading', 'y', NULL);
74
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (16514113, 25, 'A history of Arts', 'h', NULL);
75
+ INSERT INTO Documents (`Document_ID`, `Template_ID`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (385906526, 11, 'About Korea', 'b', NULL);
76
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (7, 2394, 'Korea', NULL);
77
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (9, 3, 'Somalia', NULL);
78
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (65, 50123, 'Palestinian Territory', NULL);
79
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (241, 651512, 'Jersey', NULL);
80
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (3708, 33930, 'UK', NULL);
81
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (9946, 385906526, 'Fiji', NULL);
82
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (16615, 80, 'Japan', NULL);
83
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (1104059, 3830, 'Senegal', NULL);
84
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (243399026, 651512, 'Indonesia', NULL);
85
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (280120913, 2394, 'Ukraine', NULL);
86
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (510442723, 2394, 'Korea', NULL);
87
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (571212310, 16514113, 'Brazil', NULL);
88
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (608931827, 80, 'Micronesia', NULL);
89
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (765713812, 16514113, 'Ireland', NULL);
90
+ INSERT INTO Paragraphs (`Paragraph_ID`, `Document_ID`, `Paragraph_Text`, `Other_Details`) VALUES (946335436, 3540024, 'Papua New Guinea', NULL);
all_databases/cre_Doc_Tracking_DB/cre_Doc_Tracking_DB.sqlite ADDED
Binary file (57.3 kB). View file
 
all_databases/cre_Doc_Tracking_DB/schema.sql ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+ CREATE TABLE Ref_Document_Types (
3
+ Document_Type_Code CHAR(15) NOT NULL,
4
+ Document_Type_Name VARCHAR(255) NOT NULL,
5
+ Document_Type_Description VARCHAR(255) NOT NULL,
6
+ PRIMARY KEY (Document_Type_Code)
7
+ );
8
+
9
+ CREATE TABLE Ref_Calendar (
10
+ Calendar_Date DATETIME NOT NULL,
11
+ Day_Number INTEGER,
12
+ PRIMARY KEY (Calendar_Date)
13
+ );
14
+ CREATE TABLE Ref_Locations (
15
+ Location_Code CHAR(15) NOT NULL,
16
+ Location_Name VARCHAR(255) NOT NULL,
17
+ Location_Description VARCHAR(255) NOT NULL,
18
+ PRIMARY KEY (Location_Code)
19
+ );
20
+
21
+ CREATE TABLE Roles (
22
+ Role_Code CHAR(15) NOT NULL,
23
+ Role_Name VARCHAR(255),
24
+ Role_Description VARCHAR(255),
25
+ PRIMARY KEY (Role_Code)
26
+ );
27
+
28
+ CREATE TABLE All_Documents (
29
+ Document_ID INTEGER NOT NULL,
30
+ Date_Stored DATETIME,
31
+ Document_Type_Code CHAR(15) NOT NULL,
32
+ Document_Name CHAR(255),
33
+ Document_Description CHAR(255),
34
+ Other_Details VARCHAR(255),
35
+ PRIMARY KEY (Document_ID),
36
+ FOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),
37
+ FOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)
38
+ );
39
+
40
+ CREATE TABLE Employees (
41
+ Employee_ID INTEGER NOT NULL,
42
+ Role_Code CHAR(15) NOT NULL,
43
+ Employee_Name VARCHAR(255),
44
+ Gender_MFU CHAR(1) NOT NULL,
45
+ Date_of_Birth DATETIME NOT NULL,
46
+ Other_Details VARCHAR(255),
47
+ PRIMARY KEY (Employee_ID),
48
+ FOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)
49
+ );
50
+
51
+ CREATE TABLE Document_Locations (
52
+ Document_ID INTEGER NOT NULL,
53
+ Location_Code CHAR(15) NOT NULL,
54
+ Date_in_Location_From DATETIME NOT NULL,
55
+ Date_in_Locaton_To DATETIME,
56
+ PRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),
57
+ FOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),
58
+ FOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),
59
+ FOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),
60
+ FOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)
61
+ );
62
+
63
+ CREATE TABLE Documents_to_be_Destroyed (
64
+ Document_ID INTEGER NOT NULL,
65
+ Destruction_Authorised_by_Employee_ID INTEGER,
66
+ Destroyed_by_Employee_ID INTEGER,
67
+ Planned_Destruction_Date DATETIME,
68
+ Actual_Destruction_Date DATETIME,
69
+ Other_Details VARCHAR(255),
70
+ PRIMARY KEY (Document_ID),
71
+ FOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),
72
+ FOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),
73
+ FOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),
74
+ FOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),
75
+ FOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)
76
+ );
77
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1972-03-31 09:47:22', 5);
78
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1976-06-15 03:40:06', 7);
79
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1985-05-13 12:19:43', 7);
80
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1986-10-14 17:53:39', 1);
81
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1987-11-05 06:11:22', 3);
82
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1988-02-01 14:41:52', 8);
83
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1994-11-15 03:49:54', 9);
84
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1995-01-01 03:52:11', 1);
85
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('1997-03-10 15:24:00', 7);
86
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('2007-05-28 16:28:48', 2);
87
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('2008-06-08 12:45:38', 3);
88
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('2009-08-18 03:29:08', 8);
89
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('2010-11-26 19:22:50', 7);
90
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('2012-07-03 09:48:46', 7);
91
+ INSERT INTO Ref_Calendar (`Calendar_Date`, `Day_Number`) VALUES ('2017-01-06 23:17:22', 8);
92
+ INSERT INTO Ref_Document_Types (`Document_Type_Code`, `Document_Type_Name`, `Document_Type_Description`) VALUES ('CV', 'CV', '');
93
+ INSERT INTO Ref_Document_Types (`Document_Type_Code`, `Document_Type_Name`, `Document_Type_Description`) VALUES ('BK', 'Book', '');
94
+ INSERT INTO Ref_Document_Types (`Document_Type_Code`, `Document_Type_Name`, `Document_Type_Description`) VALUES ('PR', 'Paper', '');
95
+ INSERT INTO Ref_Document_Types (`Document_Type_Code`, `Document_Type_Name`, `Document_Type_Description`) VALUES ('RV', 'Review', '');
96
+ INSERT INTO Ref_Locations (`Location_Code`, `Location_Name`, `Location_Description`) VALUES ('b', 'Brazil', '');
97
+ INSERT INTO Ref_Locations (`Location_Code`, `Location_Name`, `Location_Description`) VALUES ('c', 'Canada', '');
98
+ INSERT INTO Ref_Locations (`Location_Code`, `Location_Name`, `Location_Description`) VALUES ('e', 'Edinburgh', '');
99
+ INSERT INTO Ref_Locations (`Location_Code`, `Location_Name`, `Location_Description`) VALUES ('n', 'Nanjing', '');
100
+ INSERT INTO Ref_Locations (`Location_Code`, `Location_Name`, `Location_Description`) VALUES ('x', 'Xiamen', '');
101
+ INSERT INTO Roles (`Role_Code`, `Role_Name`, `Role_Description`) VALUES ('MG', 'Manager', 'Vero harum corrupti odit ipsa vero et odio. Iste et recusandae temporibus maxime. Magni aspernatur fugit quis explicabo totam esse corrupti.');
102
+ INSERT INTO Roles (`Role_Code`, `Role_Name`, `Role_Description`) VALUES ('ED', 'Editor', 'Itaque dolor ut nemo rerum vitae provident. Vel laborum ipsum velit sint. Et est omnis dignissimos.');
103
+ INSERT INTO Roles (`Role_Code`, `Role_Name`, `Role_Description`) VALUES ('PT', 'Photo', 'Aut modi nihil molestias temporibus sit rerum. Sit neque eaque odio omnis incidunt.');
104
+ INSERT INTO Roles (`Role_Code`, `Role_Name`, `Role_Description`) VALUES ('PR', 'Proof Reader', 'Ut sed quae eaque mollitia qui hic. Natus ea expedita et odio illum fugiat qui natus. Consequatur velit ut dolorem cum ullam esse deserunt dignissimos. Enim non non rem officiis quis.');
105
+ INSERT INTO Roles (`Role_Code`, `Role_Name`, `Role_Description`) VALUES ('HR', 'Human Resource', 'Et totam est quibusdam aspernatur ut. Vitae perferendis eligendi voluptatem molestiae rem ut enim. Ipsum expedita quae earum unde est. Repellendus ut ipsam nihil accusantium sit. Magni accusantium numquam quod et.');
106
+
107
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (25, 'HR', 'Leo', '', '1973-02-15 17:16:00', NULL);
108
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (30, 'MG', 'Ebba', '', '1979-09-20 12:50:15', NULL);
109
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (38, 'ED', 'Stephanie', '1', '2012-03-30 23:02:28', NULL);
110
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (55, 'ED', 'Harley', '', '1972-02-18 11:53:30', NULL);
111
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (57, 'ED', 'Armani', '', '1988-12-08 06:13:33', NULL);
112
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (71, 'ED', 'Gussie', '', '1973-04-04 21:41:22', NULL);
113
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (99, 'ED', 'Izabella', '1', '1977-07-04 16:25:21', NULL);
114
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (123, 'PT', 'Hugh', '', '2010-03-15 00:17:13', NULL);
115
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (136, 'ED', 'Mallie', '', '1980-12-11 20:28:20', NULL);
116
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (138, 'ED', 'Beatrice', '1', '2013-04-02 23:55:48', NULL);
117
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (156, 'PR', 'Diego', '', '1998-05-30 12:54:10', NULL);
118
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (159, 'PR', 'Arno', '', '2010-06-10 20:36:34', NULL);
119
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (173, 'PR', 'Alene', '1', '1980-10-14 12:23:10', NULL);
120
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (181, 'PR', 'Ettie', '1', '1988-08-03 00:11:14', NULL);
121
+ INSERT INTO Employees (`Employee_ID`, `Role_Code`, `Employee_Name`, `Gender_MFU`, `Date_of_Birth`, `Other_Details`) VALUES (183, 'PR', 'Jeramie', '', '1993-08-21 05:22:10', NULL);
122
+
123
+
124
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (7, '1976-06-15 03:40:06', 'CV', 'Robin CV', NULL, NULL);
125
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (11, '1986-10-14 17:53:39', 'CV', 'Marry CV', NULL, NULL);
126
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (25, '2008-06-08 12:45:38', 'BK', 'One hundred years of solitude', NULL, NULL);
127
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (39, '2012-07-03 09:48:46', 'BK', 'How to read a book', NULL, NULL);
128
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (72, '2012-07-03 09:48:46', 'CV', 'Alan CV', NULL, NULL);
129
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (81, '1995-01-01 03:52:11', 'BK', 'Hua Mulan', NULL, NULL);
130
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (99, '2008-06-08 12:45:38', 'CV', 'Leon CV', NULL, NULL);
131
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (111, '1987-11-05 06:11:22', 'PR', 'Learning features of CNN', NULL, NULL);
132
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (119, '2008-06-08 12:45:38', 'RV', 'Marriage and population', NULL, NULL);
133
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (120, '1997-03-10 15:24:00', 'RV', 'Society and tax', NULL, NULL);
134
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (166, '1997-03-10 15:24:00', 'PR', 'Are you talking to a machine', NULL, NULL);
135
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (170, '2009-08-18 03:29:08', 'RV', 'Population', NULL, NULL);
136
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (230, '1976-06-15 03:40:06', 'CV', 'Martin CV', NULL, NULL);
137
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (252, '1976-06-15 03:40:06', 'BK', 'Summer', NULL, NULL);
138
+ INSERT INTO All_Documents (`Document_ID`, `Date_Stored`, `Document_Type_Code`, `Document_Name`, `Document_Description`, `Other_Details`) VALUES (260, '1997-03-10 15:24:00', 'BK', 'Cats and me', NULL, NULL);
139
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (7, 'e', '2017-01-06 23:17:22', '2008-06-08 12:45:38');
140
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (11, 'x', '2017-01-06 23:17:22', '2012-07-03 09:48:46');
141
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (81, 'c', '1972-03-31 09:47:22', '1987-11-05 06:11:22');
142
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (81, 'c', '2017-01-06 23:17:22', '2010-11-26 19:22:50');
143
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (81, 'x', '2008-06-08 12:45:38', '1976-06-15 03:40:06');
144
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (111, 'x', '1986-10-14 17:53:39', '2010-11-26 19:22:50');
145
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (119, 'b', '2017-01-06 23:17:22', '1995-01-01 03:52:11');
146
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (166, 'b', '1985-05-13 12:19:43', '1986-10-14 17:53:39');
147
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (166, 'b', '1986-10-14 17:53:39', '2010-11-26 19:22:50');
148
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (170, 'x', '1997-03-10 15:24:00', '1976-06-15 03:40:06');
149
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (230, 'e', '1972-03-31 09:47:22', '1987-11-05 06:11:22');
150
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (230, 'e', '2010-11-26 19:22:50', '2017-01-06 23:17:22');
151
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (252, 'n', '2017-01-06 23:17:22', '1997-03-10 15:24:00');
152
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (252, 'x', '1972-03-31 09:47:22', '2009-08-18 03:29:08');
153
+ INSERT INTO Document_Locations (`Document_ID`, `Location_Code`, `Date_in_Location_From`, `Date_in_Locaton_To`) VALUES (260, 'e', '2009-08-18 03:29:08', '1986-10-14 17:53:39');
154
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (7, 156, 138, '1988-02-01 14:41:52', '2017-01-06 23:17:22', NULL);
155
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (11, 55, 173, '2010-11-26 19:22:50', '1986-10-14 17:53:39', NULL);
156
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (25, 183, 156, '2009-08-18 03:29:08', '1995-01-01 03:52:11', NULL);
157
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (39, 183, 136, '1976-06-15 03:40:06', '2009-08-18 03:29:08', NULL);
158
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (99, 55, 99, '2017-01-06 23:17:22', '1986-10-14 17:53:39', NULL);
159
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (111, 38, 173, '1972-03-31 09:47:22', '2009-08-18 03:29:08', NULL);
160
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (120, 183, 173, '1972-03-31 09:47:22', '1995-01-01 03:52:11', NULL);
161
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (166, 156, 38, '1987-11-05 06:11:22', '2012-07-03 09:48:46', NULL);
162
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (170, 123, 136, '2017-01-06 23:17:22', '1988-02-01 14:41:52', NULL);
163
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (252, 30, 55, '1972-03-31 09:47:22', '1985-05-13 12:19:43', NULL);
164
+ INSERT INTO Documents_to_be_Destroyed (`Document_ID`, `Destruction_Authorised_by_Employee_ID`, `Destroyed_by_Employee_ID`, `Planned_Destruction_Date`, `Actual_Destruction_Date`, `Other_Details`) VALUES (260, 55, 99, '2017-01-06 23:17:22', '2017-01-06 23:17:22', NULL);
all_databases/cre_Doc_Workflow/cre_Doc_Workflow.sqlite ADDED
Binary file (65.5 kB). View file
 
all_databases/cre_Doc_Workflow/schema.sql ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PRAGMA foreign_keys = ON;
2
+
3
+ CREATE TABLE Staff (
4
+ staff_id INTEGER NOT NULL,
5
+ staff_details VARCHAR(255) NOT NULL,
6
+ PRIMARY KEY (staff_id)
7
+ );
8
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (3, 'Mrs. Aniya Klocko Sr.');
9
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (26, 'Prof. Pietro Hudson');
10
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (52, 'Mr. Sid Hessel');
11
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (66, 'Rosie Conn');
12
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (67, 'Jade O''Connell III');
13
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (76, 'Santina Cronin');
14
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (93, 'Bella Hilll DDS');
15
+ INSERT INTO Staff (`staff_id`, `staff_details`) VALUES (100, 'Prof. Porter Dickinson Sr.');
16
+
17
+
18
+ CREATE TABLE Ref_Staff_Roles (
19
+ staff_role_code CHAR(15) NOT NULL,
20
+ staff_role_description VARCHAR(255) NOT NULL,
21
+ PRIMARY KEY (staff_role_code)
22
+ );
23
+ INSERT INTO Ref_Staff_Roles (`staff_role_code`, `staff_role_description`) VALUES ('MG', 'Manager');
24
+ INSERT INTO Ref_Staff_Roles (`staff_role_code`, `staff_role_description`) VALUES ('ED', 'Editor');
25
+ INSERT INTO Ref_Staff_Roles (`staff_role_code`, `staff_role_description`) VALUES ('PT', 'Photo');
26
+ INSERT INTO Ref_Staff_Roles (`staff_role_code`, `staff_role_description`) VALUES ('PR', 'Proof Reader');
27
+ INSERT INTO Ref_Staff_Roles (`staff_role_code`, `staff_role_description`) VALUES ('HR', 'Human Resource');
28
+
29
+
30
+ CREATE TABLE Process_Outcomes (
31
+ process_outcome_code CHAR(15) NOT NULL,
32
+ process_outcome_description VARCHAR(255) NOT NULL,
33
+ PRIMARY KEY (process_outcome_code)
34
+ );
35
+ CREATE TABLE Process_Status (
36
+ process_status_code CHAR(15) NOT NULL,
37
+ process_status_description VARCHAR(255) NOT NULL,
38
+ PRIMARY KEY (process_status_code)
39
+ );
40
+ INSERT INTO Process_Outcomes (`process_outcome_code`, `process_outcome_description`) VALUES ('working', 'working on');
41
+ INSERT INTO Process_Outcomes (`process_outcome_code`, `process_outcome_description`) VALUES ('finish', 'finish');
42
+ INSERT INTO Process_Outcomes (`process_outcome_code`, `process_outcome_description`) VALUES ('start', 'starting soon');
43
+ INSERT INTO Process_Status (`process_status_code`, `process_status_description`) VALUES ('ct', 'continue');
44
+ INSERT INTO Process_Status (`process_status_code`, `process_status_description`) VALUES ('pp', 'postpone');
45
+
46
+
47
+
48
+ CREATE TABLE Authors (
49
+ author_name VARCHAR(255) NOT NULL,
50
+ other_details VARCHAR(255) NOT NULL,
51
+ PRIMARY KEY (author_name)
52
+ );
53
+
54
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Addison Denesik', '');
55
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Adeline Wolff', '');
56
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Antwon Krajcik V', '');
57
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Beverly Bergnaum MD', '');
58
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Bianka Cummings', '');
59
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Dr. Dario Hermiston', '');
60
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Dr. Shad Lowe', '');
61
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Era Kerluke', '');
62
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Eveline Bahringer', '');
63
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Fiona Sipes DVM', '');
64
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Jameson Konopelski', '');
65
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Katharina Koepp', '');
66
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Malvina Metz', '');
67
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Marjolaine Paucek', '');
68
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Mr. Joaquin Sanford', '');
69
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Prof. Baron Heller II', '');
70
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Shanie Skiles', '');
71
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Telly Pfannerstill', '');
72
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Tevin Weber', '');
73
+ INSERT INTO Authors (`author_name`, `other_details`) VALUES ('Vidal Sanford', '');
74
+
75
+
76
+
77
+ CREATE TABLE Documents (
78
+ document_id INTEGER NOT NULL,
79
+ author_name VARCHAR(255) NOT NULL,
80
+ document_name VARCHAR(255) NOT NULL,
81
+ document_description VARCHAR(255) NOT NULL,
82
+ other_details VARCHAR(255),
83
+ PRIMARY KEY (document_id),
84
+ FOREIGN KEY (author_name) REFERENCES Authors (author_name)
85
+ );
86
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (0, 'Malvina Metz', 'Travel to Brazil', 'Nulla molestiae voluptas recusandae dolores explicabo et. Consequuntur ut autem velit eos aut.', NULL);
87
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (4, 'Telly Pfannerstill', 'Travel to China', 'Maiores suscipit earum sed iure. Quis voluptatem facilis doloremque nisi corrupti. Sed est repellendus et aut id. Nisi quis ex eligendi possimus ut ut unde.', NULL);
88
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (7, 'Malvina Metz', 'Travel to England', 'Dolores beatae omnis dolorem laudantium quaerat ut. Perspiciatis explicabo est ut vel porro omnis. Aut non occaecati aut quia ut non omnis. Quia quam ea consequuntur quo aliquam.', NULL);
89
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (24, 'Bianka Cummings', 'Travel to Egypt', 'Culpa voluptatibus alias quo amet dolore eum possimus. Qui placeat cumque non aperiam. Cupiditate pariatur dolorum sed ut.', NULL);
90
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (29, 'Bianka Cummings', 'Travel to Ireland', 'Cumque a ducimus perferendis sint. Quidem tempora recusandae accusamus possimus aut vitae quo. Omnis earum sint doloribus velit.', NULL);
91
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (52, 'Eveline Bahringer', 'How to cook chicken', 'Soluta vitae sed soluta. Aut eos omnis dolorem qui non recusandae neque. Atque enim inventore sint dolor sit.', NULL);
92
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (77, 'Marjolaine Paucek', 'How to cook pasta', 'Occaecati id consectetur amet. Fuga vel voluptate qui autem quisquam quis. Eos rerum et iste impedit vel facere.', NULL);
93
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (79, 'Tevin Weber', 'How to cook steak', 'Eius rerum rerum architecto optio reprehenderit rerum id. Voluptatem et atque expedita. Voluptatem sint qui aut nostrum voluptas.', NULL);
94
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (262, 'Addison Denesik', 'How to cook rice', 'Quo alias nam consectetur nostrum voluptatibus omnis occaecati. Perspiciatis assumenda sed ullam veritatis modi id. Animi praesentium tenetur hic reiciendis nihil hic aut.', NULL);
95
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (462, 'Adeline Wolff', 'Learning about flowers', 'Dolor ipsum sed cum aliquid eius enim exercitationem. Eius cupiditate magni sed et. Ex qui debitis sint aliquam illo eligendi magni praesentium. Et reiciendis sed in nostrum eius asperiores. Repellat et odio non qui mollitia.', NULL);
96
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (927, 'Tevin Weber', 'Learning about palm reading', 'Omnis perferendis voluptas ea animi ad eum voluptatibus. Tempora natus deleniti consequatur rerum id nisi fugit nihil. Labore repellendus porro consequatur qui.', NULL);
97
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (435463, 'Antwon Krajcik V', 'Learning about chess', 'Qui dolor et porro ut commodi error sed. Qui deserunt et est provident ut. Et quos libero iusto qui enim.', NULL);
98
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (461893, 'Era Kerluke', 'Learning about society', 'Magnam quos voluptatibus sit qui. Recusandae dignissimos repellendus et dolor sequi provident. Consectetur occaecati illum laboriosam id.', NULL);
99
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (782065904, 'Beverly Bergnaum MD', 'Learning about arts', 'Qui omnis sint eligendi adipisci perferendis. Quis id voluptatum nobis sed magnam animi quos. Consequatur voluptates voluptatum iure recusandae.', NULL);
100
+ INSERT INTO Documents (`document_id`, `author_name`, `document_name`, `document_description`, `other_details`) VALUES (948678383, 'Beverly Bergnaum MD', 'Learning about history', 'Corrupti porro nemo voluptas voluptatibus ipsam minus sed. Alias dolores voluptatibus reprehenderit sunt architecto mollitia incidunt molestiae.', NULL);
101
+
102
+
103
+ CREATE TABLE Business_Processes (
104
+ process_id INTEGER NOT NULL,
105
+ next_process_id INTEGER,
106
+ process_name VARCHAR(255) NOT NULL,
107
+ process_description VARCHAR(255) NOT NULL,
108
+ other_details VARCHAR(255),
109
+ PRIMARY KEY (process_id)
110
+ );
111
+ INSERT INTO Business_Processes (`process_id`, `next_process_id`, `process_name`, `process_description`, `other_details`) VALUES (9, 9, 'process', 'normal', NULL);
112
+
113
+
114
+
115
+ CREATE TABLE Documents_Processes (
116
+ document_id INTEGER NOT NULL,
117
+ process_id INTEGER NOT NULL,
118
+ process_outcome_code CHAR(15) NOT NULL,
119
+ process_status_code CHAR(15) NOT NULL,
120
+ PRIMARY KEY (document_id, process_id),
121
+ FOREIGN KEY (document_id) REFERENCES Documents (document_id),
122
+ FOREIGN KEY (process_id) REFERENCES Business_Processes (process_id),
123
+ FOREIGN KEY (process_outcome_code) REFERENCES Process_Outcomes (process_outcome_code),
124
+ FOREIGN KEY (process_status_code) REFERENCES Process_Status (process_status_code)
125
+ );
126
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (0, 9, 'finish', 'ct');
127
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (4, 9, 'start', 'ct');
128
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (7, 9, 'start', 'pp');
129
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (24, 9, 'start', 'ct');
130
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (52, 9, 'finish', 'pp');
131
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (462, 9, 'working', 'ct');
132
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (927, 9, 'working', 'pp');
133
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (435463, 9, 'start', 'ct');
134
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (461893, 9, 'finish', 'pp');
135
+ INSERT INTO Documents_Processes (`document_id`, `process_id`, `process_outcome_code`, `process_status_code`) VALUES (782065904, 9, 'working', 'ct');
136
+
137
+
138
+ CREATE TABLE Staff_in_Processes (
139
+ document_id INTEGER NOT NULL,
140
+ process_id INTEGER NOT NULL,
141
+ staff_id INTEGER NOT NULL,
142
+ staff_role_code CHAR(15) NOT NULL,
143
+ date_from DATETIME,
144
+ date_to DATETIME,
145
+ other_details VARCHAR(255),
146
+ PRIMARY KEY (document_id, process_id, staff_id),
147
+ FOREIGN KEY (staff_id) REFERENCES Staff (staff_id),
148
+ FOREIGN KEY (document_id, process_id) REFERENCES Documents_Processes (document_id,process_id),
149
+ FOREIGN KEY (staff_role_code) REFERENCES Ref_Staff_Roles (staff_role_code)
150
+ );
151
+
152
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (0, 9, 3, 'MG', '1989-02-06 18:30:52', '2001-08-10 20:58:06', NULL);
153
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (0, 9, 67, 'ED', '2015-01-01 06:43:57', '1982-01-11 19:27:20', NULL);
154
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (4, 9, 3, 'HR', '1979-10-19 18:36:39', '1993-12-13 11:55:33', NULL);
155
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (7, 9, 100, 'PT', '1988-06-20 01:13:16', '2000-06-15 03:03:57', NULL);
156
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (24, 9, 26, 'PR', '1973-02-04 06:53:33', '2005-10-19 08:53:29', NULL);
157
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (462, 9, 26, 'ED', '1988-08-05 21:55:02', '1995-03-09 06:54:14', NULL);
158
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (462, 9, 76, 'ED', '2009-08-07 08:26:16', '1973-09-18 07:39:56', NULL);
159
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (927, 9, 3, 'ED', '1998-09-05 17:52:04', '2014-05-24 01:12:43', NULL);
160
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (435463, 9, 52, 'PT', '1972-04-24 05:45:56', '1974-08-02 01:37:15', NULL);
161
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (461893, 9, 67, 'HR', '2000-06-10 21:41:38', '2007-02-12 17:11:51', NULL);
162
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (461893, 9, 93, 'MG', '2010-05-08 11:30:36', '1973-02-25 01:08:20', NULL);
163
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (782065904, 9, 52, 'ED', '2007-07-21 13:51:39', '1970-03-14 11:36:29', NULL);
164
+ INSERT INTO Staff_in_Processes (`document_id`, `process_id`, `staff_id`, `staff_role_code`, `date_from`, `date_to`, `other_details`) VALUES (782065904, 9, 66, 'MG', '1983-04-04 06:50:24', '1996-03-15 15:12:08', NULL);