Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- database/architecture/architecture.sqlite +0 -0
- database/architecture/schema.sql +65 -0
- database/bike_1/schema.sql +0 -0
- database/car_1/car_1.sqlite +0 -0
- database/car_1/data_csv/model-list.csv +37 -0
- database/city_record/schema.sql +88 -0
- database/club_1/club_1.sqlite +0 -0
- database/club_1/schema.sql +73 -0
- database/college_2/TextBookExampleSchema.sql +0 -0
- database/college_3/schema.sql +575 -0
- database/company_1/company_1.sqlite +0 -0
- database/course_teach/schema.sql +52 -0
- database/cre_Doc_Control_Systems/cre_Doc_Control_Systems.sqlite +0 -0
- database/cre_Doc_Template_Mgt/schema.sql +90 -0
- database/cre_Doc_Tracking_DB/cre_Doc_Tracking_DB.sqlite +0 -0
- database/cre_Doc_Tracking_DB/schema.sql +164 -0
- database/culture_company/schema.sql +69 -0
- database/customer_complaints/schema.sql +83 -0
- database/customer_deliveries/customer_deliveries.sqlite +0 -0
- database/customer_deliveries/schema.sql +333 -0
- database/customers_and_products_contacts/customers_and_products_contacts.sqlite +0 -0
- database/customers_and_products_contacts/schema.sql +176 -0
- database/customers_card_transactions/schema.sql +115 -0
- database/debate/schema.sql +60 -0
- database/decoration_competition/decoration_competition.sqlite +0 -0
- database/decoration_competition/schema.sql +58 -0
- database/department_store/department_store.sqlite +0 -0
- database/department_store/schema.sql +348 -0
- database/document_management/document_management.sqlite +0 -0
- database/driving_school/driving_school.sqlite +0 -0
- database/driving_school/schema.sql +148 -0
- database/e_government/e_government.sqlite +0 -0
- database/e_learning/e_learning.sqlite +0 -0
- database/election_representative/election_representative.sqlite +0 -0
- database/election_representative/schema.sql +37 -0
- database/entertainment_awards/entertainment_awards.sqlite +0 -0
- database/entertainment_awards/schema.sql +54 -0
- database/epinions_1/epinions_1.sqlite +0 -0
- database/film_rank/film_rank.sqlite +0 -0
- database/flight_2/annotation.json +38 -0
- database/flight_2/flight_2.sql +22 -0
- database/flight_2/q.txt +15 -0
- database/flight_4/link.txt +1 -0
- database/flight_4/sql.txt +1 -0
- database/flight_company/schema.sql +82 -0
- database/formula_1/data_csv/results.csv +0 -0
- database/icfp_1/q.txt +9 -0
- database/inn_1/annotation.json +38 -0
- database/inn_1/inn_1.sql +24 -0
- database/insurance_and_eClaims/insurance_and_eClaims.sqlite +0 -0
database/architecture/architecture.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/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 |
+
|
database/bike_1/schema.sql
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
database/car_1/car_1.sqlite
ADDED
|
Binary file (65.5 kB). View file
|
|
|
database/car_1/data_csv/model-list.csv
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ModelId,Maker,Model
|
| 2 |
+
1,1,'amc'
|
| 3 |
+
2,2,'audi'
|
| 4 |
+
3,3,'bmw'
|
| 5 |
+
4,4,'buick'
|
| 6 |
+
5,4,'cadillac'
|
| 7 |
+
6,5,'capri'
|
| 8 |
+
7,4,'chevrolet'
|
| 9 |
+
8,6,'chrysler'
|
| 10 |
+
9,7,'citroen'
|
| 11 |
+
10,8,'datsun'
|
| 12 |
+
11,6,'dodge'
|
| 13 |
+
12,9,'fiat'
|
| 14 |
+
13,5,'ford'
|
| 15 |
+
14,10,'hi'
|
| 16 |
+
15,11,'honda'
|
| 17 |
+
16,12,'mazda'
|
| 18 |
+
17,13,'mercedes'
|
| 19 |
+
18,13,'mercedes-benz'
|
| 20 |
+
19,5,'mercury'
|
| 21 |
+
20,8,'nissan'
|
| 22 |
+
21,4,'oldsmobile'
|
| 23 |
+
22,14,'opel'
|
| 24 |
+
23,15,'peugeot'
|
| 25 |
+
24,6,'plymouth'
|
| 26 |
+
25,4,'pontiac'
|
| 27 |
+
26,16,'renault'
|
| 28 |
+
27,17,'saab'
|
| 29 |
+
28,18,'subaru'
|
| 30 |
+
29,19,'toyota'
|
| 31 |
+
30,20,'triumph'
|
| 32 |
+
31,2,'volkswagen'
|
| 33 |
+
32,21,'volvo'
|
| 34 |
+
33,22,'kia'
|
| 35 |
+
34,23,'hyundai'
|
| 36 |
+
35,6,'jeep'
|
| 37 |
+
36,19,'scion'
|
database/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);
|
database/club_1/club_1.sqlite
ADDED
|
Binary file (16.4 kB). View file
|
|
|
database/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');
|
database/college_2/TextBookExampleSchema.sql
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
database/college_3/schema.sql
ADDED
|
@@ -0,0 +1,575 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
create table Faculty (
|
| 13 |
+
FacID INTEGER PRIMARY KEY,
|
| 14 |
+
Lname VARCHAR(15),
|
| 15 |
+
Fname VARCHAR(15),
|
| 16 |
+
Rank VARCHAR(15),
|
| 17 |
+
Sex VARCHAR(1),
|
| 18 |
+
Phone INTEGER,
|
| 19 |
+
Room VARCHAR(5),
|
| 20 |
+
Building VARCHAR(13)
|
| 21 |
+
);
|
| 22 |
+
|
| 23 |
+
create table Department (
|
| 24 |
+
DNO INTEGER PRIMARY KEY,
|
| 25 |
+
Division VARCHAR(2),
|
| 26 |
+
DName VARCHAR(25),
|
| 27 |
+
Room VARCHAR(5),
|
| 28 |
+
Building VARCHAR(13),
|
| 29 |
+
DPhone INTEGER
|
| 30 |
+
);
|
| 31 |
+
|
| 32 |
+
create table Member_of (
|
| 33 |
+
FacID INTEGER,
|
| 34 |
+
DNO INTEGER,
|
| 35 |
+
Appt_Type VARCHAR(15),
|
| 36 |
+
FOREIGN KEY(FacID) REFERENCES Faculty(FacID),
|
| 37 |
+
FOREIGN KEY(DNO) REFERENCES Department(DNO)
|
| 38 |
+
);
|
| 39 |
+
|
| 40 |
+
create table Course (
|
| 41 |
+
CID VARCHAR(7) PRIMARY KEY,
|
| 42 |
+
CName VARCHAR(40),
|
| 43 |
+
Credits INTEGER,
|
| 44 |
+
Instructor INTEGER,
|
| 45 |
+
Days VARCHAR(5),
|
| 46 |
+
Hours VARCHAR(11),
|
| 47 |
+
DNO INTEGER,
|
| 48 |
+
FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),
|
| 49 |
+
FOREIGN KEY(DNO) REFERENCES Department(DNO)
|
| 50 |
+
);
|
| 51 |
+
|
| 52 |
+
create table Minor_in (
|
| 53 |
+
StuID INTEGER,
|
| 54 |
+
DNO INTEGER,
|
| 55 |
+
FOREIGN KEY(StuID) REFERENCES Student(StuID),
|
| 56 |
+
FOREIGN KEY(DNO) REFERENCES Department(DNO)
|
| 57 |
+
);
|
| 58 |
+
|
| 59 |
+
create table Enrolled_in (
|
| 60 |
+
StuID INTEGER,
|
| 61 |
+
CID VARCHAR(7),
|
| 62 |
+
Grade VARCHAR(2),
|
| 63 |
+
FOREIGN KEY(StuID) REFERENCES Student(StuID),
|
| 64 |
+
FOREIGN KEY(CID) REFERENCES Course(CID),
|
| 65 |
+
FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)
|
| 66 |
+
);
|
| 67 |
+
|
| 68 |
+
create table Gradeconversion (
|
| 69 |
+
lettergrade VARCHAR(2) PRIMARY KEY,
|
| 70 |
+
gradepoint FLOAT
|
| 71 |
+
);
|
| 72 |
+
|
| 73 |
+
insert into Minor_in values ( 1004, 520);
|
| 74 |
+
insert into Minor_in values ( 1005, 550);
|
| 75 |
+
insert into Minor_in values ( 1006, 050);
|
| 76 |
+
insert into Minor_in values ( 1007, 520);
|
| 77 |
+
insert into Minor_in values ( 1008, 550);
|
| 78 |
+
insert into Minor_in values ( 1014, 090);
|
| 79 |
+
insert into Minor_in values ( 1015, 140);
|
| 80 |
+
insert into Minor_in values ( 1016, 190);
|
| 81 |
+
insert into Minor_in values ( 1027, 530);
|
| 82 |
+
insert into Minor_in values ( 1031, 540);
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
insert into Enrolled_in values ( 1001, '550.681', 'A-');
|
| 86 |
+
insert into Enrolled_in values ( 1001, '600.303', 'B');
|
| 87 |
+
insert into Enrolled_in values ( 1001, '600.315', 'B+');
|
| 88 |
+
insert into Enrolled_in values ( 1001, '600.337', 'A');
|
| 89 |
+
insert into Enrolled_in values ( 1001, '600.461', 'B-');
|
| 90 |
+
insert into Enrolled_in values ( 1001, '600.465', 'B');
|
| 91 |
+
insert into Enrolled_in values ( 1002, '520.213', 'B+');
|
| 92 |
+
insert into Enrolled_in values ( 1002, '600.211', 'C');
|
| 93 |
+
insert into Enrolled_in values ( 1002, '600.303', 'C+');
|
| 94 |
+
insert into Enrolled_in values ( 1002, '600.337', 'A');
|
| 95 |
+
insert into Enrolled_in values ( 1002, '600.463', 'B');
|
| 96 |
+
insert into Enrolled_in values ( 1002, '600.465', 'B+');
|
| 97 |
+
insert into Enrolled_in values ( 1003, '600.333', 'B');
|
| 98 |
+
insert into Enrolled_in values ( 1003, '600.337', 'B');
|
| 99 |
+
insert into Enrolled_in values ( 1003, '600.415', 'B');
|
| 100 |
+
insert into Enrolled_in values ( 1003, '600.461', 'B+');
|
| 101 |
+
insert into Enrolled_in values ( 1003, '600.465', 'B');
|
| 102 |
+
insert into Enrolled_in values ( 1004, '600.303', 'C-');
|
| 103 |
+
insert into Enrolled_in values ( 1004, '600.415', 'C-');
|
| 104 |
+
insert into Enrolled_in values ( 1004, '600.437', 'C-');
|
| 105 |
+
insert into Enrolled_in values ( 1004, '600.445', 'A-');
|
| 106 |
+
insert into Enrolled_in values ( 1004, '600.461', 'C');
|
| 107 |
+
insert into Enrolled_in values ( 1004, '600.463', 'A+');
|
| 108 |
+
insert into Enrolled_in values ( 1004, '600.465', 'A');
|
| 109 |
+
insert into Enrolled_in values ( 1005, '600.103', 'A');
|
| 110 |
+
insert into Enrolled_in values ( 1005, '600.107', 'C+');
|
| 111 |
+
insert into Enrolled_in values ( 1005, '600.113', 'C');
|
| 112 |
+
insert into Enrolled_in values ( 1005, '600.227', 'A');
|
| 113 |
+
insert into Enrolled_in values ( 1005, '600.303', 'B');
|
| 114 |
+
insert into Enrolled_in values ( 1006, '550.420', 'B');
|
| 115 |
+
insert into Enrolled_in values ( 1006, '600.107', 'B+');
|
| 116 |
+
insert into Enrolled_in values ( 1006, '600.227', 'B-');
|
| 117 |
+
insert into Enrolled_in values ( 1006, '600.232', 'C-');
|
| 118 |
+
insert into Enrolled_in values ( 1006, '600.303', 'A-');
|
| 119 |
+
insert into Enrolled_in values ( 1006, '600.315', 'A');
|
| 120 |
+
insert into Enrolled_in values ( 1007, '550.420', 'A');
|
| 121 |
+
insert into Enrolled_in values ( 1007, '600.113', 'A-');
|
| 122 |
+
insert into Enrolled_in values ( 1007, '600.227', 'C+');
|
| 123 |
+
insert into Enrolled_in values ( 1007, '600.315', 'A');
|
| 124 |
+
insert into Enrolled_in values ( 1007, '600.333', 'A-');
|
| 125 |
+
insert into Enrolled_in values ( 1007, '600.337', 'C');
|
| 126 |
+
insert into Enrolled_in values ( 1008, '600.415', 'A+');
|
| 127 |
+
insert into Enrolled_in values ( 1008, '600.463', 'B');
|
| 128 |
+
insert into Enrolled_in values ( 1008, '600.465', 'B');
|
| 129 |
+
insert into Enrolled_in values ( 1008, '600.657', 'B');
|
| 130 |
+
insert into Enrolled_in values ( 1008, '600.787', 'B');
|
| 131 |
+
insert into Enrolled_in values ( 1009, '550.413', 'B+');
|
| 132 |
+
insert into Enrolled_in values ( 1009, '550.471', 'C');
|
| 133 |
+
insert into Enrolled_in values ( 1009, '550.620', 'A-');
|
| 134 |
+
insert into Enrolled_in values ( 1009, '550.626', 'B');
|
| 135 |
+
insert into Enrolled_in values ( 1009, '550.671', 'C');
|
| 136 |
+
insert into Enrolled_in values ( 1009, '550.681', 'A');
|
| 137 |
+
insert into Enrolled_in values ( 1009, '550.661', 'B-');
|
| 138 |
+
insert into Enrolled_in values ( 1009, '550.631', 'A-');
|
| 139 |
+
insert into Enrolled_in values ( 1010, '550.291', 'A');
|
| 140 |
+
insert into Enrolled_in values ( 1010, '550.310', 'A');
|
| 141 |
+
insert into Enrolled_in values ( 1010, '550.413', 'C+');
|
| 142 |
+
insert into Enrolled_in values ( 1010, '550.420', 'A');
|
| 143 |
+
insert into Enrolled_in values ( 1010, '550.471', 'A');
|
| 144 |
+
insert into Enrolled_in values ( 1010, '600.107', 'B+');
|
| 145 |
+
insert into Enrolled_in values ( 1011, '520.213', 'B');
|
| 146 |
+
insert into Enrolled_in values ( 1011, '520.345', 'B');
|
| 147 |
+
insert into Enrolled_in values ( 1011, '520.349', 'A');
|
| 148 |
+
insert into Enrolled_in values ( 1011, '520.353', 'A-');
|
| 149 |
+
insert into Enrolled_in values ( 1011, '550.420', 'B');
|
| 150 |
+
insert into Enrolled_in values ( 1011, '600.415', 'B+');
|
| 151 |
+
insert into Enrolled_in values ( 1012, '050.109', 'B-');
|
| 152 |
+
insert into Enrolled_in values ( 1012, '050.203', 'B-');
|
| 153 |
+
insert into Enrolled_in values ( 1012, '050.325', 'A-');
|
| 154 |
+
insert into Enrolled_in values ( 1012, '600.107', 'A');
|
| 155 |
+
insert into Enrolled_in values ( 1012, '600.315', 'B');
|
| 156 |
+
insert into Enrolled_in values ( 1014, '600.107', 'A');
|
| 157 |
+
insert into Enrolled_in values ( 1014, '600.227', 'A');
|
| 158 |
+
insert into Enrolled_in values ( 1014, '600.232', 'A');
|
| 159 |
+
insert into Enrolled_in values ( 1014, '600.315', 'A+');
|
| 160 |
+
insert into Enrolled_in values ( 1014, '600.445', 'B');
|
| 161 |
+
insert into Enrolled_in values ( 1014, '600.461', 'B');
|
| 162 |
+
insert into Enrolled_in values ( 1014, '600.463', 'B');
|
| 163 |
+
insert into Enrolled_in values ( 1015, '550.420', 'A');
|
| 164 |
+
insert into Enrolled_in values ( 1015, '600.227', 'A+');
|
| 165 |
+
insert into Enrolled_in values ( 1015, '600.303', 'A');
|
| 166 |
+
insert into Enrolled_in values ( 1015, '600.315', 'C-');
|
| 167 |
+
insert into Enrolled_in values ( 1015, '600.333', 'A');
|
| 168 |
+
insert into Enrolled_in values ( 1016, '050.109', 'B-');
|
| 169 |
+
insert into Enrolled_in values ( 1016, '050.203', 'D-');
|
| 170 |
+
insert into Enrolled_in values ( 1016, '050.325', 'A');
|
| 171 |
+
insert into Enrolled_in values ( 1016, '050.821', 'A');
|
| 172 |
+
insert into Enrolled_in values ( 1016, '550.420', 'A-');
|
| 173 |
+
insert into Enrolled_in values ( 1016, '600.107', 'B+');
|
| 174 |
+
insert into Enrolled_in values ( 1016, '600.315', 'B-');
|
| 175 |
+
insert into Enrolled_in values ( 1017, '050.427', 'B');
|
| 176 |
+
insert into Enrolled_in values ( 1017, '050.670', 'B');
|
| 177 |
+
insert into Enrolled_in values ( 1017, '050.802', 'C');
|
| 178 |
+
insert into Enrolled_in values ( 1017, '550.681', 'B');
|
| 179 |
+
insert into Enrolled_in values ( 1017, '600.109', 'A-');
|
| 180 |
+
insert into Enrolled_in values ( 1017, '600.461', 'A');
|
| 181 |
+
insert into Enrolled_in values ( 1017, '600.465', 'C');
|
| 182 |
+
insert into Enrolled_in values ( 1018, '520.213', 'A-');
|
| 183 |
+
insert into Enrolled_in values ( 1018, '600.211', 'A');
|
| 184 |
+
insert into Enrolled_in values ( 1018, '600.303', 'A');
|
| 185 |
+
insert into Enrolled_in values ( 1018, '600.337', 'C-');
|
| 186 |
+
insert into Enrolled_in values ( 1018, '600.463', 'B');
|
| 187 |
+
insert into Enrolled_in values ( 1018, '600.465', 'B');
|
| 188 |
+
insert into Enrolled_in values ( 1019, '600.103', 'B');
|
| 189 |
+
insert into Enrolled_in values ( 1019, '600.107', 'B');
|
| 190 |
+
insert into Enrolled_in values ( 1019, '600.113', 'D+');
|
| 191 |
+
insert into Enrolled_in values ( 1019, '600.227', 'A');
|
| 192 |
+
insert into Enrolled_in values ( 1019, '600.303', 'A');
|
| 193 |
+
insert into Enrolled_in values ( 1020, '600.333', 'A');
|
| 194 |
+
insert into Enrolled_in values ( 1020, '600.337', 'A');
|
| 195 |
+
insert into Enrolled_in values ( 1020, '600.415', 'A');
|
| 196 |
+
insert into Enrolled_in values ( 1020, '600.461', 'A');
|
| 197 |
+
insert into Enrolled_in values ( 1020, '600.465', 'A');
|
| 198 |
+
insert into Enrolled_in values ( 1021, '600.303', 'B-');
|
| 199 |
+
insert into Enrolled_in values ( 1021, '600.303', 'B');
|
| 200 |
+
insert into Enrolled_in values ( 1021, '600.415', 'B');
|
| 201 |
+
insert into Enrolled_in values ( 1021, '600.437', 'B');
|
| 202 |
+
insert into Enrolled_in values ( 1021, '600.437', 'B');
|
| 203 |
+
insert into Enrolled_in values ( 1021, '600.445', 'B-');
|
| 204 |
+
insert into Enrolled_in values ( 1021, '600.445', 'C');
|
| 205 |
+
insert into Enrolled_in values ( 1021, '600.463', 'A');
|
| 206 |
+
insert into Enrolled_in values ( 1021, '600.463', 'B');
|
| 207 |
+
insert into Enrolled_in values ( 1022, '550.420', 'B');
|
| 208 |
+
insert into Enrolled_in values ( 1022, '550.420', 'B+');
|
| 209 |
+
insert into Enrolled_in values ( 1022, '600.107', 'A');
|
| 210 |
+
insert into Enrolled_in values ( 1022, '600.227', 'A');
|
| 211 |
+
insert into Enrolled_in values ( 1022, '600.227', 'A');
|
| 212 |
+
insert into Enrolled_in values ( 1022, '600.232', 'B');
|
| 213 |
+
insert into Enrolled_in values ( 1022, '600.303', 'B');
|
| 214 |
+
insert into Enrolled_in values ( 1022, '600.315', 'D');
|
| 215 |
+
insert into Enrolled_in values ( 1022, '600.461', 'A');
|
| 216 |
+
insert into Enrolled_in values ( 1023, '600.113', 'A-');
|
| 217 |
+
insert into Enrolled_in values ( 1023, '600.315', 'B');
|
| 218 |
+
insert into Enrolled_in values ( 1023, '600.333', 'B');
|
| 219 |
+
insert into Enrolled_in values ( 1023, '600.337', 'B+');
|
| 220 |
+
insert into Enrolled_in values ( 1023, '600.463', 'A');
|
| 221 |
+
insert into Enrolled_in values ( 1023, '600.465', 'A');
|
| 222 |
+
insert into Enrolled_in values ( 1023, '600.657', 'B');
|
| 223 |
+
insert into Enrolled_in values ( 1023, '600.787', 'B');
|
| 224 |
+
insert into Enrolled_in values ( 1024, '550.291', 'B');
|
| 225 |
+
insert into Enrolled_in values ( 1024, '550.413', 'C');
|
| 226 |
+
insert into Enrolled_in values ( 1024, '550.471', 'A-');
|
| 227 |
+
insert into Enrolled_in values ( 1024, '550.620', 'A');
|
| 228 |
+
insert into Enrolled_in values ( 1024, '550.626', 'B');
|
| 229 |
+
insert into Enrolled_in values ( 1024, '550.671', 'B');
|
| 230 |
+
insert into Enrolled_in values ( 1024, '550.681', 'B');
|
| 231 |
+
insert into Enrolled_in values ( 1024, '600.415', 'B');
|
| 232 |
+
insert into Enrolled_in values ( 1025, '520.213', 'A');
|
| 233 |
+
insert into Enrolled_in values ( 1025, '520.345', 'A+');
|
| 234 |
+
insert into Enrolled_in values ( 1025, '550.310', 'A');
|
| 235 |
+
insert into Enrolled_in values ( 1025, '550.413', 'A');
|
| 236 |
+
insert into Enrolled_in values ( 1025, '550.420', 'C');
|
| 237 |
+
insert into Enrolled_in values ( 1025, '550.471', 'B');
|
| 238 |
+
insert into Enrolled_in values ( 1025, '600.107', 'B');
|
| 239 |
+
insert into Enrolled_in values ( 1026, '520.349', 'A');
|
| 240 |
+
insert into Enrolled_in values ( 1026, '520.353', 'A');
|
| 241 |
+
insert into Enrolled_in values ( 1026, '600.303', 'A');
|
| 242 |
+
insert into Enrolled_in values ( 1026, '600.437', 'A');
|
| 243 |
+
insert into Enrolled_in values ( 1026, '600.445', 'A');
|
| 244 |
+
insert into Enrolled_in values ( 1026, '600.463', 'B-');
|
| 245 |
+
insert into Enrolled_in values ( 1027, '600.107', 'B');
|
| 246 |
+
insert into Enrolled_in values ( 1027, '600.227', 'B');
|
| 247 |
+
insert into Enrolled_in values ( 1027, '600.232', 'B');
|
| 248 |
+
insert into Enrolled_in values ( 1027, '600.303', 'B');
|
| 249 |
+
insert into Enrolled_in values ( 1027, '600.315', 'B-');
|
| 250 |
+
insert into Enrolled_in values ( 1027, '600.461', 'B-');
|
| 251 |
+
insert into Enrolled_in values ( 1027, '600.463', 'B');
|
| 252 |
+
insert into Enrolled_in values ( 1028, '550.420', 'B+');
|
| 253 |
+
insert into Enrolled_in values ( 1028, '600.227', 'A');
|
| 254 |
+
insert into Enrolled_in values ( 1028, '600.315', 'A+');
|
| 255 |
+
insert into Enrolled_in values ( 1028, '600.333', 'A');
|
| 256 |
+
insert into Enrolled_in values ( 1028, '600.337', 'A+');
|
| 257 |
+
insert into Enrolled_in values ( 1029, '550.413', 'C-');
|
| 258 |
+
insert into Enrolled_in values ( 1029, '550.471', 'A');
|
| 259 |
+
insert into Enrolled_in values ( 1029, '550.620', 'B-');
|
| 260 |
+
insert into Enrolled_in values ( 1029, '550.671', 'A-');
|
| 261 |
+
insert into Enrolled_in values ( 1029, '600.113', 'B-');
|
| 262 |
+
insert into Enrolled_in values ( 1029, '600.463', 'A+');
|
| 263 |
+
insert into Enrolled_in values ( 1030, '520.345', 'B');
|
| 264 |
+
insert into Enrolled_in values ( 1030, '550.291', 'B');
|
| 265 |
+
insert into Enrolled_in values ( 1030, '550.310', 'B-');
|
| 266 |
+
insert into Enrolled_in values ( 1030, '550.413', 'B-');
|
| 267 |
+
insert into Enrolled_in values ( 1030, '550.420', 'B');
|
| 268 |
+
insert into Enrolled_in values ( 1030, '550.471', 'B+');
|
| 269 |
+
insert into Enrolled_in values ( 1030, '600.107', 'B');
|
| 270 |
+
insert into Enrolled_in values ( 1031, '520.213', 'B+');
|
| 271 |
+
insert into Enrolled_in values ( 1031, '520.349', 'B');
|
| 272 |
+
insert into Enrolled_in values ( 1031, '520.353', 'C');
|
| 273 |
+
insert into Enrolled_in values ( 1031, '600.437', 'A+');
|
| 274 |
+
insert into Enrolled_in values ( 1032, '550.420', 'A-');
|
| 275 |
+
insert into Enrolled_in values ( 1032, '550.420', 'D-');
|
| 276 |
+
insert into Enrolled_in values ( 1032, '600.232', 'A-');
|
| 277 |
+
insert into Enrolled_in values ( 1032, '600.303', 'A');
|
| 278 |
+
insert into Enrolled_in values ( 1032, '600.315', 'A');
|
| 279 |
+
insert into Enrolled_in values ( 1033, '600.113', 'A');
|
| 280 |
+
insert into Enrolled_in values ( 1033, '600.227', 'A');
|
| 281 |
+
insert into Enrolled_in values ( 1033, '600.315', 'A');
|
| 282 |
+
insert into Enrolled_in values ( 1033, '600.333', 'A');
|
| 283 |
+
insert into Enrolled_in values ( 1033, '600.337', 'B');
|
| 284 |
+
insert into Enrolled_in values ( 1034, '050.109', 'B+');
|
| 285 |
+
insert into Enrolled_in values ( 1034, '050.203', 'B');
|
| 286 |
+
insert into Enrolled_in values ( 1034, '050.325', 'B');
|
| 287 |
+
insert into Enrolled_in values ( 1034, '600.107', 'B+');
|
| 288 |
+
insert into Enrolled_in values ( 1034, '600.315', 'B');
|
| 289 |
+
insert into Enrolled_in values ( 1035, '050.381', 'B-');
|
| 290 |
+
insert into Enrolled_in values ( 1035, '050.427', 'A-');
|
| 291 |
+
insert into Enrolled_in values ( 1035, '050.670', 'B');
|
| 292 |
+
insert into Enrolled_in values ( 1035, '050.802', 'D');
|
| 293 |
+
insert into Enrolled_in values ( 1035, '050.821', 'A');
|
| 294 |
+
insert into Enrolled_in values ( 1035, '600.109', 'B-');
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
insert into Gradeconversion values ('A+', 4.0);
|
| 298 |
+
insert into Gradeconversion values ('A', 4.0);
|
| 299 |
+
insert into Gradeconversion values ('A-', 3.7);
|
| 300 |
+
insert into Gradeconversion values ('B+', 3.3);
|
| 301 |
+
insert into Gradeconversion values ('B', 3.0);
|
| 302 |
+
insert into Gradeconversion values ('B-', 2.7);
|
| 303 |
+
insert into Gradeconversion values ('C+', 2.3);
|
| 304 |
+
insert into Gradeconversion values ('C', 2.0);
|
| 305 |
+
insert into Gradeconversion values ('C-', 1.7);
|
| 306 |
+
insert into Gradeconversion values ('D+', 1.3);
|
| 307 |
+
insert into Gradeconversion values ('D', 1.0);
|
| 308 |
+
insert into Gradeconversion values ('D-', 0.7);
|
| 309 |
+
insert into Gradeconversion values ('F', 0.0);
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
insert into Faculty values ( 1082, 'Giuliano', 'Mark', 'Instructor', 'M', 2424, '224', 'NEB');
|
| 313 |
+
insert into Faculty values ( 1121, 'Goodrich', 'Michael', 'Professor', 'M', 3593, '219', 'NEB');
|
| 314 |
+
insert into Faculty values ( 1148, 'Masson', 'Gerald', 'Professor', 'M', 3402, '224B', 'NEB');
|
| 315 |
+
insert into Faculty values ( 1193, 'Jones', 'Stacey', 'Instructor', 'F', 3550, '224', 'NEB');
|
| 316 |
+
insert into Faculty values ( 2192, 'Yarowsky', 'David', 'AsstProf', 'M', 6587, '324', 'NEB');
|
| 317 |
+
insert into Faculty values ( 3457, 'Smith', 'Scott', 'AssocProf', 'M', 1035, '318', 'NEB');
|
| 318 |
+
insert into Faculty values ( 4230, 'Houlahan', 'Joanne', 'Instructor', 'F', 1260, '328', 'NEB');
|
| 319 |
+
insert into Faculty values ( 6112, 'Beach', 'Louis', 'Instructor', 'M', 1838, '207', 'NEB');
|
| 320 |
+
insert into Faculty values ( 7712, 'Awerbuch', 'Baruch', 'Professor', 'M', 2105, '220', 'NEB');
|
| 321 |
+
insert into Faculty values ( 7792, 'Brill', 'Eric', 'AsstProf', 'M', 2303, '324B', 'NEB');
|
| 322 |
+
insert into Faculty values ( 7723, 'Taylor', 'Russell', 'Professor', 'M', 2435, '317', 'NEB');
|
| 323 |
+
insert into Faculty values ( 8114, 'Angelopoulou', 'Ellie', 'Instructor', 'F', 2152, '316', 'NEB');
|
| 324 |
+
insert into Faculty values ( 8423, 'Kumar', 'Subodh', 'AsstProf', 'M', 2522, '218', 'NEB');
|
| 325 |
+
insert into Faculty values ( 8721, 'Wolff', 'Lawrence', 'AssocProf', 'M', 2342, '316', 'NEB');
|
| 326 |
+
insert into Faculty values ( 8741, 'Salzberg', 'Steven', 'AssocProf', 'M', 2641, '324A', 'NEB');
|
| 327 |
+
insert into Faculty values ( 8918, 'Amir', 'Yair', 'AsstProf', 'M', 2672, '308', 'NEB');
|
| 328 |
+
insert into Faculty values ( 9172, 'Kosaraju', 'Rao', 'Professor', 'M', 2757, '319', 'NEB');
|
| 329 |
+
insert into Faculty values ( 9826, 'Delcher', 'Arthur', 'Instructor', 'M', 2956, '329', 'NEB');
|
| 330 |
+
insert into Faculty values ( 1172, 'Runolfsson', 'Thordur', 'AssocProf', 'M', 3121, '119', 'Barton');
|
| 331 |
+
insert into Faculty values ( 1177, 'Naiman', 'Daniel', 'Professor', 'M', 3571, '288', 'Krieger');
|
| 332 |
+
insert into Faculty values ( 1823, 'Davidson', 'Frederic', 'Professor', 'M', 5629, '119', 'Barton');
|
| 333 |
+
insert into Faculty values ( 2028, 'Brody', 'William', 'Professor', 'M', 6073, '119', 'Barton');
|
| 334 |
+
insert into Faculty values ( 2119, 'Meyer', 'Gerard', 'Professor', 'M', 6350, '119', 'Barton');
|
| 335 |
+
insert into Faculty values ( 2291, 'Scheinerman', 'Edward', 'Professor', 'M', 6654, '288', 'Krieger');
|
| 336 |
+
insert into Faculty values ( 2311, 'Priebe', 'Carey', 'AsstProf', 'M', 6953, '288', 'Krieger');
|
| 337 |
+
insert into Faculty values ( 2738, 'Fill', 'James', 'Professor', 'M', 8209, '288', 'Krieger');
|
| 338 |
+
insert into Faculty values ( 2881, 'Goldman', 'Alan', 'Professor', 'M', 8335, '288', 'Krieger');
|
| 339 |
+
insert into Faculty values ( 4432, 'Burzio', 'Luigi', 'Professor', 'M', 1813, '288', 'Krieger');
|
| 340 |
+
insert into Faculty values ( 5718, 'Frank', 'Robert', 'AsstProf', 'M', 1751, '288', 'Krieger');
|
| 341 |
+
insert into Faculty values ( 6182, 'Cheng', 'Cheng', 'AsstProf', 'M', 1856, '288', 'Krieger');
|
| 342 |
+
insert into Faculty values ( 6191, 'Kaplan', 'Alexander', 'Professor', 'M', 1825, '119', 'Barton');
|
| 343 |
+
insert into Faculty values ( 6330, 'Byrne', 'William', 'Instructor', 'M', 1691, '119', 'Barton');
|
| 344 |
+
insert into Faculty values ( 6541, 'Han', 'Shih-Ping', 'Professor', 'M', 1914, '288', 'Krieger');
|
| 345 |
+
insert into Faculty values ( 6910, 'Smolensky', 'Paul', 'Professor', 'M', 2072, '288', 'Krieger');
|
| 346 |
+
insert into Faculty values ( 6925, 'Iglesias', 'Pablo', 'AsstProf', 'M', 2021, '119', 'Barton');
|
| 347 |
+
insert into Faculty values ( 7134, 'Goutsias', 'John', 'Professor', 'M', 2184, '119', 'Barton');
|
| 348 |
+
insert into Faculty values ( 7231, 'Rugh', 'Wilson', 'Professor', 'M', 2191, '119', 'Barton');
|
| 349 |
+
insert into Faculty values ( 7271, 'Jelinek', 'Frederick', 'Professor', 'M', 2890, '119', 'Barton');
|
| 350 |
+
insert into Faculty values ( 7506, 'Westgate', 'Charles', 'Professor', 'M', 2932, '119', 'Barton');
|
| 351 |
+
insert into Faculty values ( 8102, 'James', 'Lancelot', 'AsstProf', 'M', 2792, '288', 'Krieger');
|
| 352 |
+
insert into Faculty values ( 8118, 'Weinert', 'Howard', 'Professor', 'M', 3272, '119', 'Barton');
|
| 353 |
+
insert into Faculty values ( 8122, 'Wierman', 'John', 'Professor', 'M', 3392,'288', 'Krieger');
|
| 354 |
+
insert into Faculty values ( 8722, 'Cauwenberghs', 'Gert', 'AsstProf', 'M', 1372, '119', 'Barton');
|
| 355 |
+
insert into Faculty values ( 8723, 'Andreou', 'Andreas', 'Professor', 'M', 1402, '119', 'Barton');
|
| 356 |
+
insert into Faculty values ( 8772, 'Cowen', 'Lenore', 'AsstProf', 'F', 2870, '288', 'Krieger');
|
| 357 |
+
insert into Faculty values ( 8791, 'McCloskey', 'Michael', 'Professor', 'M', 3440, '288', 'Krieger');
|
| 358 |
+
insert into Faculty values ( 8989, 'Brent', 'Michael', 'AsstProf', 'M', 9373, '288', 'Krieger');
|
| 359 |
+
insert into Faculty values ( 9011, 'Rapp', 'Brenda', 'AsstProf', 'F', 2032, '288', 'Krieger');
|
| 360 |
+
insert into Faculty values ( 9191, 'Collins', 'Oliver', 'AssocProf', 'M', 5427, '119', 'Barton');
|
| 361 |
+
insert into Faculty values ( 9199, 'Hughes', 'Brian', 'AssocProf', 'M', 5666, '119', 'Barton');
|
| 362 |
+
insert into Faculty values ( 9210, 'Joseph', 'Richard', 'Professor', 'M', 5996, '119', 'Barton');
|
| 363 |
+
insert into Faculty values ( 9514, 'Prince', 'Jerry', 'AssocProf', 'M', 5106, '119', 'Barton');
|
| 364 |
+
insert into Faculty values ( 9823, 'Pang', 'Jong-Shi', 'Professor', 'M', 4366, '288', 'Krieger');
|
| 365 |
+
insert into Faculty values ( 9824, 'Glaser', 'Robert', 'Instructor', 'M', 4396, '119', 'Barton');
|
| 366 |
+
insert into Faculty values ( 9811, 'Wu', 'Colin', 'AsstProf', 'M', 2906, '288', 'Krieger');
|
| 367 |
+
insert into Faculty values ( 9643, 'Legendre', 'Geraldine', 'AssocProf', 'F', 8972, '288', 'Krieger');
|
| 368 |
+
insert into Faculty values ( 9379, 'Khurgin', 'Jacob', 'Professor', 'M', 1060, '119', 'Barton');
|
| 369 |
+
insert into Faculty values ( 9922, 'Hall', 'Leslie', 'AsstProf', 'F', 7332, '288', 'Krieger');
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
insert into Department values ( 010, 'AS', 'History of Art', '268', 'Mergenthaler', 7117);
|
| 373 |
+
insert into Department values ( 020, 'AS', 'Biology', '144', 'Mudd', 7330);
|
| 374 |
+
insert into Department values ( 030, 'AS', 'Chemistry', '113', 'Remsen', 7429);
|
| 375 |
+
insert into Department values ( 040, 'AS', 'Classics', '121', 'Gilman', 7556);
|
| 376 |
+
insert into Department values ( 050, 'AS', 'Cognitive Science', '381', 'Krieger', 7119);
|
| 377 |
+
insert into Department values ( 060, 'AS', 'English', '146', 'Gilman', 7544);
|
| 378 |
+
insert into Department values ( 070, 'AS', 'Anthropology', '404B', 'Macaulay', 7272);
|
| 379 |
+
insert into Department values ( 090, 'AS', 'German', '245', 'Gilman', 7508);
|
| 380 |
+
insert into Department values ( 100, 'AS', 'History', '312', 'Gilman', 7575);
|
| 381 |
+
insert into Department values ( 110, 'AS', 'Mathematics', '404', 'Krieger', 7399);
|
| 382 |
+
insert into Department values ( 130, 'AS', 'Near Eastern Studies', '128', 'Gilman', 7499);
|
| 383 |
+
insert into Department values ( 140, 'AS', 'History of Science', '234', 'Gilman', 7501);
|
| 384 |
+
insert into Department values ( 150, 'AS', 'Philosophy', '347', 'Gilman', 7524);
|
| 385 |
+
insert into Department values ( 170, 'AS', 'Physics and Astronomy', '366', 'Bloomberg', 7347);
|
| 386 |
+
insert into Department values ( 180, 'AS', 'Economics', '440', 'Mergenthaler', 7601);
|
| 387 |
+
insert into Department values ( 190, 'AS', 'Political Science', '338', 'Mergenthaler', 7540);
|
| 388 |
+
insert into Department values ( 200, 'AS', 'Psychology', '223', 'Ames', 7055);
|
| 389 |
+
insert into Department values ( 340, 'AS', 'French', '225', 'Gilman', 7227);
|
| 390 |
+
insert into Department values ( 350, 'AS', 'Hispanic/Italian Studies', '221', 'Gilman', 7226);
|
| 391 |
+
insert into Department values ( 520, 'EN', 'ECE', '105', 'Barton', 7033);
|
| 392 |
+
insert into Department values ( 530, 'EN', 'Mechanical Engineering', '122', 'Latrobe', 7132);
|
| 393 |
+
insert into Department values ( 540, 'EN', 'Chemical Engineering', '24', 'NEB', 7170);
|
| 394 |
+
insert into Department values ( 550, 'EN', 'Mathematical Sciences', '221', 'Maryland', 7195);
|
| 395 |
+
insert into Department values ( 560, 'EN', 'Civil Engineering', '206', 'Latrobe', 8680);
|
| 396 |
+
insert into Department values ( 580, 'EN', 'Biomedical Engineering', '144', 'NEB', 8482);
|
| 397 |
+
insert into Department values ( 600, 'EN', 'Computer Science', '224', 'NEB', 8577);
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
insert into Member_of values (7792, 600, 'Primary');
|
| 401 |
+
insert into Member_of values (9210, 520, 'Primary');
|
| 402 |
+
insert into Member_of values (9811, 550, 'Primary');
|
| 403 |
+
insert into Member_of values (9643, 050, 'Primary');
|
| 404 |
+
insert into Member_of values (9379, 520, 'Primary');
|
| 405 |
+
insert into Member_of values (8918, 600, 'Primary');
|
| 406 |
+
insert into Member_of values (7712, 600, 'Primary');
|
| 407 |
+
insert into Member_of values (1121, 600, 'Primary');
|
| 408 |
+
insert into Member_of values (9172, 600, 'Primary');
|
| 409 |
+
insert into Member_of values (8423, 600, 'Primary');
|
| 410 |
+
insert into Member_of values (1148, 600, 'Primary');
|
| 411 |
+
insert into Member_of values (8741, 600, 'Primary');
|
| 412 |
+
insert into Member_of values (3457, 600, 'Primary');
|
| 413 |
+
insert into Member_of values (7723, 600, 'Primary');
|
| 414 |
+
insert into Member_of values (8721, 600, 'Primary');
|
| 415 |
+
insert into Member_of values (2192, 600, 'Primary');
|
| 416 |
+
insert into Member_of values (8114, 600, 'Primary');
|
| 417 |
+
insert into Member_of values (6112, 600, 'Primary');
|
| 418 |
+
insert into Member_of values (9826, 600, 'Primary');
|
| 419 |
+
insert into Member_of values (1193, 600, 'Primary');
|
| 420 |
+
insert into Member_of values (1082, 600, 'Primary');
|
| 421 |
+
insert into Member_of values (4230, 600, 'Primary');
|
| 422 |
+
insert into Member_of values (8989, 600, 'Secondary');
|
| 423 |
+
insert into Member_of values (7271, 600, 'Secondary');
|
| 424 |
+
insert into Member_of values (8721, 520, 'Secondary');
|
| 425 |
+
insert into Member_of values (8741, 050, 'Secondary');
|
| 426 |
+
insert into Member_of values (7271, 050, 'Secondary');
|
| 427 |
+
insert into Member_of values (6182, 550, 'Primary');
|
| 428 |
+
insert into Member_of values (8772, 550, 'Primary');
|
| 429 |
+
insert into Member_of values (2738, 550, 'Primary');
|
| 430 |
+
insert into Member_of values (2881, 550, 'Primary');
|
| 431 |
+
insert into Member_of values (9922, 550, 'Primary');
|
| 432 |
+
insert into Member_of values (6541, 550, 'Primary');
|
| 433 |
+
insert into Member_of values (8102, 550, 'Primary');
|
| 434 |
+
insert into Member_of values (1177, 550, 'Primary');
|
| 435 |
+
insert into Member_of values (9823, 550, 'Primary');
|
| 436 |
+
insert into Member_of values (2311, 550, 'Primary');
|
| 437 |
+
insert into Member_of values (2291, 550, 'Primary');
|
| 438 |
+
insert into Member_of values (8122, 550, 'Primary');
|
| 439 |
+
insert into Member_of values (8989, 050, 'Primary');
|
| 440 |
+
insert into Member_of values (4432, 050, 'Primary');
|
| 441 |
+
insert into Member_of values (5718, 050, 'Primary');
|
| 442 |
+
insert into Member_of values (8791, 050, 'Primary');
|
| 443 |
+
insert into Member_of values (9011, 050, 'Primary');
|
| 444 |
+
insert into Member_of values (6910, 050, 'Primary');
|
| 445 |
+
insert into Member_of values (8723, 520, 'Primary');
|
| 446 |
+
insert into Member_of values (2028, 520, 'Primary');
|
| 447 |
+
insert into Member_of values (8722, 520, 'Primary');
|
| 448 |
+
insert into Member_of values (9191, 520, 'Primary');
|
| 449 |
+
insert into Member_of values (1823, 520, 'Primary');
|
| 450 |
+
insert into Member_of values (7134, 520, 'Primary');
|
| 451 |
+
insert into Member_of values (9199, 520, 'Primary');
|
| 452 |
+
insert into Member_of values (6925, 520, 'Primary');
|
| 453 |
+
insert into Member_of values (7271, 520, 'Primary');
|
| 454 |
+
insert into Member_of values (6191, 520, 'Primary');
|
| 455 |
+
insert into Member_of values (2119, 520, 'Primary');
|
| 456 |
+
insert into Member_of values (9514, 520, 'Primary');
|
| 457 |
+
insert into Member_of values (7231, 520, 'Primary');
|
| 458 |
+
insert into Member_of values (1172, 520, 'Primary');
|
| 459 |
+
insert into Member_of values (8118, 520, 'Primary');
|
| 460 |
+
insert into Member_of values (7506, 520, 'Primary');
|
| 461 |
+
insert into Member_of values (6330, 520, 'Primary');
|
| 462 |
+
insert into Member_of values (9824, 520, 'Primary');
|
| 463 |
+
|
| 464 |
+
|
| 465 |
+
insert into Course values ( '600.101', 'COMPUTER LITERACY', 3, 6112, 'MTW', '3',600);
|
| 466 |
+
insert into Course values ( '600.103', 'INTRODUCTION TO COMPUTER SCIENCE', 1, 4230, 'Th', '4',600);
|
| 467 |
+
insert into Course values ( '600.107', 'INTRO TO PROGRAMMING IN JAVA', 3, 1193, 'MTW', '3',600);
|
| 468 |
+
insert into Course values ( '600.109', 'INTRO TO PROGRAMMING IN C/C++', 3, 4230, 'MTW', '12',600);
|
| 469 |
+
insert into Course values ( '600.113', 'EXPLORING THE INTERNET', 3, 6112, 'MTW', '4',600);
|
| 470 |
+
insert into Course values ( '600.121', 'JAVA PROGRAMMING', 3, 6112, 'ThF', '10:30-12',600);
|
| 471 |
+
insert into Course values ( '600.211', 'UNIX SYSTEMS PROGRAMMING', 3, 6112, 'ThF', '1-2:15',600);
|
| 472 |
+
insert into Course values ( '600.227', 'DATA STRUCTURES in JAVA', 3, 1121, 'MTW', '9',600);
|
| 473 |
+
insert into Course values ( '600.232', 'MULTIMEDIA COMPUTING', 3, 9826, 'MW', '1-2:30',600);
|
| 474 |
+
insert into Course values ( '600.271', 'COMPUTATIONAL MODELS', 3, 9172, 'MTW', '1',600);
|
| 475 |
+
insert into Course values ( '600.303', 'SUPERCOMPUTING', 1, 9826, 'W', '4-6:20',600);
|
| 476 |
+
insert into Course values ( '600.315', 'DATABASE SYSTEMS', 3, 2192, 'ThF', '2:30-4',600);
|
| 477 |
+
insert into Course values ( '600.333', 'COMPUTER SYSTEM FUNDAMENTALS', 3, 1148, 'MTW', '8',600);
|
| 478 |
+
insert into Course values ( '600.337', 'DISTRIBUTED SYSTEMS', 3, 8918, 'M', '3',600);
|
| 479 |
+
insert into Course values ( '600.363', 'INTRODUCTION TO ALGORITHMS', 3, 7712, 'MTW', '9',600);
|
| 480 |
+
insert into Course values ( '600.415', 'DATABASE SYSTEMS', 3, 2192, 'ThF', '2:30-4',600);
|
| 481 |
+
insert into Course values ( '600.433', 'COMPUTER SYSTEMS', 3, 1148, 'MTW', '8',600);
|
| 482 |
+
insert into Course values ( '600.437', 'DISTRIBUTED SYSTEMS', 3, 8918, 'M', '3',600);
|
| 483 |
+
insert into Course values ( '600.445', 'QUANTITATIVE MEDICAL COMPUTING', 3, 7723, 'ThF', '1-2:15',600);
|
| 484 |
+
insert into Course values ( '600.461', 'COMPUTER VISION', 3, 8114, 'MTW', '1',600);
|
| 485 |
+
insert into Course values ( '600.463', 'ALGORITHMS I', 3, 7712, 'MTW', '9',600);
|
| 486 |
+
insert into Course values ( '600.465', 'INTRO TO NATURAL LANGUAGE PROCESSING', 3, 7792, 'MTW', '2',600);
|
| 487 |
+
insert into Course values ( '600.509', 'COMPUTER SCIENCE INTERNSHIP', 3, 1121, 'M', '1',600);
|
| 488 |
+
insert into Course values ( '600.601', 'COMPUTER SCIENCE SEMINAR', 1, 6191, 'ThF', '10:30-12',600);
|
| 489 |
+
insert into Course values ( '600.657', 'HIGH PERFORMANCE GRAPHICS AND MODELING', 3, 8423, 'M', '4-5:30',600);
|
| 490 |
+
insert into Course values ( '600.787', 'SEMINAR ON COMPUTATIONAL GEOMETRY', 3, 1121, 'Th', '2',600);
|
| 491 |
+
insert into Course values ( '550.111', 'STATISTICAL ANALYSIS', 4, 2311, 'MTW', '12',550);
|
| 492 |
+
insert into Course values ( '550.171', 'DISCRETE MATHEMATICS', 4, 8772, 'MTW', '11',550);
|
| 493 |
+
insert into Course values ( '500.203', 'ACCOUNTING I', 3, 9823, 'T', '6:15-8:45',550);
|
| 494 |
+
insert into Course values ( '500.204', 'ACCOUNTING II', 3, 9823, 'Th', '6:15-8:45',550);
|
| 495 |
+
insert into Course values ( '500.205', 'BUSINESS LAW I', 3, 8791, 'W', '6:15-8:45',550);
|
| 496 |
+
insert into Course values ( '500.206', 'BUSINESS LAW II', 3, 8791, 'M', '6:15-8:45',550);
|
| 497 |
+
insert into Course values ( '550.291', 'LINEAR ALGEBRA AND DIFFERENTIAL EQNS', 4, 6541, 'MTW', '9',550);
|
| 498 |
+
insert into Course values ( '550.310', 'PROBABILITY AND STATISTICS', 4, 8102, 'MTW', '10',550);
|
| 499 |
+
insert into Course values ( '550.361', 'INTRODUCTION TO OPTIMIZATION', 4, 2881, 'MTW', '2',550);
|
| 500 |
+
insert into Course values ( '550.413', 'APPLIED STATISTICS AND DATA ANALYSIS', 4, 1177, 'MTW', '11',550);
|
| 501 |
+
insert into Course values ( '550.420', 'INTRODUCTION TO PROBABILITY', 4, 2738, 'MTW', '1',550);
|
| 502 |
+
insert into Course values ( '550.471', 'COMBINATORIAL ANALYSIS', 4, 8772, 'MTW', '12',550);
|
| 503 |
+
insert into Course values ( '550.620', 'PROBABILITY THEORY I', 3, 2738, 'MTW', '2',550);
|
| 504 |
+
insert into Course values ( '550.626', 'STOCHASTIC PROCESSES II', 3, 8102, 'MTW', '1',550);
|
| 505 |
+
insert into Course values ( '550.631', 'STATISTICAL INFERENCE', 3, 6182, 'MTW', '3',550);
|
| 506 |
+
insert into Course values ( '550.661', 'FOUNDATIONS OF OPTIMIZATION', 3, 9823, 'MTW', '10',550);
|
| 507 |
+
insert into Course values ( '550.671', 'COMBINATORIAL ANALYSIS', 3, 8772, 'MTW', '12',550);
|
| 508 |
+
insert into Course values ( '550.681', 'NUMERICAL ANALYSIS', 3, 6541, 'MTW', '11',550);
|
| 509 |
+
insert into Course values ( '550.721', 'PERCOLATION THEORY', 3, 8122, 'MTW', '9',550);
|
| 510 |
+
insert into Course values ( '550.750', 'TOPICS IN OPERATIONS RESEARCH', 3, 9922, 'MW', '3-4:30',550);
|
| 511 |
+
insert into Course values ( '550.790', 'TOPICS IN APPLIED MATH', 2, 2881, 'MT', '4:30-6',550);
|
| 512 |
+
insert into Course values ( '520.137', 'INTRODUCTION TO ECE', 3, 8723, 'MTW', '11',520);
|
| 513 |
+
insert into Course values ( '520.213', 'CIRCUITS', 4, 9210, 'MTW', '2',520);
|
| 514 |
+
insert into Course values ( '520.219', 'FIELDS, MATTER AND WAVES', 3, 9210, 'MTW', '3',520);
|
| 515 |
+
insert into Course values ( '520.325', 'INTEGRATED ELECTRONICS', 3, 6191, 'MTW', '3',520);
|
| 516 |
+
insert into Course values ( '520.345', 'ECE LABORATORY', 3, 1823, 'W', '2',520);
|
| 517 |
+
insert into Course values ( '520.349', 'MICROPROCESSOR LAB I', 3, 9824, 'Th', '8',520);
|
| 518 |
+
insert into Course values ( '520.353', 'CONTROL SYSTEMS', 3, 6925, 'MTW', '10',520);
|
| 519 |
+
insert into Course values ( '520.401', 'BASIC COMMUNICATIONS', 3, 6191, 'MTW', '1',520);
|
| 520 |
+
insert into Course values ( '520.410', 'FIBER OPTICS AND PHOTONICS', 3, 6191, 'MTW', '1',520);
|
| 521 |
+
insert into Course values ( '520.419', 'ITERATIVE ALGORITHMS', 3, 2119, 'MT', '4-5:15',520);
|
| 522 |
+
insert into Course values ( '520.421', 'INTRODUCTION TO NON-LINEAR SYSTEMS', 3, 7231, 'MTW', '9',520);
|
| 523 |
+
insert into Course values ( '520.432', 'TOPICS IN MEDICAL IMAGING SYSTEMS', 3, 9514, 'TTh', '8:30-10',520);
|
| 524 |
+
insert into Course values ( '520.435', 'DIGITAL SIGNAL PROCESSING', 4, 8118, 'MTW', '11',520);
|
| 525 |
+
insert into Course values ( '520.475', 'PROCESSING AND RECOGNITION OF SPEECH', 3, 6330, 'TW', '2-3:30',520);
|
| 526 |
+
insert into Course values ( '520.490', 'ANALOG AND DIGITAL VLSI SYSTEMS', 3, 8722, 'ThF', '10:30-12',520);
|
| 527 |
+
insert into Course values ( '520.603', 'ELECTROMAGNETIC WAVES', 4, 9210, 'Th', '1-4:30',520);
|
| 528 |
+
insert into Course values ( '520.605', 'SOLID STATE PHYSICS', 3, 9379, 'Tu', '1-4',520);
|
| 529 |
+
insert into Course values ( '520.609', 'NONLINEAR TECHNICAL IMAGE PROCESSING', 3, 7134, 'Th', '1-4',520);
|
| 530 |
+
insert into Course values ( '520.651', 'RANDOM SIGNAL ANALYSIS', 3, 9514, 'ThF', '10:30-12',520);
|
| 531 |
+
insert into Course values ( '050.102', 'LANGUAGE AND MIND', 3, 4432, 'MTW', '10',050);
|
| 532 |
+
insert into Course values ( '050.109', 'MIND, BRAIN, COMPUTERS', 3, 6910, 'MW', '2-3:15',050);
|
| 533 |
+
insert into Course values ( '050.203', 'COGNITIVE NEUROSCIENCE', 4, 9011, 'MT', '3:30-4:45',050);
|
| 534 |
+
insert into Course values ( '050.325', 'SOUND STRUCTURES IN NATURAL LANGUAGE', 3, 4432, 'T', '10-12',050);
|
| 535 |
+
insert into Course values ( '050.370', 'FORMAL METHODS IN COGNITIVE SCIENCE', 3, 6910, 'MW', '11:30',050);
|
| 536 |
+
insert into Course values ( '050.381', 'LANGUAGE DEVELOPMENT', 3, 8989, 'T', '1-3',050);
|
| 537 |
+
insert into Course values ( '050.427', 'THE HISTORY OF ROMANCE LANGUAGES', 3, 4432, 'W', '1-3',050);
|
| 538 |
+
insert into Course values ( '050.670', 'FORMAL METHODS IN COGNITIVE SCIENCE', 3, 4432, 'MW', '11:30-12:45',050);
|
| 539 |
+
insert into Course values ( '050.802', 'RESEARCH SEMINAR IN COGNITIVE PROCESSES', 1, 9011, 'W', '1-3',050);
|
| 540 |
+
insert into Course values ( '050.821', 'COMP. MODELS OF SENTENCE PROCESSING', 3, 5718, 'M', '1-4',050);
|
| 541 |
+
|
| 542 |
+
insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
|
| 543 |
+
insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
|
| 544 |
+
insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
|
| 545 |
+
insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
|
| 546 |
+
insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
|
| 547 |
+
insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
|
| 548 |
+
insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
|
| 549 |
+
insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
|
| 550 |
+
insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
|
| 551 |
+
insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
|
| 552 |
+
insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
|
| 553 |
+
insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
|
| 554 |
+
insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
|
| 555 |
+
insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
|
| 556 |
+
insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
|
| 557 |
+
insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
|
| 558 |
+
insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
|
| 559 |
+
insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
|
| 560 |
+
insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
|
| 561 |
+
insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
|
| 562 |
+
insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
|
| 563 |
+
insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
|
| 564 |
+
insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
|
| 565 |
+
insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
|
| 566 |
+
insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
|
| 567 |
+
insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
|
| 568 |
+
insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
|
| 569 |
+
insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
|
| 570 |
+
insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
|
| 571 |
+
insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
|
| 572 |
+
insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
|
| 573 |
+
insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
|
| 574 |
+
insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
|
| 575 |
+
insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
|
database/company_1/company_1.sqlite
ADDED
|
Binary file (12.3 kB). View file
|
|
|
database/course_teach/schema.sql
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
PRAGMA foreign_keys = ON;
|
| 3 |
+
|
| 4 |
+
CREATE TABLE "course" (
|
| 5 |
+
"Course_ID" int,
|
| 6 |
+
"Staring_Date" text,
|
| 7 |
+
"Course" text,
|
| 8 |
+
PRIMARY KEY ("Course_ID")
|
| 9 |
+
);
|
| 10 |
+
|
| 11 |
+
CREATE TABLE "teacher" (
|
| 12 |
+
"Teacher_ID" int,
|
| 13 |
+
"Name" text,
|
| 14 |
+
"Age" text,
|
| 15 |
+
"Hometown" text,
|
| 16 |
+
PRIMARY KEY ("Teacher_ID")
|
| 17 |
+
);
|
| 18 |
+
|
| 19 |
+
INSERT INTO "course" VALUES ("1","5 May","Language Arts");
|
| 20 |
+
INSERT INTO "course" VALUES ("2","6 May","Math");
|
| 21 |
+
INSERT INTO "course" VALUES ("3","7 May","Science");
|
| 22 |
+
INSERT INTO "course" VALUES ("4","9 May","History");
|
| 23 |
+
INSERT INTO "course" VALUES ("5","10 May","Bible");
|
| 24 |
+
INSERT INTO "course" VALUES ("6","11 May","Geography");
|
| 25 |
+
INSERT INTO "course" VALUES ("7","13 May","Sports");
|
| 26 |
+
INSERT INTO "course" VALUES ("8","14 May","French");
|
| 27 |
+
INSERT INTO "course" VALUES ("9","15 May","Health");
|
| 28 |
+
INSERT INTO "course" VALUES ("10","17 May","Music");
|
| 29 |
+
|
| 30 |
+
INSERT INTO "teacher" VALUES (1,"Joseph Huts",32,"Blackrod Urban District");
|
| 31 |
+
INSERT INTO "teacher" VALUES (2,"Gustaaf Deloor",29,"Bolton County Borough");
|
| 32 |
+
INSERT INTO "teacher" VALUES (3,"Vicente Carretero",26,"Farnworth Municipal Borough");
|
| 33 |
+
INSERT INTO "teacher" VALUES (4,"John Deloor",33,"Horwich Urban District");
|
| 34 |
+
INSERT INTO "teacher" VALUES (5,"Kearsley Brown",45,"Kearsley Urban District");
|
| 35 |
+
INSERT INTO "teacher" VALUES (6,"Anne Walker",41,"Little Lever Urban District");
|
| 36 |
+
INSERT INTO "teacher" VALUES (7,"Lucy Wong",39,"Turton Urban District");
|
| 37 |
+
|
| 38 |
+
CREATE TABLE "course_arrange" (
|
| 39 |
+
"Course_ID" int,
|
| 40 |
+
"Teacher_ID" int,
|
| 41 |
+
"Grade" int,
|
| 42 |
+
PRIMARY KEY ("Course_ID","Teacher_ID","Grade"),
|
| 43 |
+
FOREIGN KEY ("Course_ID") REFERENCES `course`("Course_ID"),
|
| 44 |
+
FOREIGN KEY ("Teacher_ID") REFERENCES `teacher`("Teacher_ID")
|
| 45 |
+
);
|
| 46 |
+
INSERT INTO "course_arrange" VALUES (2,5,1);
|
| 47 |
+
INSERT INTO "course_arrange" VALUES (2,3,3);
|
| 48 |
+
INSERT INTO "course_arrange" VALUES (3,2,5);
|
| 49 |
+
INSERT INTO "course_arrange" VALUES (4,6,7);
|
| 50 |
+
INSERT INTO "course_arrange" VALUES (5,6,1);
|
| 51 |
+
INSERT INTO "course_arrange" VALUES (10,7,4);
|
| 52 |
+
|
database/cre_Doc_Control_Systems/cre_Doc_Control_Systems.sqlite
ADDED
|
Binary file (81.9 kB). View file
|
|
|
database/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);
|
database/cre_Doc_Tracking_DB/cre_Doc_Tracking_DB.sqlite
ADDED
|
Binary file (57.3 kB). View file
|
|
|
database/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);
|
database/culture_company/schema.sql
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "book_club" (
|
| 4 |
+
"book_club_id" int,
|
| 5 |
+
"Year" int,
|
| 6 |
+
"Author_or_Editor" text,
|
| 7 |
+
"Book_Title" text,
|
| 8 |
+
"Publisher" text,
|
| 9 |
+
"Category" text,
|
| 10 |
+
"Result" text,
|
| 11 |
+
PRIMARY KEY ("book_club_id")
|
| 12 |
+
);
|
| 13 |
+
|
| 14 |
+
INSERT INTO "book_club" VALUES (1, "1989","Michael Nava","Goldenboy","Alyson","Gay M/SF","Won [A ]");
|
| 15 |
+
INSERT INTO "book_club" VALUES (2, "1989","Donald Ward","Death Takes the Stage","St. Martin's Press","Gay M/SF","Nom");
|
| 16 |
+
INSERT INTO "book_club" VALUES (3, "1989","Michael Bishop","Unicorn Mountain","William Morrow","Gay M/SF","Nom");
|
| 17 |
+
INSERT INTO "book_club" VALUES (4, "1989","Joseph Hansen","Obedience","Mysterious Press","Gay M/SF","Nom");
|
| 18 |
+
INSERT INTO "book_club" VALUES (5, "1989","George Baxt","Whoӳ Next","International Polygonics","Gay M/SF","Nom");
|
| 19 |
+
INSERT INTO "book_club" VALUES (6, "1989","Antoinette Azolakov","Skiptrace","Banned Books","Lesb. M/SF","Won");
|
| 20 |
+
INSERT INTO "book_club" VALUES (7,"1989","Claire McNab","Lessons In Murder","Naiad Press","Lesb. M/SF","Nom");
|
| 21 |
+
INSERT INTO "book_club" VALUES (8, "1989","Judy Grahn","Mundaneӳ World","Crossing Press","Lesb. M/SF","Nom");
|
| 22 |
+
INSERT INTO "book_club" VALUES (9, "1989","Dolores Klaich","Heavy Gilt","Naiad Press","Lesb. M/SF","Nom");
|
| 23 |
+
INSERT INTO "book_club" VALUES (10, "1989","Sandy Bayer","The Crystal Curtain","Alyson","Lesb. M/SF","Nom");
|
| 24 |
+
INSERT INTO "book_club" VALUES (11, "1990","Jeffrey N. McMahan","Somewhere in the Night","Alyson","Gay SF/F","Won [B ]");
|
| 25 |
+
INSERT INTO "book_club" VALUES (12, "1990","Thom Nickels","Walking Water / After All This","Banned Books","Gay SF/F","Nom");
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
CREATE TABLE "movie" (
|
| 29 |
+
"movie_id" int,
|
| 30 |
+
"Title" text,
|
| 31 |
+
"Year" int,
|
| 32 |
+
"Director" text,
|
| 33 |
+
"Budget_million" real,
|
| 34 |
+
"Gross_worldwide" int,
|
| 35 |
+
PRIMARY KEY("movie_id")
|
| 36 |
+
);
|
| 37 |
+
|
| 38 |
+
INSERT INTO "movie" VALUES (1, "The Boondock Saints","1999","Troy Duffy","6","30471");
|
| 39 |
+
INSERT INTO "movie" VALUES (2, "The Big Kahuna","1999","John Swanbeck","7","3728888");
|
| 40 |
+
INSERT INTO "movie" VALUES (3, "Storm Catcher","1999","Anthony Hickox","5","40500");
|
| 41 |
+
INSERT INTO "movie" VALUES (4, "Jill Rips","2000","Anthony Hickox","4","456774");
|
| 42 |
+
INSERT INTO "movie" VALUES (5, "The Whole Nine Yards","2000","Jonathan Lynn","41.3","106371651");
|
| 43 |
+
INSERT INTO "movie" VALUES (6, "Battlefield Earth","2000","Roger Christian","44","29725663");
|
| 44 |
+
INSERT INTO "movie" VALUES (7, "Get Carter","2000","Stephen Kay","63.6","19412993");
|
| 45 |
+
INSERT INTO "movie" VALUES (8, "The Art of War","2000","Christian Duguay","60","40400425");
|
| 46 |
+
INSERT INTO "movie" VALUES (9, "Agent Red","2000","Damian Lee","47","543356");
|
| 47 |
+
INSERT INTO "movie" VALUES (10, "3000 Miles to Graceland","2001","Demian Lichtenstein","62","18720175");
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
CREATE TABLE "culture_company" (
|
| 52 |
+
"Company_name" text,
|
| 53 |
+
"Type" text,
|
| 54 |
+
"Incorporated_in" text,
|
| 55 |
+
"Group_Equity_Shareholding" real,
|
| 56 |
+
"book_club_id" text,
|
| 57 |
+
"movie_id" text,
|
| 58 |
+
PRIMARY KEY("Company_name"),
|
| 59 |
+
FOREIGN KEY ("book_club_id") REFERENCES "book_club"("book_club_id"),
|
| 60 |
+
FOREIGN KEY ("movie_id") REFERENCES "movie"("movie_id")
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
INSERT INTO "culture_company" VALUES ("Culture China","Corporate","China","18.77",1,2);
|
| 64 |
+
INSERT INTO "culture_company" VALUES ("Culture China Cargo","Joint Venture","China","49",2,3);
|
| 65 |
+
INSERT INTO "culture_company" VALUES ("Culture Hong Kong","Joint Venture","Hong Kong","60",3,4);
|
| 66 |
+
INSERT INTO "culture_company" VALUES ("Dragonair","Subsidiary","Hong Kong","100",5,7);
|
| 67 |
+
INSERT INTO "culture_company" VALUES ("Cathay Pacific Culture","Subsidiary","Hong Kong","100",5,5);
|
| 68 |
+
INSERT INTO "culture_company" VALUES ("Cathay Pacific Culture Services (HK) Limited","Subsidiary","Hong Kong","100",6,6);
|
| 69 |
+
|
database/customer_complaints/schema.sql
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
CREATE TABLE `Staff` (
|
| 5 |
+
`staff_id` INTEGER PRIMARY KEY,
|
| 6 |
+
`gender` VARCHAR(1),
|
| 7 |
+
`first_name` VARCHAR(80),
|
| 8 |
+
`last_name` VARCHAR(80),
|
| 9 |
+
`email_address` VARCHAR(255),
|
| 10 |
+
`phone_number` VARCHAR(80)
|
| 11 |
+
);
|
| 12 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (114, '0', 'Ward', 'Boehm', 'marcelle.ritchie@example.com', '(379)551-0838x146');
|
| 13 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (115, '1', 'Lucie', 'Lowe', 'ohintz@example.org', '142-311-6503x206');
|
| 14 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (116, '0', 'Dagmar', 'Erdman', 'wrau@example.com', '345-656-5571');
|
| 15 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (117, '0', 'Bradly', 'Hahn', 'brett99@example.net', '1-132-839-9409x288');
|
| 16 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (118, '0', 'Austin', 'Zieme', 'reichel.armani@example.org', '(383)553-1035x20399');
|
| 17 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (119, '0', 'Dorian', 'Oberbrunner', 'richard.gutkowski@example.com', '155-811-6153');
|
| 18 |
+
INSERT INTO Staff (`staff_id`, `gender`, `first_name`, `last_name`, `email_address`, `phone_number`) VALUES (120, '0', 'Mikel', 'Lynch', 'glen.borer@example.com', '751-262-8424x575');
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
CREATE TABLE `Customers` (
|
| 22 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 23 |
+
`customer_type_code` VARCHAR(20) NOT NULL,
|
| 24 |
+
`address_line_1` VARCHAR(80),
|
| 25 |
+
`address_line_2` VARCHAR(80),
|
| 26 |
+
`town_city` VARCHAR(80),
|
| 27 |
+
`state` VARCHAR(80),
|
| 28 |
+
`email_address` VARCHAR(255),
|
| 29 |
+
`phone_number` VARCHAR(80)
|
| 30 |
+
);
|
| 31 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (113, 'Good Credit Rating', '144 Legros Landing', 'Apt. 551', 'Maryamport', 'Kansas', 'hsteuber@example.org', '06963347450');
|
| 32 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (114, 'Good Credit Rating', '039 Jedidiah Estate Suite 537', 'Apt. 245', 'Sauerberg', 'Hawaii', 'cayla.satterfield@example.net', '470-803-0244');
|
| 33 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (115, 'Good Credit Rating', '92189 Gulgowski Ranch Apt. 683', 'Apt. 828', 'Tyreekhaven', 'Tennessee', 'vida86@example.com', '997.698.4779x882');
|
| 34 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (116, 'Good Credit Rating', '72144 Katlynn Flat Suite 512', 'Suite 959','Hansenbury', 'Tennessee', 'vbogisich@example.org', '548.373.3603x59134');
|
| 35 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (117, 'Good Credit Rating', '1566 Ramona Overpass Apt. 464', 'Suite 151', 'North Alisaville', 'Florida', 'ubeier@example.org', '044-468-4549');
|
| 36 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (118, 'Defaults on payments', '425 Roman Tunnel', 'Apt. 495', 'Funkstad', 'Colorado', 'lavonne.frami@example.com', '+38(3)9011433816');
|
| 37 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (119, 'Good Credit Rating', '05355 Marcelle Radial', 'Suite 054', 'Port Joshuah', 'Pennsylvania', 'paige.hyatt@example.com', '1-369-302-7623x576');
|
| 38 |
+
INSERT INTO Customers (`customer_id`, `customer_type_code`, `address_line_1`, `address_line_2`, `town_city`, `state`, `email_address`, `phone_number`) VALUES (120, 'Defaults on payments', '518 Mann Park', 'Suite 035', 'West Annamariestad', 'Iowa', 'rzulauf@example.org', '578.019.7943x328');
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
CREATE TABLE `Products` (
|
| 42 |
+
`product_id` INTEGER PRIMARY KEY,
|
| 43 |
+
`parent_product_id` INTEGER,
|
| 44 |
+
`product_category_code` VARCHAR(20) NOT NULL,
|
| 45 |
+
`date_product_first_available` DATETIME,
|
| 46 |
+
`date_product_discontinued` DATETIME,
|
| 47 |
+
`product_name` VARCHAR(80),
|
| 48 |
+
`product_description` VARCHAR(255),
|
| 49 |
+
`product_price` DECIMAL(19,4)
|
| 50 |
+
);
|
| 51 |
+
INSERT INTO Products (`product_id`, `parent_product_id`, `product_category_code`, `date_product_first_available`, `date_product_discontinued`, `product_name`, `product_description`, `product_price`) VALUES (117, 4, 'Food', '1988-09-29 17:54:50', '1987-12-20 13:46:16', 'Chocolate', 'Handmade chocolate', '2.8800');
|
| 52 |
+
INSERT INTO Products (`product_id`, `parent_product_id`, `product_category_code`, `date_product_first_available`, `date_product_discontinued`, `product_name`, `product_description`, `product_price`) VALUES (118, 3, 'Book', '1974-06-25 12:26:47', '1991-08-20 05:22:31', 'The Great Gatsby', 'American novel','35.0000');
|
| 53 |
+
INSERT INTO Products (`product_id`, `parent_product_id`, `product_category_code`, `date_product_first_available`, `date_product_discontinued`, `product_name`, `product_description`, `product_price`) VALUES (119, 8, 'Hardware', '1994-12-18 15:13:19', '1997-07-02 18:26:16', 'Keyboard', 'Designed for games', '109.9900');
|
| 54 |
+
INSERT INTO Products (`product_id`, `parent_product_id`, `product_category_code`, `date_product_first_available`, `date_product_discontinued`, `product_name`, `product_description`, `product_price`) VALUES (120, 9, 'Hardware', '1998-06-20 15:04:11', '1980-06-26 10:40:19', 'Mouse', 'Blue tooth mouse', '23.3500');
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
CREATE TABLE `Complaints` (
|
| 58 |
+
`complaint_id` INTEGER NOT NULL ,
|
| 59 |
+
`product_id` INTEGER NOT NULL,
|
| 60 |
+
`customer_id` INTEGER NOT NULL,
|
| 61 |
+
`complaint_outcome_code` VARCHAR(20) NOT NULL,
|
| 62 |
+
`complaint_status_code` VARCHAR(20) NOT NULL,
|
| 63 |
+
`complaint_type_code` VARCHAR(20) NOT NULL,
|
| 64 |
+
`date_complaint_raised` DATETIME,
|
| 65 |
+
`date_complaint_closed` DATETIME,
|
| 66 |
+
`staff_id` INTEGER NOT NULL ,
|
| 67 |
+
FOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),
|
| 68 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),
|
| 69 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 70 |
+
);
|
| 71 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (1, 117, 120, 'OK', 'Closed', 'Product Failure', '2002-07-18 10:59:35', '1976-04-19 11:03:06', 114);
|
| 72 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (2, 118, 113, 'OK', 'New', 'Product Unusable', '1973-02-10 22:55:56', '2013-09-14 02:59:10', 120);
|
| 73 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (3, 119, 114, 'OK', 'New', 'Product Unusable', '2006-10-29 07:08:46', '1995-09-11 14:48:46', 115);
|
| 74 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (4, 120, 114, 'OK', 'Closed', 'Product Unusable', '1977-08-06 00:31:19', '1970-10-14 00:57:25', 114);
|
| 75 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (5, 117, 118, 'OK', 'Open', 'Product Failure', '2007-10-14 21:50:43', '2000-08-17 17:02:48', 116);
|
| 76 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (6, 118, 114, 'OK', 'Open', 'Product Unusable', '1987-07-11 14:40:30', '1975-10-11 05:54:30', 114);
|
| 77 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (7, 117, 117, 'OK', 'New', 'Product Unusable', '2002-07-18 10:59:35', '1976-04-19 11:03:06', 118);
|
| 78 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (8, 117, 114, 'OK', 'New', 'Product Unusable', '1973-02-10 22:55:56', '2013-09-14 02:59:10', 117);
|
| 79 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (9, 117, 116, 'OK', 'New', 'Product Unusable', '2006-10-29 07:08:46', '1995-09-11 14:48:46', 120);
|
| 80 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (10, 118, 115, 'OK', 'New', 'Product Unusable', '1977-08-06 00:31:19', '1970-10-14 00:57:25', 114);
|
| 81 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (11, 118, 116, 'OK', 'Open', 'Product Unusable', '2007-10-14 21:50:43', '2000-08-17 17:02:48', 115);
|
| 82 |
+
INSERT INTO Complaints (`complaint_id`, `product_id`, `customer_id`, `complaint_outcome_code`, `complaint_status_code`, `complaint_type_code`, `date_complaint_raised`, `date_complaint_closed`, `staff_id`) VALUES (12, 117, 116, 'OK', 'Open', 'Product Unusable', '1987-07-11 14:40:30', '1975-10-11 05:54:30', 114);
|
| 83 |
+
|
database/customer_deliveries/customer_deliveries.sqlite
ADDED
|
Binary file (61.4 kB). View file
|
|
|
database/customer_deliveries/schema.sql
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE `Products` (
|
| 4 |
+
`product_id` INTEGER PRIMARY KEY,
|
| 5 |
+
`product_name` VARCHAR(20),
|
| 6 |
+
`product_price` DECIMAL(19,4),
|
| 7 |
+
`product_description` VARCHAR(255)
|
| 8 |
+
);
|
| 9 |
+
INSERT INTO Products (`product_id`, `product_name`, `product_price`, `product_description`) VALUES (1, 'dvds', '1322.7800', 'good condition');
|
| 10 |
+
INSERT INTO Products (`product_id`, `product_name`, `product_price`, `product_description`) VALUES (2, 'cloth', '6402.0900', 'good condition');
|
| 11 |
+
INSERT INTO Products (`product_id`, `product_name`, `product_price`, `product_description`) VALUES (3, 'electronics', '2511.2900', 'great condition');
|
| 12 |
+
INSERT INTO Products (`product_id`, `product_name`, `product_price`, `product_description`) VALUES (4, 'books', '7111.6800', 'good condition');
|
| 13 |
+
INSERT INTO Products (`product_id`, `product_name`, `product_price`, `product_description`) VALUES (5, 'food', '3644.4500', 'good condition');
|
| 14 |
+
INSERT INTO Products (`product_id`, `product_name`, `product_price`, `product_description`) VALUES (6, 'gift', '5022.3900', 'bad condition');
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
CREATE TABLE `Addresses` (
|
| 18 |
+
`address_id` INTEGER PRIMARY KEY,
|
| 19 |
+
`address_details` VARCHAR(80),
|
| 20 |
+
`city` VARCHAR(50),
|
| 21 |
+
`zip_postcode` VARCHAR(20),
|
| 22 |
+
`state_province_county` VARCHAR(50),
|
| 23 |
+
`country` VARCHAR(50)
|
| 24 |
+
);
|
| 25 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (1, '92283 Lora Forges Suite 322', 'Mohrville', '271', 'Nebraska', 'USA');
|
| 26 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (2, '17135 Jaida Fork Suite 798', 'East Brody', '940', 'Colorado', 'USA');
|
| 27 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (3, '41099 Crist Prairie Suite 507', 'Evelinebury', '003', 'Idaho', 'USA');
|
| 28 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (4, '615 Adams Rue Apt. 095', 'Sawaynville', '575', 'Kentucky', 'USA');
|
| 29 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (5, '045 Marquardt Village Suite 484', 'Carterside', '827', 'California', 'USA');
|
| 30 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (6, '203 Joseph Hills', 'Giovannaton', '960', 'Tennessee', 'USA');
|
| 31 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (7, '6187 Feil Extension Apt. 749', 'East Frederic', '674', 'Maine', 'USA');
|
| 32 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (8, '185 Farrell Brooks Apt. 106', 'Mosciskimouth', '076', 'Illinois', 'USA');
|
| 33 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (9, '3720 Pagac Hollow Apt. 131', 'Alvertatown', '234', 'Wyoming', 'USA');
|
| 34 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (10, '57136 Eichmann Ranch Suite 091', 'Gerholdtown', '297', 'Illinois', 'USA');
|
| 35 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (11, '3020 Steuber Gardens Apt. 620', 'Flossiefurt', '460', 'Michigan', 'USA');
|
| 36 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (12, '2060 Hilpert Forge Apt. 379', 'Annietown', '491', 'Michigan', 'USA');
|
| 37 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (13, '469 Roberts Mews', 'Lake Abbey', '838', 'Washington', 'USA');
|
| 38 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (14, '8701 Myrtis Ranch', 'North Marquesfort', '940', 'Ohio', 'USA');
|
| 39 |
+
INSERT INTO Addresses (`address_id`, `address_details`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (15, '06959 Garett Meadows Apt. 259', 'New Lizziechester', '934', 'Massachusetts', 'USA');
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
CREATE TABLE `Customers` (
|
| 43 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 44 |
+
`payment_method` VARCHAR(10) NOT NULL,
|
| 45 |
+
`customer_name` VARCHAR(80),
|
| 46 |
+
`customer_phone` VARCHAR(80),
|
| 47 |
+
`customer_email` VARCHAR(80),
|
| 48 |
+
`date_became_customer` DATETIME
|
| 49 |
+
);
|
| 50 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (1, 'Visa', 'Ron Emard', '1-382-503-5179x53639', 'shaniya45@example.net', '2011-04-25 22:20:35');
|
| 51 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (2, 'MasterCard', 'Gabe Schroeder', '1-728-537-4293x0885', 'alexandra91@example.net', '2011-10-17 16:08:25');
|
| 52 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (3, 'Discover', 'Candace Schneider', '940.575.3682x7959', 'tkassulke@example.com', '2012-01-11 21:17:01');
|
| 53 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (4, 'Visa', 'Jaden Lang', '361.151.3489x7272', 'dedric17@example.org', '2009-12-29 17:38:10');
|
| 54 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (5, 'Visa', 'Geovanni Grady', '1-005-644-2495', 'elmira.langworth@example.org', '2017-05-21 07:09:55');
|
| 55 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (6, 'Visa', 'Dr. Karine Farrell', '+49(2)0677806107', 'reichel.winnifred@example.org', '2010-11-06 08:42:56');
|
| 56 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (7, 'Discover', 'Emmanuel Reilly', '129.959.6420', 'gleichner.ethelyn@example.net', '2013-11-29 06:15:22');
|
| 57 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (8, 'MasterCard', 'Keenan Kuhic', '686-517-9923x348', 'dallin76@example.org', '2013-04-09 18:17:05');
|
| 58 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (9, 'American', 'Rusty Morar', '1-123-197-9677x7194', 'njenkins@example.org', '2015-09-09 09:29:06');
|
| 59 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (10, 'Visa', 'Lila Howe', '1-492-284-1097', 'leann.hamill@example.org', '2014-02-04 04:51:58');
|
| 60 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (11, 'Visa', 'Amalia Hudson DDS', '003-991-1506x483', 'danika49@example.com', '2014-02-25 19:39:51');
|
| 61 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (12, 'Discover', 'Verda Streich', '06730471330', 'xgraham@example.org', '2008-10-12 12:19:27');
|
| 62 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (13, 'Discover', 'Patience Yundt', '969-208-8932x715', 'kira82@example.com', '2017-03-25 18:48:04');
|
| 63 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (14, 'Visa', 'Annabell Walsh', '(881)096-1281x6448', 'adriana83@example.org', '2017-06-30 19:02:11');
|
| 64 |
+
INSERT INTO Customers (`customer_id`, `payment_method`, `customer_name`, `customer_phone`, `customer_email`, `date_became_customer`) VALUES (15, 'Visa', 'Aracely Borer V', '531-617-3230', 'rollin95@example.net', '2015-09-13 22:39:50');
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
CREATE TABLE `Regular_Orders` (
|
| 68 |
+
`regular_order_id` INTEGER PRIMARY KEY,
|
| 69 |
+
`distributer_id` INTEGER NOT NULL,
|
| 70 |
+
FOREIGN KEY (`distributer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 71 |
+
);
|
| 72 |
+
|
| 73 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (1, 12);
|
| 74 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (2, 15);
|
| 75 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (3, 6);
|
| 76 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (4, 3);
|
| 77 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (5, 8);
|
| 78 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (6, 14);
|
| 79 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (7, 2);
|
| 80 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (8, 15);
|
| 81 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (9, 10);
|
| 82 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (10, 7);
|
| 83 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (11, 3);
|
| 84 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (12, 1);
|
| 85 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (13, 1);
|
| 86 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (14, 15);
|
| 87 |
+
INSERT INTO Regular_Orders (`regular_order_id`, `distributer_id`) VALUES (15, 15);
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
CREATE TABLE `Regular_Order_Products` (
|
| 91 |
+
`regular_order_id` INTEGER NOT NULL,
|
| 92 |
+
`product_id` INTEGER NOT NULL,
|
| 93 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),
|
| 94 |
+
FOREIGN KEY (`regular_order_id` ) REFERENCES `Regular_Orders`(`regular_order_id` )
|
| 95 |
+
);
|
| 96 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (5, 3);
|
| 97 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (2, 3);
|
| 98 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (10, 1);
|
| 99 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (8, 5);
|
| 100 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (12, 2);
|
| 101 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (1, 4);
|
| 102 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (6, 3);
|
| 103 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (3, 6);
|
| 104 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (3, 1);
|
| 105 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (9, 6);
|
| 106 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (5, 5);
|
| 107 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (1, 1);
|
| 108 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (7, 4);
|
| 109 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (6, 4);
|
| 110 |
+
INSERT INTO Regular_Order_Products (`regular_order_id`, `product_id`) VALUES (13, 2);
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
CREATE TABLE `Actual_Orders` (
|
| 115 |
+
`actual_order_id` INTEGER PRIMARY KEY,
|
| 116 |
+
`order_status_code` VARCHAR(10) NOT NULL,
|
| 117 |
+
`regular_order_id` INTEGER NOT NULL,
|
| 118 |
+
`actual_order_date` DATETIME,
|
| 119 |
+
FOREIGN KEY (`regular_order_id` ) REFERENCES `Regular_Orders`(`regular_order_id` )
|
| 120 |
+
);
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (1, 'Success', 8, '2018-03-02 23:26:19');
|
| 124 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (2, 'Cancel', 15, '2018-03-02 08:33:39');
|
| 125 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (3, 'Cancel', 4, '2018-02-25 10:13:36');
|
| 126 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (4, 'Cancel', 10, '2018-03-21 01:34:52');
|
| 127 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (5, 'Cancel', 14, '2018-02-28 15:31:06');
|
| 128 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (6, 'Success', 12, '2018-03-12 05:33:57');
|
| 129 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (7, 'Success', 1, '2018-03-06 12:20:31');
|
| 130 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (8, 'Cancel', 11, '2018-03-22 19:30:17');
|
| 131 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (9, 'Success', 6, '2018-03-13 05:43:25');
|
| 132 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (10, 'Success', 13, '2018-03-05 17:31:36');
|
| 133 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (11, 'Cancel', 4, '2018-03-16 00:28:09');
|
| 134 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (12, 'Cancel', 12, '2018-02-26 01:55:52');
|
| 135 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (13, 'Cancel', 8, '2018-03-11 10:45:05');
|
| 136 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (14, 'Cancel', 4, '2018-03-12 11:24:59');
|
| 137 |
+
INSERT INTO Actual_Orders (`actual_order_id`, `order_status_code`, `regular_order_id`, `actual_order_date`) VALUES (15, 'Cancel', 7, '2018-03-10 18:22:34');
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
CREATE TABLE `Actual_Order_Products` (
|
| 141 |
+
`actual_order_id` INTEGER NOT NULL,
|
| 142 |
+
`product_id` INTEGER NOT NULL,
|
| 143 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),
|
| 144 |
+
FOREIGN KEY (`actual_order_id` ) REFERENCES `Actual_Orders`(`actual_order_id` )
|
| 145 |
+
);
|
| 146 |
+
|
| 147 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (2, 1);
|
| 148 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (14, 5);
|
| 149 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (13, 6);
|
| 150 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (9, 2);
|
| 151 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (3, 2);
|
| 152 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (2, 3);
|
| 153 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (13, 2);
|
| 154 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (3, 1);
|
| 155 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (3, 1);
|
| 156 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (10, 3);
|
| 157 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (6, 6);
|
| 158 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (5, 5);
|
| 159 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (7, 3);
|
| 160 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (5, 3);
|
| 161 |
+
INSERT INTO Actual_Order_Products (`actual_order_id`, `product_id`) VALUES (15, 4);
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
CREATE TABLE `Customer_Addresses` (
|
| 168 |
+
`customer_id` INTEGER NOT NULL,
|
| 169 |
+
`address_id` INTEGER NOT NULL,
|
| 170 |
+
`date_from` DATETIME NOT NULL,
|
| 171 |
+
`address_type` VARCHAR(10) NOT NULL,
|
| 172 |
+
`date_to` DATETIME,
|
| 173 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),
|
| 174 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 175 |
+
);
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (5, 6, '2016-09-06 19:23:46', 'House', '2018-02-25 15:34:58');
|
| 179 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (14, 5, '2016-12-21 03:49:54', 'House', '2018-03-13 21:20:21');
|
| 180 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (2, 2, '2014-06-09 06:31:49', 'Flat', '2018-03-02 21:56:40');
|
| 181 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (10, 6, '2011-05-24 21:49:34', 'House', '2018-03-18 12:45:44');
|
| 182 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (14, 2, '2011-12-06 16:49:10', 'Flat', '2018-02-24 20:18:08');
|
| 183 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (10, 1, '2012-05-24 11:47:54', 'House', '2018-03-14 20:26:33');
|
| 184 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (7, 3, '2016-08-17 17:45:20', 'Flat', '2018-03-16 14:09:24');
|
| 185 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (4, 9, '2009-08-03 03:17:03', 'House', '2018-03-15 23:45:59');
|
| 186 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (3, 7, '2010-12-29 11:01:39', 'House', '2018-03-22 02:54:10');
|
| 187 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (12, 6, '2012-08-31 15:41:03', 'Flat', '2018-03-02 23:42:49');
|
| 188 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (12, 11, '2008-04-02 08:23:13', 'Apartment', '2018-03-17 12:51:37');
|
| 189 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (14, 10, '2011-08-18 09:40:49', 'House', '2018-03-06 15:48:13');
|
| 190 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (1, 11, '2014-12-20 18:58:32', 'House', '2018-02-27 00:53:48');
|
| 191 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (8, 6, '2013-05-06 00:49:45', 'Flat', '2018-03-05 01:34:02');
|
| 192 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `address_type`, `date_to`) VALUES (12, 5, '2017-11-01 10:59:35', 'Flat', '2018-03-09 05:05:17');
|
| 193 |
+
|
| 194 |
+
|
| 195 |
+
CREATE TABLE `Delivery_Routes` (
|
| 196 |
+
`route_id` INTEGER PRIMARY KEY,
|
| 197 |
+
`route_name` VARCHAR(50),
|
| 198 |
+
`other_route_details` VARCHAR(255)
|
| 199 |
+
);
|
| 200 |
+
|
| 201 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (1, 'Torphy Ltd', '16893 Wilderman Terrace
|
| 202 |
+
Port Lucasburgh, ND 55978-5550');
|
| 203 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (2, 'Heidenreich Group', '6534 Cheyenne Trace Suite 242
|
| 204 |
+
Koryburgh, PA 21391-9164');
|
| 205 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (3, 'Gerhold Inc', '70469 Unique Crest
|
| 206 |
+
Katherynville, IA 92263-4974');
|
| 207 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (4, 'Huel, Armstrong and Senger', '534 Lubowitz Terrace
|
| 208 |
+
Lake Tomfort, LA 52697-4998');
|
| 209 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (5, 'Nader, Leuschke and Huels', '4627 Johnnie Centers
|
| 210 |
+
Lake Hipolitoton, RI 37305');
|
| 211 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (6, 'Abshire Ltd', '36578 Kirsten Terrace
|
| 212 |
+
Krajcikside, NH 29063');
|
| 213 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (7, 'Adams, Macejkovic and Carroll', '941 Ritchie Plains Suite 833
|
| 214 |
+
North Jerry, LA 32804-7405');
|
| 215 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (8, 'Schowalter Group', '52417 Wiza Brook Apt. 000
|
| 216 |
+
Zechariahstad, WY 15885-3711');
|
| 217 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (9, 'Gorczany Group', '9608 Hoyt Extension
|
| 218 |
+
East Linnieview, GA 87356-5339');
|
| 219 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (10, 'Grady, King and Price', '4989 Pfeffer Passage Suite 915
|
| 220 |
+
West Jacebury, SD 68079-3347');
|
| 221 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (11, 'Streich, Spencer and Brakus', '30335 Pacocha Burgs Apt. 400
|
| 222 |
+
North Onastad, OR 76419');
|
| 223 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (12, 'Brekke, Powlowski and Fritsch', '53685 Abshire Falls
|
| 224 |
+
Lake Destineyville, OK 91313');
|
| 225 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (13, 'Hermiston, Feeney and Daugherty', '54645 Ziemann Skyway Suite 987
|
| 226 |
+
Lake Roderickstad, OH 77820');
|
| 227 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (14, 'Renner-Kovacek', '809 Daija Radial Apt. 507
|
| 228 |
+
Kavonfort, MN 70034-2797');
|
| 229 |
+
INSERT INTO Delivery_Routes (`route_id`, `route_name`, `other_route_details`) VALUES (15, 'Hegmann-Waters', '719 Vito Parks
|
| 230 |
+
Kassulkeville, NH 77748');
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
CREATE TABLE `Delivery_Route_Locations` (
|
| 234 |
+
`location_code` VARCHAR(10) PRIMARY KEY,
|
| 235 |
+
`route_id` INTEGER NOT NULL,
|
| 236 |
+
`location_address_id` INTEGER NOT NULL,
|
| 237 |
+
`location_name` VARCHAR(50),
|
| 238 |
+
FOREIGN KEY (`location_address_id` ) REFERENCES `Addresses`(`address_id` ),
|
| 239 |
+
FOREIGN KEY (`route_id` ) REFERENCES `Delivery_Routes`(`route_id` )
|
| 240 |
+
);
|
| 241 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('27 City Rd', 11, 5, 'Labadie-Crooks');
|
| 242 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('30 Sam Rd', 7, 13, 'VonRueden, Schmeler and Fay');
|
| 243 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('67 LV Rd', 11, 6, 'Carter, Pfannerstill and Rutherford');
|
| 244 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('38 Enisner Av', 10, 7, 'Bradtke-Herman');
|
| 245 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('73 Nancy Av', 14, 10, 'Streich Group');
|
| 246 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('84 OE Av', 14, 7, 'Hessel and Sons');
|
| 247 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('34 Benz St', 2, 15, 'Strosin, Hegmann and Abbott');
|
| 248 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('15 Sixth Av', 8, 6, 'Pouros, Brakus and Konopelski');
|
| 249 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('04 Elm Rd', 8, 8, 'Hermiston, Hand and Wisoky');
|
| 250 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('79 Square St', 15, 5, 'Turner, Dietrich and Smitham');
|
| 251 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('84 Temple Rd', 7, 2, 'Leannon, Erdman and Schneider');
|
| 252 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('64 Kate Rd', 7, 12, 'Dach Group');
|
| 253 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('68 Denny St', 4, 7, 'Ledner-Kozey');
|
| 254 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('76 David St', 11, 3, 'Rosenbaum, Kiehn and Kilback');
|
| 255 |
+
INSERT INTO Delivery_Route_Locations (`location_code`, `route_id`, `location_address_id`, `location_name`) VALUES ('58 Roof Av', 13, 4, 'Bartoletti, Keebler and Crona');
|
| 256 |
+
|
| 257 |
+
|
| 258 |
+
CREATE TABLE `Trucks` (
|
| 259 |
+
`truck_id` INTEGER PRIMARY KEY,
|
| 260 |
+
`truck_licence_number` VARCHAR(20),
|
| 261 |
+
`truck_details` VARCHAR(255)
|
| 262 |
+
);
|
| 263 |
+
|
| 264 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (1, '58110', 'Frida');
|
| 265 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (2, '33822', 'Randy');
|
| 266 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (3, '17106', 'Laverna');
|
| 267 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (4, '24474', 'Kaya');
|
| 268 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (5, '63359', 'Queen');
|
| 269 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (6, '25232', 'Deon');
|
| 270 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (7, '92426', 'Stacy');
|
| 271 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (8, '69863', 'Rebeka');
|
| 272 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (9, '78683', 'Bud');
|
| 273 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (10, '47865', 'Holly');
|
| 274 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (11, '49160', 'Rosamond');
|
| 275 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (12, '32054', 'Ricky');
|
| 276 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (13, '87695', 'Joanny');
|
| 277 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (14, '75871', 'Luisa');
|
| 278 |
+
INSERT INTO Trucks (`truck_id`, `truck_licence_number`, `truck_details`) VALUES (15, '89343', 'Efren');
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
CREATE TABLE `Employees` (
|
| 282 |
+
`employee_id` INTEGER PRIMARY KEY,
|
| 283 |
+
`employee_address_id` INTEGER NOT NULL,
|
| 284 |
+
`employee_name` VARCHAR(80),
|
| 285 |
+
`employee_phone` VARCHAR(80),
|
| 286 |
+
FOREIGN KEY (`employee_address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 287 |
+
);
|
| 288 |
+
|
| 289 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (1, 4, 'Kacie', '716-650-2081');
|
| 290 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (2, 12, 'Dejuan', '211.289.9042');
|
| 291 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (3, 1, 'Leonie', '816-890-2580');
|
| 292 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (4, 11, 'Rogelio', '(539)655-7194x3276');
|
| 293 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (5, 12, 'Eriberto', '675.047.7555x13273');
|
| 294 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (6, 9, 'Matteo', '620.905.4152x7146');
|
| 295 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (7, 4, 'Sasha', '1-547-775-6049');
|
| 296 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (8, 11, 'Eino', '033.973.3729x07313');
|
| 297 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (9, 8, 'Cydney', '191.702.4400x1018');
|
| 298 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (10, 6, 'Cristian', '1-833-492-9430');
|
| 299 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (11, 5, 'Lew', '776.002.6775');
|
| 300 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (12, 15, 'Anthony', '+69(6)9999892744');
|
| 301 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (13, 14, 'Jovani', '+28(9)6180779782');
|
| 302 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (14, 10, 'Dovie', '944-507-0999');
|
| 303 |
+
INSERT INTO Employees (`employee_id`, `employee_address_id`, `employee_name`, `employee_phone`) VALUES (15, 12, 'Allison', '+48(5)2807285053');
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
CREATE TABLE `Order_Deliveries` (
|
| 307 |
+
`location_code` VARCHAR(10) NOT NULL,
|
| 308 |
+
`actual_order_id` INTEGER NOT NULL,
|
| 309 |
+
`delivery_status_code` VARCHAR(10) NOT NULL,
|
| 310 |
+
`driver_employee_id` INTEGER NOT NULL,
|
| 311 |
+
`truck_id` INTEGER NOT NULL,
|
| 312 |
+
`delivery_date` DATETIME,
|
| 313 |
+
FOREIGN KEY (`truck_id` ) REFERENCES `Trucks`(`truck_id` ),
|
| 314 |
+
FOREIGN KEY (`actual_order_id` ) REFERENCES `Actual_Orders`(`actual_order_id` ),
|
| 315 |
+
FOREIGN KEY (`location_code` ) REFERENCES `Delivery_Route_Locations`(`location_code` ),
|
| 316 |
+
FOREIGN KEY (`driver_employee_id` ) REFERENCES `Employees`(`employee_id` )
|
| 317 |
+
);
|
| 318 |
+
|
| 319 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('27 City Rd', 11, 'Ready', 6, 11, '2018-03-21 00:57:22');
|
| 320 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('27 City Rd', 1, 'On Road', 4, 10, '2018-02-26 01:32:49');
|
| 321 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('27 City Rd', 3, 'Ready', 1, 2, '2018-03-08 17:17:12');
|
| 322 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('73 Nancy Av', 2, 'Delivered', 12, 10, '2018-03-17 19:42:08');
|
| 323 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('73 Nancy Av', 2, 'On Road', 1, 6, '2018-03-05 03:03:24');
|
| 324 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('34 Benz St', 14, 'Delivered', 11, 6, '2018-03-12 20:45:27');
|
| 325 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('73 Nancy Av', 6, 'On Road', 11, 11, '2018-03-22 22:09:56');
|
| 326 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('34 Benz St', 6, 'Delivered', 2, 10, '2018-03-06 22:39:17');
|
| 327 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('34 Benz St', 5, 'Delivered', 14, 6, '2018-03-02 09:03:13');
|
| 328 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('73 Nancy Av', 8, 'Ready', 13, 4, '2018-03-17 09:09:06');
|
| 329 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('58 Roof Av', 9, 'Ready', 3, 9, '2018-02-26 13:22:53');
|
| 330 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('58 Roof Av', 5, 'Ready', 8, 1, '2018-03-20 20:36:44');
|
| 331 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('58 Roof Av', 9, 'Ready', 14, 5, '2018-03-14 05:16:17');
|
| 332 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('58 Roof Av', 10, 'Ready', 13, 11, '2018-03-18 02:35:08');
|
| 333 |
+
INSERT INTO Order_Deliveries (`location_code`, `actual_order_id`, `delivery_status_code`, `driver_employee_id`, `truck_id`, `delivery_date`) VALUES ('34 Benz St', 4, 'On Road', 1, 2, '2018-03-01 00:50:45');
|
database/customers_and_products_contacts/customers_and_products_contacts.sqlite
ADDED
|
Binary file (32.8 kB). View file
|
|
|
database/customers_and_products_contacts/schema.sql
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
CREATE TABLE `Addresses` (
|
| 3 |
+
`address_id` INTEGER PRIMARY KEY,
|
| 4 |
+
`line_1_number_building` VARCHAR(80),
|
| 5 |
+
`city` VARCHAR(50),
|
| 6 |
+
`zip_postcode` VARCHAR(20),
|
| 7 |
+
`state_province_county` VARCHAR(50),
|
| 8 |
+
`country` VARCHAR(50)
|
| 9 |
+
);
|
| 10 |
+
|
| 11 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (1, '4315 Kerluke Canyon Apt. 800', 'Hertafurt', '740', 'Nevada', 'USA');
|
| 12 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (2, '319 Kozey Highway Suite 973', 'Edgardoberg', '282', 'Colorado', 'USA');
|
| 13 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (3, '592 Frederique Ridge', 'Gilbertmouth', '167', 'Virginia', 'USA');
|
| 14 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (4, '01868 Laverna Green', 'Lake Floyd', '041', 'Oklahoma', 'USA');
|
| 15 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (5, '6017 Price Greens', 'Gibsonfurt', '873', 'District of Columbia', 'USA');
|
| 16 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (6, '037 Luella Path', 'North Jairo', '126', 'Maryland', 'USA');
|
| 17 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (7, '044 Greenfelder Fort', 'East Rickey', '564', 'Louisiana', 'USA');
|
| 18 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (8, '2676 Connelly Islands Apt. 199', 'West Kaiatown', '770', 'Oregon', 'USA');
|
| 19 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (9, '6830 Alexanne Forks Apt. 925', 'Agustinstad', '248', 'Illinois', 'USA');
|
| 20 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (10, '918 Lauren Drive', 'Gleasonland', '116', 'Kentucky', 'USA');
|
| 21 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (11, '70345 Marvin Glens Apt. 669', 'Lake Katheryn', '505', 'Kentucky', 'USA');
|
| 22 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (12, '65854 McKenzie Tunnel', 'North Lisandroport', '202', 'Maine', 'USA');
|
| 23 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (13, '494 Bruen Radial Apt. 723', 'Estaland', '381', 'Idaho', 'USA');
|
| 24 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (14, '794 Doyle Lake Apt. 531', 'West Muriel', '571', 'Vermont', 'USA');
|
| 25 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (15, '9590 Rogahn Point Apt. 466', 'Port Montytown', '037', 'SouthDakota', 'USA');
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
CREATE TABLE `Products` (
|
| 30 |
+
`product_id` INTEGER PRIMARY KEY,
|
| 31 |
+
`product_type_code` VARCHAR(15),
|
| 32 |
+
`product_name` VARCHAR(80),
|
| 33 |
+
`product_price` DOUBLE NULL
|
| 34 |
+
);
|
| 35 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (1, 'Hardware', 'Apple', '54753982.574522');
|
| 36 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (2, 'Clothes', 'jcrew', '30590929.528306');
|
| 37 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (3, 'Hardware', 'Apple', '10268.85297069');
|
| 38 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (4, 'Hardware', 'Apple', '22956668.699482');
|
| 39 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (5, 'Clothes', 'jcrew', '5927021.8748021');
|
| 40 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (6, 'Hardware', 'Apple', '77.109961147471');
|
| 41 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (7, 'Hardware', 'Apple', '450.39232520498');
|
| 42 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (8, 'Hardware', 'Sony', '4446237.9177554');
|
| 43 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (9, 'Clothes', 'jcrew', '622.79275984494');
|
| 44 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (10, 'Hardware', 'Sony', '7171.5933353284');
|
| 45 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (11, 'Clothes', 'jcrew', '149.95519076938');
|
| 46 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (12, 'Clothes', 'gucci', '593.80519929985');
|
| 47 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (13, 'Clothes', 'gucci', '11388.26282462');
|
| 48 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (14, 'Hardware', 'Sony', '389.91542644329');
|
| 49 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (15, 'Clothes', 'gucci', '310488248.48788');
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
CREATE TABLE `Customers` (
|
| 53 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 54 |
+
`payment_method_code` VARCHAR(15),
|
| 55 |
+
`customer_number` VARCHAR(20),
|
| 56 |
+
`customer_name` VARCHAR(80),
|
| 57 |
+
`customer_address` VARCHAR(255),
|
| 58 |
+
`customer_phone` VARCHAR(80),
|
| 59 |
+
`customer_email` VARCHAR(80)
|
| 60 |
+
);
|
| 61 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (1, 'Credit Card', '456', 'Kayley', '636 Chanelle Isle Apt. 846', '+87(9)5279161988', 'antonette73@example.com');
|
| 62 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (2, 'Credit Card', '553', 'Sterling', '12174 Boyer Crossroad', '896.685.8228x2786', 'stroman.chadd@example.net');
|
| 63 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (3, 'Credit Card', '951', 'Buford', '650 Spencer Way Apt. 584', '(192)144-4687', 'pattie.mayer@example.net');
|
| 64 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (4, 'Direct Debit', '497', 'Caterina', '075 Skiles Expressway', '387.053.1225', 'dbeahan@example.net');
|
| 65 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (5, 'Direct Debit', '752', 'Raymond', '8497 Huel Stravenue', '1-513-427-0125', 'bergnaum.ashton@example.com');
|
| 66 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (6, 'Direct Debit', '838', 'Cheyenne', '058 Ben Street Apt. 034', '009-136-4509x19635', 'rhayes@example.org');
|
| 67 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (7, 'Direct Debit', '429', 'Cecelia', '4065 Forest Vista Apt. 103', '672-559-0630x7875', 'caesar.lemke@example.net');
|
| 68 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (8, 'Credit Card', '564', 'Brenna', '440 Aiden Ports', '1-271-345-4681x1131', 'macy.huel@example.org');
|
| 69 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (9, 'Credit Card', '525', 'Lela', '13256 Valentina Valleys Suite 292', '838.718.8618x23239', 'vandervort.helena@example.org');
|
| 70 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (10, 'Credit Card', '795', 'Cleo', '91702 Hilpert Pines Suite 177', '1-202-928-5395', 'xrosenbaum@example.org');
|
| 71 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (11, 'Direct Debit', '233', 'Shany', '55270 Carter Street Apt. 214', '936.929.9929', 'kling.jesus@example.com');
|
| 72 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (12, 'Credit Card', '586', 'Madaline', '8428 Cecile Land Apt. 192', '097-514-4641', 'brady.ernser@example.net');
|
| 73 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (13, 'Direct Debit', '445', 'Melissa', '251 Botsford Harbors Suite 399', '529.148.1926', 'howard27@example.com');
|
| 74 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (14, 'Direct Debit', '735', 'Orion', '10823 Rollin Spur', '479-171-6355x66065', 'kip.abernathy@example.com');
|
| 75 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_number`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (15, 'Direct Debit', '523', 'Ottilie', '4098 Kreiger Knoll Suite 758', '393-750-2077x72779', 'morton06@example.net');
|
| 76 |
+
|
| 77 |
+
CREATE TABLE `Contacts` (
|
| 78 |
+
`contact_id` INTEGER PRIMARY KEY,
|
| 79 |
+
`customer_id` INTEGER NOT NULL,
|
| 80 |
+
`gender` VARCHAR(1),
|
| 81 |
+
`first_name` VARCHAR(80),
|
| 82 |
+
`last_name` VARCHAR(50),
|
| 83 |
+
`contact_phone` VARCHAR(80)
|
| 84 |
+
);
|
| 85 |
+
|
| 86 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (1, 4, 'male', 'Cierra', 'Collins', '+73(2)0854391820');
|
| 87 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (2, 6, 'male', 'Jennifer', 'Doyle', '482-949-1364x17500');
|
| 88 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (3, 8, 'female', 'Carli', 'Blick', '(608)868-5069x554');
|
| 89 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (4, 14, 'female', 'Gustave', 'Ebert', '00414184198');
|
| 90 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (5, 3, 'male', 'Danika', 'Bauch', '1-368-227-6322');
|
| 91 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (6, 9, 'female', 'Rachelle', 'Stamm', '048-342-0880x5170');
|
| 92 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (7, 10, 'male', 'Sid', 'Legros', '658.850.7946x9993');
|
| 93 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (8, 7, 'female', 'Adella', 'Streich', '1-613-226-7727');
|
| 94 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (9, 4, 'male', 'Etha', 'Raynor', '385-123-4556');
|
| 95 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (10, 15, 'female', 'Skye', 'Ratke', '+62(3)0497423927');
|
| 96 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (11, 10, 'female', 'Leif', 'Buckridge', '+96(5)1807022818');
|
| 97 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (12, 6, 'female', 'Shyann', 'Hills', '(842)564-7057x121');
|
| 98 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (13, 3, 'male', 'Darion', 'Leannon', '1-279-181-8737');
|
| 99 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (14, 8, 'female', 'Amani', 'Kunze', '405-058-1659');
|
| 100 |
+
INSERT INTO Contacts (`contact_id`, `customer_id`, `gender`, `first_name`, `last_name`, `contact_phone`) VALUES (15, 14, 'female', 'Hellen', 'Little', '136.724.5322');
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
CREATE TABLE `Customer_Address_History` (
|
| 104 |
+
`customer_id` INTEGER NOT NULL,
|
| 105 |
+
`address_id` INTEGER NOT NULL,
|
| 106 |
+
`date_from` DATETIME NOT NULL,
|
| 107 |
+
`date_to` DATETIME,
|
| 108 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),
|
| 109 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 110 |
+
);
|
| 111 |
+
CREATE TABLE `Customer_Orders` (
|
| 112 |
+
`order_id` INTEGER PRIMARY KEY,
|
| 113 |
+
`customer_id` INTEGER NOT NULL,
|
| 114 |
+
`order_date` DATETIME NOT NULL,
|
| 115 |
+
`order_status_code` VARCHAR(15),
|
| 116 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 117 |
+
);
|
| 118 |
+
|
| 119 |
+
CREATE TABLE `Order_Items` (
|
| 120 |
+
`order_item_id` INTEGER NOT NULL ,
|
| 121 |
+
`order_id` INTEGER NOT NULL,
|
| 122 |
+
`product_id` INTEGER NOT NULL,
|
| 123 |
+
`order_quantity` VARCHAR(80),
|
| 124 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),
|
| 125 |
+
FOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )
|
| 126 |
+
);
|
| 127 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (12, 7, '2015-07-23 14:37:18', '2018-03-07 12:04:20');
|
| 128 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (12, 2, '2016-11-06 14:33:12', '2018-03-14 21:36:28');
|
| 129 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (3, 9, '2011-11-19 12:17:36', '2018-03-22 10:20:16');
|
| 130 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (13, 15, '2009-02-16 23:04:20', '2018-03-07 17:47:47');
|
| 131 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (3, 12, '2008-06-22 21:50:44', '2018-03-13 00:08:29');
|
| 132 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (11, 10, '2012-04-09 18:10:36', '2018-03-11 20:16:56');
|
| 133 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (11, 10, '2014-11-17 15:11:26', '2018-03-08 23:31:30');
|
| 134 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (2, 13, '2011-01-02 21:42:29', '2018-02-25 19:55:00');
|
| 135 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (13, 11, '2015-05-01 12:44:46', '2018-03-24 06:20:36');
|
| 136 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (12, 3, '2011-06-02 02:53:28', '2018-03-10 00:47:18');
|
| 137 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (6, 1, '2013-06-14 23:07:04', '2018-03-16 14:49:28');
|
| 138 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (14, 12, '2008-10-13 04:37:27', '2018-03-19 10:10:53');
|
| 139 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (13, 5, '2012-03-16 17:42:30', '2018-02-27 07:31:19');
|
| 140 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (7, 13, '2012-11-19 09:20:49', '2018-03-11 20:11:21');
|
| 141 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (7, 3, '2012-11-09 07:15:16', '2018-03-09 12:03:31');
|
| 142 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (2, 4, '2011-11-02 17:31:41', '2018-03-07 05:29:10');
|
| 143 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (9, 13, '2010-03-25 08:23:20', '2018-03-09 16:41:55');
|
| 144 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (6, 12, '2017-10-25 07:35:59', '2018-03-11 21:40:52');
|
| 145 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (7, 3, '2009-05-22 04:42:28', '2018-03-18 11:13:27');
|
| 146 |
+
INSERT INTO Customer_Address_History (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (12, 9, '2016-12-23 04:42:07', '2018-03-20 01:13:38');
|
| 147 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (1, 2, '2009-07-19 13:40:49', 'Completed');
|
| 148 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (2, 2, '1976-05-28 15:02:44', 'Part');
|
| 149 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (3, 6, '1979-03-29 02:47:13', 'Completed');
|
| 150 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (4, 4, '2003-01-17 00:06:12', 'Part');
|
| 151 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (5, 13, '1992-04-19 21:42:58', 'Completed');
|
| 152 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (6, 4, '1972-03-17 21:42:29', 'Part');
|
| 153 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (7, 10, '2002-01-20 01:52:53', 'Part');
|
| 154 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (8, 2, '1985-01-03 05:22:09', 'Part');
|
| 155 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (9, 9, '2016-09-17 03:00:47', 'Completed');
|
| 156 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (10, 5, '1971-12-04 19:14:18', 'Completed');
|
| 157 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (11, 10, '1993-05-08 14:12:06', 'Completed');
|
| 158 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (12, 10, '1998-06-14 21:22:53', 'Completed');
|
| 159 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (13, 9, '1997-08-02 09:44:57', 'Part');
|
| 160 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (14, 3, '1979-07-13 17:19:40', 'Part');
|
| 161 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_date`, `order_status_code`) VALUES (15, 1, '2007-01-19 07:54:50', 'Completed');
|
| 162 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (1, 9, 15, '3');
|
| 163 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (2, 8, 12, '7');
|
| 164 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (3, 11, 9, '9');
|
| 165 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (4, 15, 2, 'male');
|
| 166 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (5, 13, 3, '3');
|
| 167 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (6, 3, 6, '4');
|
| 168 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (7, 7, 4, '8');
|
| 169 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (8, 6, 2, '7');
|
| 170 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (9, 3, 15, '2');
|
| 171 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (10, 4, 12, '5');
|
| 172 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (11, 14, 11, '8');
|
| 173 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (12, 6, 2, '7');
|
| 174 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (13, 7, 5, '9');
|
| 175 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (14, 5, 13, '4');
|
| 176 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`, `order_quantity`) VALUES (15, 7, 3, '8');
|
database/customers_card_transactions/schema.sql
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE `Accounts` (
|
| 4 |
+
`account_id` INTEGER PRIMARY KEY,
|
| 5 |
+
`customer_id` INTEGER NOT NULL,
|
| 6 |
+
`account_name` VARCHAR(50),
|
| 7 |
+
`other_account_details` VARCHAR(255)
|
| 8 |
+
);
|
| 9 |
+
CREATE TABLE `Customers` (
|
| 10 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 11 |
+
`customer_first_name` VARCHAR(20),
|
| 12 |
+
`customer_last_name` VARCHAR(20),
|
| 13 |
+
`customer_address` VARCHAR(255),
|
| 14 |
+
`customer_phone` VARCHAR(255),
|
| 15 |
+
`customer_email` VARCHAR(255),
|
| 16 |
+
`other_customer_details` VARCHAR(255)
|
| 17 |
+
);
|
| 18 |
+
CREATE TABLE `Customers_Cards` (
|
| 19 |
+
`card_id` INTEGER PRIMARY KEY,
|
| 20 |
+
`customer_id` INTEGER NOT NULL,
|
| 21 |
+
`card_type_code` VARCHAR(15) NOT NULL,
|
| 22 |
+
`card_number` VARCHAR(80),
|
| 23 |
+
`date_valid_from` DATETIME,
|
| 24 |
+
`date_valid_to` DATETIME,
|
| 25 |
+
`other_card_details` VARCHAR(255)
|
| 26 |
+
);
|
| 27 |
+
CREATE TABLE `Financial_Transactions` (
|
| 28 |
+
`transaction_id` INTEGER NOT NULL ,
|
| 29 |
+
`previous_transaction_id` INTEGER,
|
| 30 |
+
`account_id` INTEGER NOT NULL,
|
| 31 |
+
`card_id` INTEGER NOT NULL,
|
| 32 |
+
`transaction_type` VARCHAR(15) NOT NULL,
|
| 33 |
+
`transaction_date` DATETIME,
|
| 34 |
+
`transaction_amount` DOUBLE NULL,
|
| 35 |
+
`transaction_comment` VARCHAR(255),
|
| 36 |
+
`other_transaction_details` VARCHAR(255),
|
| 37 |
+
FOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),
|
| 38 |
+
FOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )
|
| 39 |
+
);
|
| 40 |
+
|
| 41 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (1, 6, '338', 'Regular');
|
| 42 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (2, 14, '562', 'VIP');
|
| 43 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (3, 9, '162', 'VIP');
|
| 44 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (4, 12, '038', 'Regular');
|
| 45 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (5, 13, '858', 'Regular');
|
| 46 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (6, 12, '262', 'Regular');
|
| 47 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (7, 9, '621', 'Regular');
|
| 48 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (8, 8, '381', 'Regular');
|
| 49 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (9, 9, '546', 'Regular');
|
| 50 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (10, 4, '767', 'VIP');
|
| 51 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (11, 4, '022', 'VIP');
|
| 52 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (12, 2, '866', 'VIP');
|
| 53 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (13, 10, '234', 'VIP');
|
| 54 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (14, 9, '557', 'VIP');
|
| 55 |
+
INSERT INTO Accounts (`account_id`, `customer_id`, `account_name`, `other_account_details`) VALUES (15, 4, '725', 'VIP');
|
| 56 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (1, 'Aniyah', 'Feest', '55975 Theodore Estates
|
| 57 |
+
Lake Brody, VT 57078', '(673)872-5338', 'fahey.dorian@example.com', NULL);
|
| 58 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (2, 'Susie', 'Wiza', '6478 Moen Isle Suite 910
|
| 59 |
+
Schimmelmouth, VT 96364-4898', '679-845-8645x94312', 'idickinson@example.com', NULL);
|
| 60 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (3, 'Marcel', 'Brekke', '1965 Abernathy Plains
|
| 61 |
+
Port Lilla, LA 44867', '1-511-656-6664', 'nichole.rodriguez@example.com', NULL);
|
| 62 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (4, 'Art', 'Turcotte', '6862 Domenic Port
|
| 63 |
+
New Elbert, DE 86980-8517', '941-213-6716x675', 'enrique59@example.com', NULL);
|
| 64 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (5, 'Armani', 'Farrell', '3031 Ludwig Square
|
| 65 |
+
Unaview, SC 86336-3287', '224-123-1012', 'dauer@example.net', NULL);
|
| 66 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (6, 'Kiel', 'Schinner', '19935 Allie Bypass Apt. 409
|
| 67 |
+
Coleberg, FL 69194-5357', '1-564-044-3909', 'ebert.omer@example.net', NULL);
|
| 68 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (7, 'Izabella', 'Erdman', '23793 Athena Inlet Apt. 455
|
| 69 |
+
Schmidtmouth, NH 15794', '751.049.9948', 'kling.catalina@example.com', NULL);
|
| 70 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (8, 'Elyssa', 'Lind', '094 Julianne Mill
|
| 71 |
+
Webstertown, KY 91980-4004', '+12(6)9024410984', 'dell13@example.com', NULL);
|
| 72 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (9, 'Faustino', 'Langworth', '0748 Lola Union Apt. 874
|
| 73 |
+
Reynoldsfurt, NM 94584-3767', '284.749.0453', 'ahomenick@example.org', NULL);
|
| 74 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (10, 'Axel', 'Effertz', '936 Lula Overpass
|
| 75 |
+
East Alisonville, NH 14890', '+90(8)1290735932', 'kyra.murazik@example.org', NULL);
|
| 76 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (11, 'Frederic', 'Swift', '7127 Hilpert Parks
|
| 77 |
+
South Johnfort, SD 67577-9504', '1-207-977-5182', 'keegan16@example.com', NULL);
|
| 78 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (12, 'Bryce', 'Rath', '74962 Hugh Mills
|
| 79 |
+
North Laurenland, KY 46376', '(415)237-0701x3115', 'grady.general@example.org', NULL);
|
| 80 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (13, 'Serenity', 'Effertz', '71560 Eulah Squares
|
| 81 |
+
Torphyberg, OK 34312-0380', '1-894-567-2283', 'schaden.katrina@example.net', NULL);
|
| 82 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (14, 'Blanche', 'Huels', '47286 Mraz Park Apt. 424
|
| 83 |
+
Jocelynfurt, OH 59023-2787', '(703)950-4708x8972', 'huels.antonina@example.com', NULL);
|
| 84 |
+
INSERT INTO Customers (`customer_id`, `customer_first_name`, `customer_last_name`, `customer_address`, `customer_phone`, `customer_email`, `other_customer_details`) VALUES (15, 'Nat', 'Davis', '163 Collier Square
|
| 85 |
+
New Ceciltown, AL 64723-5646', '246-469-4472x359', 'earlene.carroll@example.net', NULL);
|
| 86 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (1, 14, 'Credit', '4560596484842', '2011-04-17 09:05:28', '2018-03-07 17:06:19', '5567915676420343');
|
| 87 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (2, 9, 'Credit', '4859448397570735', '2012-05-22 02:05:41', '2018-02-25 15:43:32', '4539333582760');
|
| 88 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (3, 6, 'Debit', '348237249146948', '2014-08-01 14:26:45', '2018-03-24 15:29:00', '4916210554814');
|
| 89 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (4, 15, 'Credit', '4485460762694', '2009-11-05 09:26:01', '2018-03-19 05:34:08', '5296134475180061');
|
| 90 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (5, 13, 'Credit', '5122249720639438', '2015-12-21 22:07:49', '2018-03-22 08:31:28', '5388642773088467');
|
| 91 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (6, 10, 'Debit', '5102229294602335', '2017-01-01 13:34:04', '2018-03-11 01:12:33', '5513587359761653');
|
| 92 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (7, 9, 'Credit', '4716674779726', '2016-12-11 03:01:12', '2018-03-15 06:27:45', '6011771512810699');
|
| 93 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (8, 12, 'Credit', '6011225247353230', '2016-09-17 13:31:05', '2018-03-24 00:38:54', '5428692691195935');
|
| 94 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (9, 3, 'Debit', '4929590358481', '2015-03-27 02:01:12', '2018-03-12 02:16:45', '5307019264041461');
|
| 95 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (10, 10, 'Debit', '4532488235104', '2011-06-15 23:10:10', '2018-03-17 21:27:32', '5571147786750739');
|
| 96 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (11, 8, 'Debit', '4707949584519', '2013-11-17 02:58:22', '2018-03-14 14:00:07', '377852690396160');
|
| 97 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (12, 3, 'Debit', '4929896676202959', '2015-05-09 04:05:26', '2018-03-16 16:00:19', '4556142375374');
|
| 98 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (13, 2, 'Credit', '5484846021884483', '2008-08-20 17:59:51', '2018-03-20 02:08:02', '4916493714393');
|
| 99 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (14, 5, 'Debit', '4929384762825', '2013-05-23 07:55:36', '2018-03-11 06:05:44', '4485258248930151');
|
| 100 |
+
INSERT INTO Customers_Cards (`card_id`, `customer_id`, `card_type_code`, `card_number`, `date_valid_from`, `date_valid_to`, `other_card_details`) VALUES (15, 2, 'Debit', '345475370003028', '2014-07-03 20:19:31', '2018-02-28 22:26:31', '4716851737494984');
|
| 101 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (1, 925, 15, 1, 'Payment', '2018-03-24 06:41:41', '1701.23', NULL, NULL);
|
| 102 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (2, 494, 3, 2, 'Refund', '2018-03-24 12:08:55', '1931.76', NULL, NULL);
|
| 103 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (3, 642, 4, 3, 'Payment', '2018-03-24 09:08:27', '486.56', NULL, NULL);
|
| 104 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (4, 457, 15, 4, 'Refund', '2018-03-23 21:59:28', '1336.21', NULL, NULL);
|
| 105 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (5, 947, 13, 5, 'Refund', '2018-03-23 21:43:32', '357.06', NULL, NULL);
|
| 106 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (6, 958, 12, 6, 'Refund', '2018-03-24 11:48:28', '1967.75', NULL, NULL);
|
| 107 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (7, 368, 1, 6, 'Refund', '2018-03-24 05:13:42', '1483.05', NULL, NULL);
|
| 108 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (8, 924, 6, 7, 'Refund', '2018-03-24 14:47:05', '1194.48', NULL, NULL);
|
| 109 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (9, 296, 9, 6, 'Payment', '2018-03-24 05:31:43', '1475.56', NULL, NULL);
|
| 110 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (10, 495, 5, 7, 'Payment', '2018-03-24 05:45:57', '1795.66', NULL, NULL);
|
| 111 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (11, 333, 11, 7, 'Refund', '2018-03-24 10:39:09', '462.63', NULL, NULL);
|
| 112 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (12, 986, 10, 9, 'Payment', '2018-03-24 15:17:49', '1658.32', NULL, NULL);
|
| 113 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (13, 885, 14, 11, 'Refund', '2018-03-24 17:00:41', '1298.73', NULL, NULL);
|
| 114 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (14, 965, 10, 12, 'Refund', '2018-03-24 16:31:34', '945.43', NULL, NULL);
|
| 115 |
+
INSERT INTO Financial_Transactions (`transaction_id`, `previous_transaction_id`, `account_id`, `card_id`, `transaction_type`, `transaction_date`, `transaction_amount`, `transaction_comment`, `other_transaction_details`) VALUES (15, 203, 8, 12, 'Payment', '2018-03-24 10:48:34', '1529.97', NULL, NULL);
|
database/debate/schema.sql
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
PRAGMA foreign_keys = ON;
|
| 3 |
+
|
| 4 |
+
CREATE TABLE "people" (
|
| 5 |
+
"People_ID" int,
|
| 6 |
+
"District" text,
|
| 7 |
+
"Name" text,
|
| 8 |
+
"Party" text,
|
| 9 |
+
"Age" int,
|
| 10 |
+
PRIMARY KEY ("People_ID")
|
| 11 |
+
);
|
| 12 |
+
|
| 13 |
+
CREATE TABLE "debate" (
|
| 14 |
+
"Debate_ID" int,
|
| 15 |
+
"Date" text,
|
| 16 |
+
"Venue" text,
|
| 17 |
+
"Num_of_Audience" int,
|
| 18 |
+
PRIMARY KEY ("Debate_ID")
|
| 19 |
+
);
|
| 20 |
+
|
| 21 |
+
INSERT INTO "people" VALUES (1,"New York 1","Luther C. Carter","Republican",35);
|
| 22 |
+
INSERT INTO "people" VALUES (2,"New York 2","James Humphrey","Republican",38);
|
| 23 |
+
INSERT INTO "people" VALUES (3,"New York 3","Daniel Sickles","Democratic",46);
|
| 24 |
+
INSERT INTO "people" VALUES (4,"New York 4","Thomas J. Barr","Independent Democrat",48);
|
| 25 |
+
INSERT INTO "people" VALUES (5,"New York 5","William B. Maclay","Democratic",36);
|
| 26 |
+
INSERT INTO "people" VALUES (6,"New York 6","John Cochrane","Democratic",46);
|
| 27 |
+
INSERT INTO "people" VALUES (7,"New York 7","George Briggs","Republican",42);
|
| 28 |
+
INSERT INTO "people" VALUES (8,"New York 8","Horace F. Clark","Anti-Lecompton Democrat",45);
|
| 29 |
+
INSERT INTO "people" VALUES (9,"New York 9","John B. Haskin","Anti-Lecompton Democrat",43);
|
| 30 |
+
INSERT INTO "people" VALUES (10,"New York 10","Charles Van Wyck","Republican",36);
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
INSERT INTO "debate" VALUES (1,"October 21, 2011","Manama , Bahrain",342);
|
| 35 |
+
INSERT INTO "debate" VALUES (2,"December 17, 2014","Doha , Qatar",134);
|
| 36 |
+
INSERT INTO "debate" VALUES (3,"August 3, 2015","Manama , Bahrain",90);
|
| 37 |
+
INSERT INTO "debate" VALUES (4,"October 27, 2015","Manama , Bahrain",209);
|
| 38 |
+
INSERT INTO "debate" VALUES (5,"January 12, 2017","Dubai , UAE",313);
|
| 39 |
+
INSERT INTO "debate" VALUES (6,"January 21, 2017","Abu Dhabi , UAE",159);
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
CREATE TABLE "debate_people" (
|
| 45 |
+
"Debate_ID" int,
|
| 46 |
+
"Affirmative" int,
|
| 47 |
+
"Negative" int,
|
| 48 |
+
"If_Affirmative_Win" bool,
|
| 49 |
+
PRIMARY KEY ("Debate_ID","Affirmative","Negative"),
|
| 50 |
+
FOREIGN KEY ("Debate_ID") REFERENCES `debate`("Debate_ID"),
|
| 51 |
+
FOREIGN KEY ("Affirmative") REFERENCES `people`("People_ID"),
|
| 52 |
+
FOREIGN KEY ("Negative") REFERENCES `people`("People_ID")
|
| 53 |
+
);
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
INSERT INTO "debate_people" VALUES (1,1,10,"F");
|
| 57 |
+
INSERT INTO "debate_people" VALUES (5,2,8,"F");
|
| 58 |
+
INSERT INTO "debate_people" VALUES (3,4,7,"T");
|
| 59 |
+
INSERT INTO "debate_people" VALUES (6,5,6,"T");
|
| 60 |
+
INSERT INTO "debate_people" VALUES (4,5,8,"F");
|
database/decoration_competition/decoration_competition.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/decoration_competition/schema.sql
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "college" (
|
| 4 |
+
"College_ID" int,
|
| 5 |
+
"Name" text,
|
| 6 |
+
"Leader_Name" text,
|
| 7 |
+
"College_Location" text,
|
| 8 |
+
PRIMARY KEY ("College_ID")
|
| 9 |
+
);
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
INSERT INTO "college" VALUES ("1","Saskatchewan School","Ousame Tounkara","Ottawa");
|
| 14 |
+
INSERT INTO "college" VALUES ("2","B.C. School","Ryan Thelwell","Minnesota");
|
| 15 |
+
INSERT INTO "college" VALUES ("3","Calgary School","Andre Arlain","St. Francis Xavier");
|
| 16 |
+
INSERT INTO "college" VALUES ("4","Edmonton School","Samir Chahine","McGill");
|
| 17 |
+
INSERT INTO "college" VALUES ("5","Toronto School","Roger Dunbrack","Western Ontario");
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
CREATE TABLE "member" (
|
| 21 |
+
"Member_ID" int,
|
| 22 |
+
"Name" text,
|
| 23 |
+
"Country" text,
|
| 24 |
+
"College_ID" int,
|
| 25 |
+
PRIMARY KEY ("Member_ID"),
|
| 26 |
+
FOREIGN KEY ("College_ID") REFERENCES `college`("College_ID")
|
| 27 |
+
);
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
INSERT INTO "member" VALUES ("1","Jack Nicklaus","United States",1);
|
| 31 |
+
INSERT INTO "member" VALUES ("2","Billy Casper","United States",1);
|
| 32 |
+
INSERT INTO "member" VALUES ("3","Arnold Palmer","Canada",4);
|
| 33 |
+
INSERT INTO "member" VALUES ("4","Tom Watson","United States",4);
|
| 34 |
+
INSERT INTO "member" VALUES ("5","Homero Blancas","United States",2);
|
| 35 |
+
INSERT INTO "member" VALUES ("6","Pat Fitzsimons","Canada",5);
|
| 36 |
+
INSERT INTO "member" VALUES ("7","Bobby Nichols","Canada",5);
|
| 37 |
+
INSERT INTO "member" VALUES ("8","J. C. Snead","Canada",4);
|
| 38 |
+
INSERT INTO "member" VALUES ("9","Lee Trevino","United States",3);
|
| 39 |
+
INSERT INTO "member" VALUES ("10","Tom Weiskopf","United States",3);
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
CREATE TABLE "round" (
|
| 43 |
+
"Round_ID" int,
|
| 44 |
+
"Member_ID" int,
|
| 45 |
+
"Decoration_Theme" text,
|
| 46 |
+
"Rank_in_Round" int,
|
| 47 |
+
PRIMARY KEY ("Member_ID","Round_ID"),
|
| 48 |
+
FOREIGN KEY ("Member_ID") REFERENCES "member"("Member_ID")
|
| 49 |
+
);
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
INSERT INTO "round" VALUES (1,1,"Walk on the Moon",1);
|
| 53 |
+
INSERT INTO "round" VALUES (1,2,"Soft Dream",2);
|
| 54 |
+
INSERT INTO "round" VALUES (1,10,"Dark Nights",4);
|
| 55 |
+
INSERT INTO "round" VALUES (2,4,"Sweetie",3);
|
| 56 |
+
INSERT INTO "round" VALUES (2,6,"Summer",2);
|
| 57 |
+
INSERT INTO "round" VALUES (2,9,"Happiness",1);
|
| 58 |
+
|
database/department_store/department_store.sqlite
ADDED
|
Binary file (86 kB). View file
|
|
|
database/department_store/schema.sql
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
CREATE TABLE `Addresses` (
|
| 3 |
+
`address_id` INTEGER PRIMARY KEY,
|
| 4 |
+
`address_details` VARCHAR(255)
|
| 5 |
+
);
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (1, '28481 Crist Circle
|
| 9 |
+
East Burdettestad, IA 21232');
|
| 10 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (2, '0292 Mitchel Pike
|
| 11 |
+
Port Abefurt, IA 84402-4249');
|
| 12 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (3, '4062 Mante Place
|
| 13 |
+
West Lindsey, DE 76199-8015');
|
| 14 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (4, '99666 Julie Junction
|
| 15 |
+
Marvinburgh, OH 16085-1623');
|
| 16 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (5, '195 Mara Rue
|
| 17 |
+
Jenkinsmouth, OK 22345');
|
| 18 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (6, '11784 Stehr Road
|
| 19 |
+
Port Isaac, NV 61159');
|
| 20 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (7, '69482 Renner Ville Suite 653
|
| 21 |
+
Langworthborough, OH 95195');
|
| 22 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (8, '36594 O''Keefe Lock
|
| 23 |
+
New Cali, RI 42319');
|
| 24 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (9, '7181 Wuckert Port Apt. 571
|
| 25 |
+
Lake Zariaburgh, IL 98085');
|
| 26 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (10, '92594 Marvin Trafficway
|
| 27 |
+
Pourosfurt, IA 98649');
|
| 28 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (11, '0258 Kessler Mountains Suite 688
|
| 29 |
+
Mooreside, ME 41586-5022');
|
| 30 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (12, '69275 Mose Drive
|
| 31 |
+
Wilkinsonstad, CO 79055-7622');
|
| 32 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (13, '8207 Morissette Lakes
|
| 33 |
+
East Rheaview, ID 47493');
|
| 34 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (14, '145 Alice Corners
|
| 35 |
+
Willmsport, NV 36680');
|
| 36 |
+
INSERT INTO Addresses (`address_id`, `address_details`) VALUES (15, '521 Molly Harbors Apt. 567
|
| 37 |
+
Reingerland, HI 97099-1005');
|
| 38 |
+
|
| 39 |
+
CREATE TABLE `Staff` (
|
| 40 |
+
`staff_id` INTEGER PRIMARY KEY,
|
| 41 |
+
`staff_gender` VARCHAR(1),
|
| 42 |
+
`staff_name` VARCHAR(80)
|
| 43 |
+
);
|
| 44 |
+
|
| 45 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (1, '1', 'Tom');
|
| 46 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (2, '1', 'Malika');
|
| 47 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (3, '1', 'Katelynn');
|
| 48 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (4, '1', 'Vanessa');
|
| 49 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (5, '0', 'Maximus');
|
| 50 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (6, '1', 'Tyson');
|
| 51 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (7, '1', 'Yolanda');
|
| 52 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (8, '1', 'Vito');
|
| 53 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (9, '1', 'Zakary');
|
| 54 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (10, '1', 'Sabrina');
|
| 55 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (11, '1', 'Dannie');
|
| 56 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (12, '1', 'Melody');
|
| 57 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (13, '1', 'Archibald');
|
| 58 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (14, '1', 'Adrienne');
|
| 59 |
+
INSERT INTO Staff (`staff_id`, `staff_gender`, `staff_name`) VALUES (15, '1', 'Kristy');
|
| 60 |
+
|
| 61 |
+
CREATE TABLE `Suppliers` (
|
| 62 |
+
`supplier_id` INTEGER PRIMARY KEY,
|
| 63 |
+
`supplier_name` VARCHAR(80),
|
| 64 |
+
`supplier_phone` VARCHAR(80)
|
| 65 |
+
);
|
| 66 |
+
|
| 67 |
+
INSERT INTO Suppliers (`supplier_id`, `supplier_name`, `supplier_phone`) VALUES (1, 'Lidl', '(692)009-5928');
|
| 68 |
+
INSERT INTO Suppliers (`supplier_id`, `supplier_name`, `supplier_phone`) VALUES (2, 'AB Store', '1-483-283-4742');
|
| 69 |
+
INSERT INTO Suppliers (`supplier_id`, `supplier_name`, `supplier_phone`) VALUES (3, 'Tesco', '287-071-1153x254');
|
| 70 |
+
INSERT INTO Suppliers (`supplier_id`, `supplier_name`, `supplier_phone`) VALUES (4, 'Audi', '1-432-960-2402x1734');
|
| 71 |
+
|
| 72 |
+
CREATE TABLE `Department_Store_Chain` (
|
| 73 |
+
`dept_store_chain_id` INTEGER PRIMARY KEY,
|
| 74 |
+
`dept_store_chain_name` VARCHAR(80)
|
| 75 |
+
);
|
| 76 |
+
|
| 77 |
+
INSERT INTO Department_Store_Chain (`dept_store_chain_id`, `dept_store_chain_name`) VALUES (1, 'South');
|
| 78 |
+
INSERT INTO Department_Store_Chain (`dept_store_chain_id`, `dept_store_chain_name`) VALUES (2, 'West');
|
| 79 |
+
INSERT INTO Department_Store_Chain (`dept_store_chain_id`, `dept_store_chain_name`) VALUES (3, 'East');
|
| 80 |
+
INSERT INTO Department_Store_Chain (`dept_store_chain_id`, `dept_store_chain_name`) VALUES (4, 'North');
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
CREATE TABLE `Customers` (
|
| 84 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 85 |
+
`payment_method_code` VARCHAR(10) NOT NULL,
|
| 86 |
+
`customer_code` VARCHAR(20),
|
| 87 |
+
`customer_name` VARCHAR(80),
|
| 88 |
+
`customer_address` VARCHAR(255),
|
| 89 |
+
`customer_phone` VARCHAR(80),
|
| 90 |
+
`customer_email` VARCHAR(80)
|
| 91 |
+
);
|
| 92 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (1, 'Credit Card', '401', 'Ahmed', '75099 Tremblay Port Apt. 163
|
| 93 |
+
South Norrisland, SC 80546', '254-072-4068x33935', 'margarett.vonrueden@example.com');
|
| 94 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (2, 'Credit Card', '665', 'Chauncey', '8408 Lindsay Court
|
| 95 |
+
East Dasiabury, IL 72656-3552', '+41(8)1897032009', 'stiedemann.sigrid@example.com');
|
| 96 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (3, 'Direct Debit', '844', 'Lukas', '7162 Rodolfo Knoll Apt. 502
|
| 97 |
+
Lake Annalise, TN 35791-8871', '197-417-3557', 'joelle.monahan@example.com');
|
| 98 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (4, 'Direct Debit', '662', 'Lexus', '9581 Will Flat Suite 272
|
| 99 |
+
East Cathryn, WY 30751-4404', '+08(3)8056580281', 'gbrekke@example.com');
|
| 100 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (5, 'Credit Card', '848', 'Tara', '5065 Mraz Fields Apt. 041
|
| 101 |
+
East Chris, NH 41624', '1-064-498-6609x051', 'nicholas44@example.com');
|
| 102 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (6, 'Credit Card', '916', 'Jon', '841 Goyette Unions
|
| 103 |
+
South Dionbury, NC 62021', '(443)013-3112x528', 'cconroy@example.net');
|
| 104 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (7, 'Credit Card', '172', 'Cristobal', '8327 Christiansen Lakes Suite 409
|
| 105 |
+
Schneiderland, IA 93624', '877-150-8674x63517', 'shawna.cummerata@example.net');
|
| 106 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (8, 'Direct Debit', '927', 'Adah', '5049 Hand Land
|
| 107 |
+
Coymouth, IL 97300-7731', '1-695-364-7586x59256', 'kathlyn24@example.org');
|
| 108 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (9, 'Credit Card', '808', 'Yasmeen', '3558 Witting Meadow Apt. 483
|
| 109 |
+
Lake Moriahbury, OH 91556-2122', '587.398.2400x31176', 'ludwig54@example.net');
|
| 110 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (10, 'Credit Card', '887', 'Karson', '7308 Joan Lake Suite 346
|
| 111 |
+
Lizethtown, DE 56522', '857-844-9339x40140', 'moriah91@example.com');
|
| 112 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (11, 'Direct Debit', '611', 'Cordell', '362 Fisher Forge Apt. 900
|
| 113 |
+
New Mckenna, CA 98525-5674', '(730)934-8249', 'qstokes@example.org');
|
| 114 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (12, 'Credit Card', '182', 'Darron', '84445 Elinor Glens
|
| 115 |
+
Port Zita, SD 39410', '117.822.3577', 'gwisozk@example.net');
|
| 116 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (13, 'Credit Card', '589', 'Kenya', '338 Floy Mountains Suite 589
|
| 117 |
+
Yesseniaville, TN 60847', '08023680831', 'maxime86@example.net');
|
| 118 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (14, 'Direct Debit', '240', 'Abbie', '983 Elinore Passage
|
| 119 |
+
Darrionborough, SC 53915-0479', '07594320656', 'celine.bogan@example.com');
|
| 120 |
+
INSERT INTO Customers (`customer_id`, `payment_method_code`, `customer_code`, `customer_name`, `customer_address`, `customer_phone`, `customer_email`) VALUES (15, 'Credit Card', '980', 'Lyric', '649 Ocie Lights
|
| 121 |
+
Wyatttown, UT 12697', '1-472-036-0434', 'schultz.arnoldo@example.net');
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
CREATE TABLE `Products` (
|
| 125 |
+
`product_id` INTEGER PRIMARY KEY,
|
| 126 |
+
`product_type_code` VARCHAR(10) NOT NULL,
|
| 127 |
+
`product_name` VARCHAR(80),
|
| 128 |
+
`product_price` DECIMAL(19,4)
|
| 129 |
+
);
|
| 130 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (1, 'Clothes', 'red jeans', '734.7300');
|
| 131 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (2, 'Clothes', 'yellow jeans', '687.2300');
|
| 132 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (3, 'Clothes', 'black jeans', '695.1600');
|
| 133 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (4, 'Clothes', 'blue jeans', '939.5700');
|
| 134 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (5, 'Clothes', 'red jeans', '534.5200');
|
| 135 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (6, 'Clothes', 'red topping', '408.8200');
|
| 136 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (7, 'Clothes', 'black topping', '916.5300');
|
| 137 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (8, 'Clothes', 'yellow topping', '918.4100');
|
| 138 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (9, 'Clothes', 'blue topping', '604.8600');
|
| 139 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (10, 'Hardware', 'monitor', '813.7600');
|
| 140 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (11, 'Hardware', 'mouse', '803.7400');
|
| 141 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (12, 'Hardware', 'drive', '944.9600');
|
| 142 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (13, 'Hardware', 'keyboard', '629.8900');
|
| 143 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (14, 'Hardware', 'speaker', '612.4600');
|
| 144 |
+
INSERT INTO Products (`product_id`, `product_type_code`, `product_name`, `product_price`) VALUES (15, 'Hardware', 'mic', '971.4400');
|
| 145 |
+
|
| 146 |
+
CREATE TABLE `Supplier_Addresses` (
|
| 147 |
+
`supplier_id` INTEGER NOT NULL,
|
| 148 |
+
`address_id` INTEGER NOT NULL,
|
| 149 |
+
`date_from` DATETIME NOT NULL,
|
| 150 |
+
`date_to` DATETIME,
|
| 151 |
+
PRIMARY KEY (`supplier_id`, `address_id`),
|
| 152 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),
|
| 153 |
+
FOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )
|
| 154 |
+
);
|
| 155 |
+
|
| 156 |
+
INSERT INTO Supplier_Addresses (`supplier_id`, `address_id`, `date_from`, `date_to`) VALUES (4, 5, '2016-09-22 16:41:31', '2018-03-14 20:06:37');
|
| 157 |
+
INSERT INTO Supplier_Addresses (`supplier_id`, `address_id`, `date_from`, `date_to`) VALUES (3, 9, '2014-11-07 19:18:49', '2018-03-16 16:39:58');
|
| 158 |
+
INSERT INTO Supplier_Addresses (`supplier_id`, `address_id`, `date_from`, `date_to`) VALUES (3, 2, '2008-11-22 12:01:25', '2018-03-02 19:50:22');
|
| 159 |
+
INSERT INTO Supplier_Addresses (`supplier_id`, `address_id`, `date_from`, `date_to`) VALUES (2, 11, '2015-03-16 19:30:29', '2018-03-24 00:14:45');
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
CREATE TABLE `Customer_Addresses` (
|
| 163 |
+
`customer_id` INTEGER NOT NULL,
|
| 164 |
+
`address_id` INTEGER NOT NULL,
|
| 165 |
+
`date_from` DATETIME NOT NULL,
|
| 166 |
+
`date_to` DATETIME,
|
| 167 |
+
PRIMARY KEY (`customer_id`, `address_id`),
|
| 168 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),
|
| 169 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 170 |
+
);
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (2, 9, '2017-12-11 05:00:22', '2018-03-20 20:52:34');
|
| 174 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (1, 6, '2017-10-07 23:00:26', '2018-02-28 14:53:52');
|
| 175 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (10, 8, '2017-04-04 20:00:27', '2018-02-27 20:08:33');
|
| 176 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (1, 9, '2017-12-14 07:40:08', '2018-03-24 14:31:59');
|
| 177 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (1, 2, '2017-07-31 20:18:52', '2018-03-12 05:32:28');
|
| 178 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (8, 2, '2018-01-27 06:27:34', '2018-03-23 17:49:51');
|
| 179 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (1, 14, '2017-08-06 20:57:36', '2018-03-05 21:19:53');
|
| 180 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (6, 13, '2017-09-07 04:41:01', '2018-02-27 23:10:07');
|
| 181 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (7, 7, '2017-10-02 19:56:27', '2018-03-22 17:22:34');
|
| 182 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (8, 4, '2018-01-15 12:05:39', '2018-03-13 21:49:51');
|
| 183 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (7, 4, '2018-02-22 04:46:48', '2018-02-26 00:52:25');
|
| 184 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (2, 4, '2017-11-28 23:36:20', '2018-03-02 17:46:11');
|
| 185 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (12, 14, '2017-11-01 04:21:41', '2018-03-05 16:18:34');
|
| 186 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (7, 10, '2018-01-07 13:31:08', '2018-03-09 07:06:56');
|
| 187 |
+
INSERT INTO Customer_Addresses (`customer_id`, `address_id`, `date_from`, `date_to`) VALUES (4, 12, '2017-08-27 13:38:37', '2018-03-17 15:44:10');
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
CREATE TABLE `Customer_Orders` (
|
| 192 |
+
`order_id` INTEGER PRIMARY KEY,
|
| 193 |
+
`customer_id` INTEGER NOT NULL,
|
| 194 |
+
`order_status_code` VARCHAR(10) NOT NULL,
|
| 195 |
+
`order_date` DATETIME NOT NULL,
|
| 196 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 197 |
+
);
|
| 198 |
+
|
| 199 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (1, 12, 'Completed', '2018-02-10 15:44:48');
|
| 200 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (2, 4, 'New', '2018-01-31 17:49:18');
|
| 201 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (3, 1, 'PartFilled', '2018-02-26 12:39:33');
|
| 202 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (4, 4, 'Pending', '2018-03-07 16:55:17');
|
| 203 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (5, 4, 'New', '2018-02-12 19:34:12');
|
| 204 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (6, 11, 'PartFilled', '2018-03-06 16:35:51');
|
| 205 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (7, 1, 'Cancelled', '2018-02-15 02:25:32');
|
| 206 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (8, 13, 'Pending', '2018-03-05 23:17:54');
|
| 207 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (9, 7, 'Pending', '2018-02-09 11:16:46');
|
| 208 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (10, 11, 'Cancelled', '2018-03-22 10:49:25');
|
| 209 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (11, 8, 'Cancelled', '2018-02-16 19:42:39');
|
| 210 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (12, 4, 'New', '2018-02-02 23:42:01');
|
| 211 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (13, 15, 'PartFilled', '2018-02-26 05:34:18');
|
| 212 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (14, 6, 'Completed', '2018-03-18 15:12:39');
|
| 213 |
+
INSERT INTO Customer_Orders (`order_id`, `customer_id`, `order_status_code`, `order_date`) VALUES (15, 10, 'Pending', '2018-03-16 22:42:46');
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
CREATE TABLE `Department_Stores` (
|
| 217 |
+
`dept_store_id` INTEGER PRIMARY KEY,
|
| 218 |
+
`dept_store_chain_id` INTEGER,
|
| 219 |
+
`store_name` VARCHAR(80),
|
| 220 |
+
`store_address` VARCHAR(255),
|
| 221 |
+
`store_phone` VARCHAR(80),
|
| 222 |
+
`store_email` VARCHAR(80),
|
| 223 |
+
FOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )
|
| 224 |
+
);
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (1, 1, 'store_name', '01290 Jeremie Parkway Suite 753
|
| 228 |
+
North Arielle, MS 51249', '(948)944-5099x2027', 'bmaggio@example.com');
|
| 229 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (2, 3, 'store_name', '082 Purdy Expressway
|
| 230 |
+
O''Connellshire, IL 31732', '877-917-5029', 'larissa10@example.org');
|
| 231 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (3, 4, 'store_name', '994 Travis Plains
|
| 232 |
+
North Wadeton, WV 27575-3951', '1-216-312-0375', 'alexandro.mcclure@example.net');
|
| 233 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (4, 2, 'store_name', '93472 Mayert Shore Apt. 360
|
| 234 |
+
Mitchellton, TN 84209', '670-466-6367', 'bryon24@example.org');
|
| 235 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (5, 3, 'store_name', '88112 Parisian Lights
|
| 236 |
+
Sporermouth, MN 25962', '01399327266', 'creola23@example.org');
|
| 237 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (6, 4, 'store_name', '49708 Marcella Valleys Suite 181
|
| 238 |
+
Ninamouth, WA 86667', '1-859-843-1957', 'jerod.reynolds@example.net');
|
| 239 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (7, 4, 'store_name', '41924 Alfredo Cliff
|
| 240 |
+
New Eviestad, NY 17573', '1-109-872-9142x77078', 'ihamill@example.org');
|
| 241 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (8, 4, 'store_name', '7081 Shanna Cape
|
| 242 |
+
West Zacheryshire, NC 17408', '+67(5)4983519062', 'casper.adolfo@example.org');
|
| 243 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (9, 4, 'store_name', '5288 Kaia Street
|
| 244 |
+
Devonton, NJ 61782-9006', '(723)503-7086x356', 'selmer.stiedemann@example.org');
|
| 245 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (10, 3, 'store_name', '00578 Lisa Gateway Suite 476
|
| 246 |
+
Strosinville, VA 03998-3292', '07126036440', 'luisa57@example.org');
|
| 247 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (11, 2, 'store_name', '34894 Everett Road
|
| 248 |
+
South Jeremiehaven, GA 08730', '611-037-9309', 'vonrueden.vern@example.org');
|
| 249 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (12, 4, 'store_name', '2676 Cruickshank Gardens
|
| 250 |
+
North Ginahaven, CT 85046', '(626)763-7031', 'freda.toy@example.org');
|
| 251 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (13, 2, 'store_name', '29297 West Road Suite 210
|
| 252 |
+
West Dulceside, UT 58085-8998', '1-764-126-7567x0795', 'katlynn62@example.com');
|
| 253 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (14, 1, 'store_name', '16650 Lysanne River Apt. 281
|
| 254 |
+
North Garettton, AL 84756-4375', '319.331.3397', 'mohr.elwin@example.net');
|
| 255 |
+
INSERT INTO Department_Stores (`dept_store_id`, `dept_store_chain_id`, `store_name`, `store_address`, `store_phone`, `store_email`) VALUES (15, 3, 'store_name', '82470 Hansen Squares Suite 190
|
| 256 |
+
Wehnermouth, NC 76791', '(587)993-3604x3077', 'kelly30@example.com');
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
CREATE TABLE `Departments` (
|
| 260 |
+
`department_id` INTEGER PRIMARY KEY,
|
| 261 |
+
`dept_store_id` INTEGER NOT NULL,
|
| 262 |
+
`department_name` VARCHAR(80),
|
| 263 |
+
FOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )
|
| 264 |
+
);
|
| 265 |
+
INSERT INTO Departments (`department_id`, `dept_store_id`, `department_name`) VALUES (1, 5, 'human resource');
|
| 266 |
+
INSERT INTO Departments (`department_id`, `dept_store_id`, `department_name`) VALUES (2, 11, 'purchasing');
|
| 267 |
+
INSERT INTO Departments (`department_id`, `dept_store_id`, `department_name`) VALUES (3, 4, 'marketing');
|
| 268 |
+
INSERT INTO Departments (`department_id`, `dept_store_id`, `department_name`) VALUES (4, 11, 'advertising');
|
| 269 |
+
INSERT INTO Departments (`department_id`, `dept_store_id`, `department_name`) VALUES (5, 4, 'managing');
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
CREATE TABLE `Order_Items` (
|
| 273 |
+
`order_item_id` INTEGER PRIMARY KEY,
|
| 274 |
+
`order_id` INTEGER NOT NULL,
|
| 275 |
+
`product_id` INTEGER NOT NULL,
|
| 276 |
+
FOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),
|
| 277 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
|
| 278 |
+
);
|
| 279 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (1, 9, 7);
|
| 280 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (2, 1, 3);
|
| 281 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (3, 5, 2);
|
| 282 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (4, 14, 10);
|
| 283 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (5, 15, 4);
|
| 284 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (6, 14, 13);
|
| 285 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (7, 6, 13);
|
| 286 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (8, 12, 8);
|
| 287 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (9, 13, 12);
|
| 288 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (10, 14, 13);
|
| 289 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (11, 7, 11);
|
| 290 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (12, 14, 14);
|
| 291 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (13, 15, 5);
|
| 292 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (14, 8, 10);
|
| 293 |
+
INSERT INTO Order_Items (`order_item_id`, `order_id`, `product_id`) VALUES (15, 5, 4);
|
| 294 |
+
CREATE TABLE `Product_Suppliers` (
|
| 295 |
+
`product_id` INTEGER NOT NULL,
|
| 296 |
+
`supplier_id` INTEGER NOT NULL,
|
| 297 |
+
`date_supplied_from` DATETIME NOT NULL,
|
| 298 |
+
`date_supplied_to` DATETIME,
|
| 299 |
+
`total_amount_purchased` VARCHAR(80),
|
| 300 |
+
`total_value_purchased` DECIMAL(19,4),
|
| 301 |
+
PRIMARY KEY (`product_id`, `supplier_id`),
|
| 302 |
+
FOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),
|
| 303 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )
|
| 304 |
+
);
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
CREATE TABLE `Staff_Department_Assignments` (
|
| 308 |
+
`staff_id` INTEGER NOT NULL,
|
| 309 |
+
`department_id` INTEGER NOT NULL,
|
| 310 |
+
`date_assigned_from` DATETIME NOT NULL,
|
| 311 |
+
`job_title_code` VARCHAR(10) NOT NULL,
|
| 312 |
+
`date_assigned_to` DATETIME,
|
| 313 |
+
PRIMARY KEY (`staff_id`, `department_id`),
|
| 314 |
+
FOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),
|
| 315 |
+
FOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )
|
| 316 |
+
);
|
| 317 |
+
|
| 318 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (4, 3, '2017-06-19 00:49:05', '2018-03-24 19:29:18', '89366.05', '36014.6000');
|
| 319 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (8, 4, '2017-07-02 00:35:12', '2018-03-25 07:30:49', '25085.57', '36274.5600');
|
| 320 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (3, 3, '2017-10-14 19:15:37', '2018-03-24 02:29:44', '15752.45', '7273.7400');
|
| 321 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (7, 1, '2017-08-22 00:58:42', '2018-03-24 02:38:31', '22332.08', '8042.7800');
|
| 322 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (15, 4, '2017-12-08 09:14:05', '2018-03-24 23:03:30', '25318.21', '29836.2600');
|
| 323 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (11, 1, '2017-12-01 19:46:53', '2018-03-24 05:22:36', '35149.74', '67216.3100');
|
| 324 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (11, 3, '2017-07-13 15:02:24', '2018-03-24 23:01:03', '31862.59', '76992.4200');
|
| 325 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (5, 2, '2017-07-28 19:23:39', '2018-03-24 09:17:15', '85922.86', '82524.9500');
|
| 326 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (6, 2, '2017-12-20 07:07:31', '2018-03-24 23:25:58', '64444.18', '97371.1200');
|
| 327 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (4, 1, '2017-09-19 02:14:02', '2018-03-25 09:15:30', '32881.38', '29987.7100');
|
| 328 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (15, 2, '2017-08-07 12:08:00', '2018-03-23 19:21:12', '13712.91', '48100.2300');
|
| 329 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (4, 4, '2017-06-09 01:30:40', '2018-03-24 12:35:08', '79316.31', '98086.8000');
|
| 330 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (8, 2, '2017-06-25 14:59:40', '2018-03-24 12:27:13', '83873.58', '99049.0100');
|
| 331 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (7, 4, '2017-11-17 08:23:16', '2018-03-25 12:03:33', '20689.78', '61800.9500');
|
| 332 |
+
INSERT INTO Product_Suppliers (`product_id`, `supplier_id`, `date_supplied_from`, `date_supplied_to`, `total_amount_purchased`, `total_value_purchased`) VALUES (14, 1, '2017-08-09 21:26:38', '2018-03-24 18:16:47', '20447.99', '27257.6000');
|
| 333 |
+
|
| 334 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (5, 4, '2017-06-11 22:55:20', 'Department Manager', '2018-03-23 21:59:11');
|
| 335 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (10, 5, '2017-12-18 19:12:15', 'Sales Person', '2018-03-23 20:25:24');
|
| 336 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (1, 5, '2018-02-14 03:15:29', 'Clerical Staff', '2018-03-24 19:57:56');
|
| 337 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (8, 1, '2017-05-14 12:30:33', 'Clerical Staff', '2018-03-25 03:15:31');
|
| 338 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (15, 2, '2017-03-31 23:07:54', 'Department Manager', '2018-03-24 09:11:14');
|
| 339 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (2, 5, '2017-11-14 04:38:44', 'Administration', '2018-03-24 07:04:28');
|
| 340 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (9, 4, '2016-09-20 02:59:15', 'Sales Person', '2018-03-24 20:13:13');
|
| 341 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (8, 2, '2017-05-10 02:32:17', 'Administration', '2018-03-24 02:36:57');
|
| 342 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (3, 5, '2016-10-19 08:11:39', 'Clerical Staff', '2018-03-25 15:34:31');
|
| 343 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (6, 1, '2017-12-26 06:34:20', 'Department Manager', '2018-03-25 09:53:37');
|
| 344 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (6, 2, '2016-09-15 11:00:41', 'Administration', '2018-03-25 02:29:08');
|
| 345 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (8, 5, '2017-06-06 22:22:17', 'Clerical Staff', '2018-03-24 13:02:22');
|
| 346 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (12, 5, '2016-11-12 14:10:55', 'Sales Person', '2018-03-25 02:59:19');
|
| 347 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (7, 3, '2016-05-17 07:02:37', 'Clerical Staff', '2018-03-24 10:45:21');
|
| 348 |
+
INSERT INTO Staff_Department_Assignments (`staff_id`, `department_id`, `date_assigned_from`, `job_title_code`, `date_assigned_to`) VALUES (2, 3, '2016-06-24 17:31:24', 'Administration', '2018-03-25 13:32:57');
|
database/document_management/document_management.sqlite
ADDED
|
Binary file (61.4 kB). View file
|
|
|
database/driving_school/driving_school.sqlite
ADDED
|
Binary file (32.8 kB). View file
|
|
|
database/driving_school/schema.sql
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE `Addresses` (
|
| 4 |
+
`address_id` INTEGER PRIMARY KEY,
|
| 5 |
+
`line_1_number_building` VARCHAR(80),
|
| 6 |
+
`city` VARCHAR(50),
|
| 7 |
+
`zip_postcode` VARCHAR(20),
|
| 8 |
+
`state_province_county` VARCHAR(50),
|
| 9 |
+
`country` VARCHAR(50)
|
| 10 |
+
);
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (1, '3904 Stroman Passage', 'Port Melyssa', '14445', 'Georgia', 'USA');
|
| 14 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (2, '053 Quigley Island', 'Hagenesfurt', '22194', 'Kentucky', 'USA');
|
| 15 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (3, '00704 Zoe Alley', 'Lake Elaina', '08938', 'Georgia', 'USA');
|
| 16 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (4, '484 O''Hara Drive', 'Buckridgehaven', '00005', 'Oregon', 'USA');
|
| 17 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (5, '354 Frederik Ridge', 'Powlowskichester', '27559', 'Ohio', 'USA');
|
| 18 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (6, '376 Kallie Tunnel Apt. 784', 'Elviebury', '63768', 'Connecticut', 'USA');
|
| 19 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (7, '56461 Baumbach Well Suite 634', 'Lockmanfurt', '34975', 'Washington', 'USA');
|
| 20 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (8, '29085 Dejah Pine Suite 059', 'Lake Rafaela', '80376', 'WestVirginia', 'USA');
|
| 21 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (9, '535 Ariel Brook', 'Port Jackelinemouth', '85954', 'Maine', 'USA');
|
| 22 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (10, '2291 Larkin Ports', 'South Richieport', '95098', 'Idaho', 'USA');
|
| 23 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (11, '37698 Hahn Curve Apt. 572', 'South Eugene', '99903', 'Alabama', 'USA');
|
| 24 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (12, '7089 Mueller Forks', 'New Bernieceburgh', '38197', 'Louisiana', 'USA');
|
| 25 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (13, '43235 Jazmin Mountain Suite 251', 'Ericamouth', '75074', 'Louisiana', 'USA');
|
| 26 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (14, '4834 Schaefer Light Suite 947', 'Damianfort', '61121', 'Connecticut', 'USA');
|
| 27 |
+
INSERT INTO Addresses (`address_id`, `line_1_number_building`, `city`, `zip_postcode`, `state_province_county`, `country`) VALUES (15, '9260 Streich Mountain', 'West Edmondview', '43988', 'Kentucky', 'USA');
|
| 28 |
+
|
| 29 |
+
CREATE TABLE `Staff` (
|
| 30 |
+
`staff_id` INTEGER PRIMARY KEY,
|
| 31 |
+
`staff_address_id` INTEGER NOT NULL,
|
| 32 |
+
`nickname` VARCHAR(80),
|
| 33 |
+
`first_name` VARCHAR(80),
|
| 34 |
+
`middle_name` VARCHAR(80),
|
| 35 |
+
`last_name` VARCHAR(80),
|
| 36 |
+
`date_of_birth` DATETIME,
|
| 37 |
+
`date_joined_staff` DATETIME,
|
| 38 |
+
`date_left_staff` DATETIME,
|
| 39 |
+
FOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 40 |
+
);
|
| 41 |
+
|
| 42 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (1, 14, 'thompson.constantin', 'Janessa', 'Amara', 'Sawayn', '2010-12-08 16:55:14', '2017-04-27 03:21:26', '2018-03-23 22:53:12');
|
| 43 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (2, 3, 'santos45', 'Camylle', 'Icie', 'Weissnat', '2015-08-01 13:22:43', '2016-06-06 08:54:28', '2018-03-10 15:25:00');
|
| 44 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (3, 5, 'ynader', 'Kaitlin', 'Stephania', 'Mertz', '1994-05-17 05:32:11', '2018-01-02 12:24:24', '2018-03-24 10:11:08');
|
| 45 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (4, 1, 'lsenger', 'Rebekah', 'Sherwood', 'Hermann', '2003-01-16 06:29:11', '2017-10-21 17:20:57', '2018-03-04 17:13:53');
|
| 46 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (5, 14, 'ledner.jamie', 'Jedidiah', 'Dejon', 'Herzog', '2015-08-10 11:37:39', '2016-05-16 20:56:53', '2018-03-08 04:23:14');
|
| 47 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (6, 12, 'bogisich.geovany', 'Eulalia', 'Tre', 'Maggio', '1998-04-27 12:55:05', '2017-08-27 19:19:44', '2018-02-28 08:26:10');
|
| 48 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (7, 13, 'weldon.kling', 'Queenie', 'Madelyn', 'Macejkovic', '2007-06-11 20:03:28', '2017-06-04 14:30:41', '2018-03-08 05:16:29');
|
| 49 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (8, 1, 'gabe21', 'Titus', 'Duane', 'Durgan', '2005-05-02 06:23:36', '2016-05-26 00:55:07', '2018-03-05 18:30:12');
|
| 50 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (9, 4, 'ymiller', 'Margie', 'Caesar', 'Doyle', '1995-06-03 08:09:17', '2017-12-22 03:06:32', '2018-03-08 12:31:16');
|
| 51 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (10, 2, 'sbrown', 'Jaleel', 'Maiya', 'Rogahn', '1996-09-24 09:51:42', '2016-06-05 22:22:23', '2018-03-14 07:14:37');
|
| 52 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (11, 1, 'nicholaus92', 'Winnifred', 'Liam', 'Jast', '2000-06-13 18:09:11', '2016-05-01 02:22:45', '2018-03-09 05:08:35');
|
| 53 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (12, 7, 'edwin.hudson', 'Lincoln', 'Benny', 'Carroll', '1996-03-09 08:19:49', '2016-11-05 01:43:52', '2018-03-06 23:17:41');
|
| 54 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (13, 1, 'norma73', 'Ernestina', 'Clarabelle', 'Mraz', '2004-05-19 14:11:13', '2016-11-13 20:44:23', '2018-02-26 17:56:31');
|
| 55 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (14, 6, 'bkunze', 'Ludie', 'Ulices', 'Kuphal', '2000-11-16 06:55:12', '2017-08-30 15:08:37', '2018-03-02 01:48:15');
|
| 56 |
+
INSERT INTO Staff (`staff_id`, `staff_address_id`, `nickname`, `first_name`, `middle_name`, `last_name`, `date_of_birth`, `date_joined_staff`, `date_left_staff`) VALUES (15, 3, 'weissnat.vincenzo', 'Simeon', 'Mayra', 'Turner', '1997-03-29 10:55:45', '2017-02-20 18:45:20', '2018-03-01 17:10:03');
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
CREATE TABLE `Vehicles` (
|
| 60 |
+
`vehicle_id` INTEGER PRIMARY KEY,
|
| 61 |
+
`vehicle_details` VARCHAR(255)
|
| 62 |
+
);
|
| 63 |
+
INSERT INTO Vehicles (`vehicle_id`, `vehicle_details`) VALUES (1, 'Van');
|
| 64 |
+
INSERT INTO Vehicles (`vehicle_id`, `vehicle_details`) VALUES (2, 'Truck');
|
| 65 |
+
INSERT INTO Vehicles (`vehicle_id`, `vehicle_details`) VALUES (3, 'Car');
|
| 66 |
+
|
| 67 |
+
CREATE TABLE `Customers` (
|
| 68 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 69 |
+
`customer_address_id` INTEGER NOT NULL,
|
| 70 |
+
`customer_status_code` VARCHAR(15) NOT NULL,
|
| 71 |
+
`date_became_customer` DATETIME,
|
| 72 |
+
`date_of_birth` DATETIME,
|
| 73 |
+
`first_name` VARCHAR(80),
|
| 74 |
+
`last_name` VARCHAR(80),
|
| 75 |
+
`amount_outstanding` DOUBLE NULL,
|
| 76 |
+
`email_address` VARCHAR(250),
|
| 77 |
+
`phone_number` VARCHAR(255),
|
| 78 |
+
`cell_mobile_phone_number` VARCHAR(255),
|
| 79 |
+
FOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 80 |
+
);
|
| 81 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (1, 13, 'Bad Customer', '2016-05-11 17:03:48', '1998-12-15 13:24:40', 'Carole', 'Bernhard', '255', 'everette.goyette@example.org', '07278206718', '861-638-9797');
|
| 82 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (2, 10, 'Bad Customer', '2015-11-16 22:52:14', '1995-07-17 12:13:16', 'Genevieve', 'Terry', '7256', 'huel.jana@example.org', '+14(5)2351480248', '578-518-4785x612');
|
| 83 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (3, 10, 'Good Customer', '2016-04-08 00:28:15', '1994-06-21 01:34:56', 'Clara', 'Ortiz', '9443', 'hilario.sporer@example.org', '374-483-2758x85087', '1-197-686-2849x8761');
|
| 84 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (4, 8, 'Good Customer', '2016-07-22 15:53:44', '1993-02-07 05:40:26', 'Jordy', 'Tromp', '3751', 'afranecki@example.com', '218.550.1362', '081-097-3684');
|
| 85 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (5, 2, 'Bad Customer', '2017-11-12 04:34:44', '1991-02-10 00:42:17', 'Millie', 'Bruen', '5687', 'asha.kilback@example.org', '1-618-535-9750', '00659133944');
|
| 86 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (6, 9, 'Good Customer', '2017-04-16 05:12:21', '1993-03-08 08:48:42', 'Amya', 'Spinka', '3900', 'kozey.citlalli@example.org', '1-673-962-8158x7646', '(780)719-4206x033');
|
| 87 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (7, 1, 'Bad Customer', '2015-06-24 03:50:04', '1996-11-07 05:30:55', 'Marina', 'Koelpin', '8144', 'mayert.judy@example.com', '(662)490-3108', '848-099-2095x785');
|
| 88 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (8, 10, 'Bad Customer', '2017-10-05 14:15:46', '1998-09-18 04:45:01', 'Dianna', 'Trantow', '9500', 'kroberts@example.org', '206-054-0689x05861', '739-333-6966x187');
|
| 89 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (9, 12, 'Bad Customer', '2016-02-17 08:26:23', '1991-12-05 02:50:15', 'Leif', 'Mertz', '7093', 'mariela28@example.org', '753.921.0871', '1-387-258-1016x96963');
|
| 90 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (10, 1, 'Bad Customer', '2017-11-25 01:42:26', '1996-08-29 00:03:08', 'Rylan', 'Goodwin', '1000', 'nichole59@example.com', '1-387-884-0656', '+45(6)4872981083');
|
| 91 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (11, 13, 'Good Customer', '2016-11-30 10:37:41', '1994-05-07 01:32:16', 'Ray', 'Kohler', '9447', 'karina.carroll@example.net', '(297)122-0086', '577-584-4864');
|
| 92 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (12, 9, 'Bad Customer', '2016-05-13 07:38:23', '1993-07-09 11:11:36', 'Omer', 'Leuschke', '2099', 'myrl.lind@example.net', '417.136.2900x672', '200.830.8723');
|
| 93 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (13, 7, 'Good Customer', '2016-09-04 23:08:20', '1988-09-19 14:45:56', 'Sigrid', 'Schmeler', '2255', 'wehner.harold@example.com', '192-395-2411', '+57(9)4602098297');
|
| 94 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (14, 10, 'Good Customer', '2016-03-18 06:14:18', '1996-05-23 01:21:54', 'Estelle', 'Grant', '5494', 'ehowell@example.com', '1-875-045-0806', '1-401-108-8016x078');
|
| 95 |
+
INSERT INTO Customers (`customer_id`, `customer_address_id`, `customer_status_code`, `date_became_customer`, `date_of_birth`, `first_name`, `last_name`, `amount_outstanding`, `email_address`, `phone_number`, `cell_mobile_phone_number`) VALUES (15, 1, 'Bad Customer', '2015-09-25 13:59:21', '1996-08-30 06:17:50', 'Dameon', 'Sanford', '9332', 'kitty.hand@example.net', '(729)396-4354x3576', '(630)964-2426');
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
CREATE TABLE `Customer_Payments` (
|
| 99 |
+
`customer_id` INTEGER NOT NULL,
|
| 100 |
+
`datetime_payment` DATETIME NOT NULL,
|
| 101 |
+
`payment_method_code` VARCHAR(10) NOT NULL,
|
| 102 |
+
`amount_payment` DOUBLE NULL,
|
| 103 |
+
PRIMARY KEY (`customer_id`,`datetime_payment`),
|
| 104 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 105 |
+
);
|
| 106 |
+
CREATE TABLE `Lessons` (
|
| 107 |
+
`lesson_id` INTEGER PRIMARY KEY,
|
| 108 |
+
`customer_id` INTEGER NOT NULL,
|
| 109 |
+
`lesson_status_code` VARCHAR(15) NOT NULL,
|
| 110 |
+
`staff_id` INTEGER,
|
| 111 |
+
`vehicle_id` INTEGER NOT NULL,
|
| 112 |
+
`lesson_date` DATETIME,
|
| 113 |
+
`lesson_time` VARCHAR(10),
|
| 114 |
+
`price` DOUBLE NULL,
|
| 115 |
+
FOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),
|
| 116 |
+
FOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),
|
| 117 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 118 |
+
);
|
| 119 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (11, '2018-02-05 18:44:46', 'Direct Debit', '9570.93');
|
| 120 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (2, '2018-02-24 10:07:05', 'Direct Debit', '8180.26');
|
| 121 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (14, '2018-02-27 20:08:53', 'Direct Debit', '4610.26');
|
| 122 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (6, '2018-03-12 08:41:47', 'Direct Debit', '4032.33');
|
| 123 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (3, '2018-02-06 13:35:58', 'Credit Card', '787.12');
|
| 124 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (14, '2018-03-12 13:31:36', 'Credit Card', '6970.98');
|
| 125 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (4, '2018-02-03 15:04:36', 'Direct Debit', '6311.37');
|
| 126 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (7, '2018-02-15 16:38:49', 'Direct Debit', '4773.16');
|
| 127 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (13, '2018-02-21 05:28:49', 'Credit Card', '7440.34');
|
| 128 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (6, '2018-02-19 09:06:29', 'Direct Debit', '5475.26');
|
| 129 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (2, '2018-03-20 21:38:41', 'Direct Debit', '1708.18');
|
| 130 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (10, '2018-02-01 06:15:31', 'Direct Debit', '6782.84');
|
| 131 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (1, '2018-03-18 13:48:13', 'Direct Debit', '9886.62');
|
| 132 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (14, '2018-02-19 01:49:59', 'Credit Card', '3073.98');
|
| 133 |
+
INSERT INTO Customer_Payments (`customer_id`, `datetime_payment`, `payment_method_code`, `amount_payment`) VALUES (12, '2018-03-06 21:36:41', 'Credit Card', '9414.74');
|
| 134 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (1, 6, 'Cancelled', 8, 3, '2018-02-28 10:55:36', '5', '199');
|
| 135 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (2, 8, 'Cancelled', 14, 3, '2018-03-07 16:12:36', '6', '167');
|
| 136 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (3, 6, 'Cancelled', 11, 2, '2018-03-03 15:10:16', '3', '352');
|
| 137 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (4, 8, 'Completed', 1, 2, '2018-03-17 19:02:07', '9', '306');
|
| 138 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (5, 10, 'Completed', 3, 2, '2018-03-12 00:41:59', '9', '295');
|
| 139 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (6, 5, 'Completed', 4, 2, '2018-03-07 22:03:49', '6', '492');
|
| 140 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (7, 9, 'Cancelled', 11, 1, '2018-03-08 16:05:05', '9', '231');
|
| 141 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (8, 3, 'Completed', 8, 2, '2018-03-21 06:48:45', '2', '277');
|
| 142 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (9, 2, 'Completed', 4, 2, '2018-03-05 20:05:33', '9', '456');
|
| 143 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (10, 2, 'Cancelled', 5, 2, '2018-02-26 02:36:35', '4', '495');
|
| 144 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (11, 10, 'Cancelled', 15, 1, '2018-03-04 06:55:46', '2', '223');
|
| 145 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (12, 11, 'Cancelled', 12, 2, '2018-03-16 07:08:52', '2', '184');
|
| 146 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (13, 13, 'Completed', 12, 1, '2018-03-05 18:05:31', '5', '446');
|
| 147 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (14, 11, 'Cancelled', 11, 1, '2018-03-07 11:53:32', '5', '483');
|
| 148 |
+
INSERT INTO Lessons (`lesson_id`, `customer_id`, `lesson_status_code`, `staff_id`, `vehicle_id`, `lesson_date`, `lesson_time`, `price`) VALUES (15, 3, 'Cancelled', 8, 1, '2018-03-06 21:48:51', '9', '340');
|
database/e_government/e_government.sqlite
ADDED
|
Binary file (57.3 kB). View file
|
|
|
database/e_learning/e_learning.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/election_representative/election_representative.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
database/election_representative/schema.sql
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "election" (
|
| 4 |
+
"Election_ID" int,
|
| 5 |
+
"Representative_ID" int,
|
| 6 |
+
"Date" text,
|
| 7 |
+
"Votes" real,
|
| 8 |
+
"Vote_Percent" real,
|
| 9 |
+
"Seats" real,
|
| 10 |
+
"Place" real,
|
| 11 |
+
PRIMARY KEY ("Election_ID"),
|
| 12 |
+
FOREIGN KEY ("Representative_ID") REFERENCES `representative`("Representative_ID")
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
CREATE TABLE "representative" (
|
| 16 |
+
"Representative_ID" int,
|
| 17 |
+
"Name" text,
|
| 18 |
+
"State" text,
|
| 19 |
+
"Party" text,
|
| 20 |
+
"Lifespan" text,
|
| 21 |
+
PRIMARY KEY ("Representative_ID")
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
INSERT INTO "representative" VALUES (1,"Dan Quayle","Indiana","Republican","1947–");
|
| 25 |
+
INSERT INTO "representative" VALUES (2,"John Quayle","New York","Democratic","1868–1930");
|
| 26 |
+
INSERT INTO "representative" VALUES (3,"Al Quie","Minnesota","Republican","1923–");
|
| 27 |
+
INSERT INTO "representative" VALUES (4,"James M. Quigley","Pennsylvania","Democratic","1918–");
|
| 28 |
+
INSERT INTO "representative" VALUES (5,"Jimmy Quillen","Tennessee","Republican","1916–2003");
|
| 29 |
+
INSERT INTO "representative" VALUES (6,"Jack Quinn","New York","Republican","1951–");
|
| 30 |
+
INSERT INTO "representative" VALUES (7,"James L. Quinn","Pennsylvania","Democratic","1875–1960");
|
| 31 |
+
|
| 32 |
+
INSERT INTO "election" VALUES (1,1,"July 1942","9423","16.2","6","3");
|
| 33 |
+
INSERT INTO "election" VALUES (2,2,"October 1942","11059","18.5","10","1");
|
| 34 |
+
INSERT INTO "election" VALUES (3,4,"1946","13049","19.5","10","2");
|
| 35 |
+
INSERT INTO "election" VALUES (4,5,"1949","14077","19.5","9","2");
|
| 36 |
+
INSERT INTO "election" VALUES (5,7,"1953","12422","16.0","7","3");
|
| 37 |
+
|
database/entertainment_awards/entertainment_awards.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/entertainment_awards/schema.sql
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
CREATE TABLE "festival_detail" (
|
| 5 |
+
"Festival_ID" int,
|
| 6 |
+
"Festival_Name" text,
|
| 7 |
+
"Chair_Name" text,
|
| 8 |
+
"Location" text,
|
| 9 |
+
"Year" int,
|
| 10 |
+
"Num_of_Audience" int,
|
| 11 |
+
PRIMARY KEY ("Festival_ID")
|
| 12 |
+
);
|
| 13 |
+
|
| 14 |
+
INSERT INTO "festival_detail" VALUES (1,"Panasonic Awards","Raymond Floyd","United States","2006","152");
|
| 15 |
+
INSERT INTO "festival_detail" VALUES (2,"Flower Awards","Charles Coody","United States","2007","155");
|
| 16 |
+
INSERT INTO "festival_detail" VALUES (3,"Cherry Awards","Doug Ford","United States","2007","160");
|
| 17 |
+
INSERT INTO "festival_detail" VALUES (4,"Gobel Awards","Arnold Palmer","United States","2008","160");
|
| 18 |
+
INSERT INTO "festival_detail" VALUES (5,"LA Awards","Lucy Lu","United States","2010","161");
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
CREATE TABLE artwork (
|
| 22 |
+
"Artwork_ID" int,
|
| 23 |
+
"Type" text,
|
| 24 |
+
"Name" text,
|
| 25 |
+
PRIMARY KEY ("Artwork_ID")
|
| 26 |
+
);
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
INSERT INTO artwork VALUES (1,"Program Music/Variety Show","Indonesian Idol");
|
| 30 |
+
INSERT INTO artwork VALUES (2,"Program Music/Variety Show","I Know");
|
| 31 |
+
INSERT INTO artwork VALUES (3,"Presenter Music/Variety Show","Loving you");
|
| 32 |
+
INSERT INTO artwork VALUES (4,"Program Music/Variety Show","Why");
|
| 33 |
+
INSERT INTO artwork VALUES (5,"Presenter Music/Variety Show","Boys");
|
| 34 |
+
INSERT INTO artwork VALUES (6,"Program Talent Show","Cats");
|
| 35 |
+
INSERT INTO artwork VALUES (7,"Presenter Talent Show","Daniel Mananta");
|
| 36 |
+
INSERT INTO artwork VALUES (8,"Program Talent Show","Martin");
|
| 37 |
+
INSERT INTO artwork VALUES (9,"Presenter Talent Show","Back Home");
|
| 38 |
+
|
| 39 |
+
CREATE TABLE nomination (
|
| 40 |
+
"Artwork_ID" int,
|
| 41 |
+
"Festival_ID" int,
|
| 42 |
+
"Result" text,
|
| 43 |
+
PRIMARY KEY ("Artwork_ID","Festival_ID"),
|
| 44 |
+
FOREIGN KEY ("Artwork_ID") REFERENCES `artwork`("Artwork_ID"),
|
| 45 |
+
FOREIGN KEY ("Festival_ID") REFERENCES `festival_detail`("Festival_ID")
|
| 46 |
+
);
|
| 47 |
+
|
| 48 |
+
INSERT INTO nomination VALUES (1,2,"Nominated");
|
| 49 |
+
INSERT INTO nomination VALUES (2,2,"Won");
|
| 50 |
+
INSERT INTO nomination VALUES (3,1,"Nominated");
|
| 51 |
+
INSERT INTO nomination VALUES (4,1,"Won");
|
| 52 |
+
INSERT INTO nomination VALUES (8,5,"Nominated");
|
| 53 |
+
INSERT INTO nomination VALUES (9,5,"Nominated");
|
| 54 |
+
|
database/epinions_1/epinions_1.sqlite
ADDED
|
Binary file (57.3 kB). View file
|
|
|
database/film_rank/film_rank.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/flight_2/annotation.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label_id": null,
|
| 3 |
+
"data": [
|
| 4 |
+
{
|
| 5 |
+
"nl": "Find all airlines that have at least one flight out of AXX airport. Report the full name and the abbreviation of each airline\n",
|
| 6 |
+
"id": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"nl": "Find all destinations served from the AXX airport by Northwest. Re- port flight number, airport code and the full name of the airport.\n",
|
| 10 |
+
"id": 1
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"nl": "Find all airports served by ALL five of the airlines listed below: Delta, Frontier, USAir, UAL and Southwest. Report just the airport codes.\n",
|
| 14 |
+
"id": 2
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"nl": "Find all airports that are served by at least three Southwest flights. Report just the three-letter codes of the airports\n",
|
| 18 |
+
"id": 3
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"nl": "Find the number of airports from which airport ANP can be reached with exactly one transfer.\n",
|
| 22 |
+
"id": 4
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"nl": "Find the number of airports from which airport ATE can be reached with at most one transfer. (make sure to exclude ATE itself from the count). Report just the number.\n",
|
| 26 |
+
"id": 5
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"nl": "Find all airports with exactly 17 outgoing flights. Report airport code and the full name of the airport\n",
|
| 30 |
+
"id": 6
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"nl": "For each room report the total revenue for all stays and the average revenue per stay generated by stays in the room that originated in the months of September\n",
|
| 34 |
+
"id": 7
|
| 35 |
+
}
|
| 36 |
+
],
|
| 37 |
+
"review_id": null
|
| 38 |
+
}
|
database/flight_2/flight_2.sql
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CREATE TABLE 'airlines' (
|
| 2 |
+
uid INTEGER PRIMARY KEY,
|
| 3 |
+
Airline TEXT,
|
| 4 |
+
Abbreviation TEXT,
|
| 5 |
+
Country TEXT
|
| 6 |
+
);
|
| 7 |
+
CREATE TABLE 'airports' (
|
| 8 |
+
City TEXT,
|
| 9 |
+
AirportCode TEXT PRIMARY KEY,
|
| 10 |
+
AirportName TEXT,
|
| 11 |
+
Country TEXT,
|
| 12 |
+
CountryAbbrev TEXT
|
| 13 |
+
);
|
| 14 |
+
CREATE TABLE 'flights' (
|
| 15 |
+
Airline INTEGER,
|
| 16 |
+
FlightNo INTEGER,
|
| 17 |
+
SourceAirport TEXT,
|
| 18 |
+
DestAirport TEXT,
|
| 19 |
+
PRIMARY KEY(Airline, FlightNo),
|
| 20 |
+
FOREIGN KEY (SourceAirport) REFERENCES airports(AirportCode),
|
| 21 |
+
FOREIGN KEY (DestAirport) REFERENCES airports(AirportCode)
|
| 22 |
+
);
|
database/flight_2/q.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Find all airlines that have at least one flight out of AXX airport. Report the full name and the abbreviation of each airline
|
| 2 |
+
|
| 3 |
+
Find all destinations served from the AXX airport by Northwest. Re- port flight number, airport code and the full name of the airport.
|
| 4 |
+
|
| 5 |
+
Find all airports served by ALL five of the airlines listed below: Delta, Frontier, USAir, UAL and Southwest. Report just the airport codes.
|
| 6 |
+
|
| 7 |
+
Find all airports that are served by at least three Southwest flights. Report just the three-letter codes of the airports
|
| 8 |
+
|
| 9 |
+
Find the number of airports from which airport ANP can be reached with exactly one transfer.
|
| 10 |
+
|
| 11 |
+
Find the number of airports from which airport ATE can be reached with at most one transfer. (make sure to exclude ATE itself from the count). Report just the number.
|
| 12 |
+
|
| 13 |
+
Find all airports with exactly 17 outgoing flights. Report airport code and the full name of the airport
|
| 14 |
+
|
| 15 |
+
For each room report the total revenue for all stays and the average revenue per stay generated by stays in the room that originated in the months of September
|
database/flight_4/link.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://psfotis.github.io/sqlseminar/exercises/
|
database/flight_4/sql.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://psfotis.github.io/sqlseminar/exercises/
|
database/flight_company/schema.sql
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "airport" (
|
| 4 |
+
"id" int,
|
| 5 |
+
"City" text,
|
| 6 |
+
"Country" text,
|
| 7 |
+
"IATA" text,
|
| 8 |
+
"ICAO" text,
|
| 9 |
+
"name" text,
|
| 10 |
+
primary key("id")
|
| 11 |
+
);
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
CREATE TABLE "operate_company" (
|
| 15 |
+
"id" int,
|
| 16 |
+
"name" text,
|
| 17 |
+
"Type" text,
|
| 18 |
+
"Principal_activities" text,
|
| 19 |
+
"Incorporated_in" text,
|
| 20 |
+
"Group_Equity_Shareholding" real,
|
| 21 |
+
primary key ("id")
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
CREATE TABLE "flight" (
|
| 25 |
+
"id" int,
|
| 26 |
+
"Vehicle_Flight_number" text,
|
| 27 |
+
"Date" text,
|
| 28 |
+
"Pilot" text,
|
| 29 |
+
"Velocity" real,
|
| 30 |
+
"Altitude" real,
|
| 31 |
+
"airport_id" int,
|
| 32 |
+
"company_id" int,
|
| 33 |
+
primary key ("id"),
|
| 34 |
+
foreign key ("airport_id") references `airport`("id"),
|
| 35 |
+
foreign key ("company_id") references `operate_company`("id")
|
| 36 |
+
);
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
INSERT INTO "airport" VALUES (1,"Akureyri","Iceland","AEY","BIAR","Akureyri Airport");
|
| 41 |
+
INSERT INTO "airport" VALUES (2,"Amsterdam","Netherlands","AMS","EHAM","Schiphol Airport");
|
| 42 |
+
INSERT INTO "airport" VALUES (3,"Anchorage","United States","ANC","PANC","Ted Stevens Airport");
|
| 43 |
+
INSERT INTO "airport" VALUES (4,"Baltimore","United States","BWI","KBWI","Baltimore-Washington Airport");
|
| 44 |
+
INSERT INTO "airport" VALUES (5,"Barcelona","Spain","BCN","LEBL","El Prat Airport");
|
| 45 |
+
INSERT INTO "airport" VALUES (6,"Bergen","Norway","BGO","ENBR","Bergen Airport");
|
| 46 |
+
INSERT INTO "airport" VALUES (7,"Billund","Denmark","BLL","EKBI","Billund Airport");
|
| 47 |
+
INSERT INTO "airport" VALUES (8,"Boston","United States","BOS","KBOS","Logan International Airport");
|
| 48 |
+
INSERT INTO "airport" VALUES (9,"Brussels","Belgium","BRU","EBBR","National Airport");
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
INSERT INTO "operate_company" VALUES (1, "Air China","Corporate","Airline","China","18.77");
|
| 54 |
+
INSERT INTO "operate_company" VALUES (2, "Air China Cargo","Joint Venture","Cargo airline","China","49");
|
| 55 |
+
INSERT INTO "operate_company" VALUES (3, "Air Hong Kong","Joint Venture","Cargo airline","Hong Kong","60");
|
| 56 |
+
INSERT INTO "operate_company" VALUES (4, "Dragonair","Subsidiary","Airline","Hong Kong","100");
|
| 57 |
+
INSERT INTO "operate_company" VALUES (5, "Cathay Pacific Cargo","Subsidiary","Cargo airline","Hong Kong","100");
|
| 58 |
+
INSERT INTO "operate_company" VALUES (6, "Cathay Pacific Catering Services (HK) Limited","Subsidiary","Catering services","Hong Kong","100");
|
| 59 |
+
INSERT INTO "operate_company" VALUES (7, "Cathay Pacific Services Limited","Subsidiary","Cargo","Hong Kong","100");
|
| 60 |
+
INSERT INTO "operate_company" VALUES (8, "Cathay Pacific Holidays","Subsidiary","Travel agency","Hong Kong","100");
|
| 61 |
+
INSERT INTO "operate_company" VALUES (9, "Dragonair Holidays","Subsidiary","Travel agency","Hong Kong","100");
|
| 62 |
+
INSERT INTO "operate_company" VALUES (10, "Hong Kong Airport Services","Subsidiary","Ground handling","Hong Kong","100");
|
| 63 |
+
INSERT INTO "operate_company" VALUES (11, "Vogue Laundry Service Limited","Subsidiary","Laundry","Hong Kong","100");
|
| 64 |
+
INSERT INTO "operate_company" VALUES (12, "China Pacific Laundry Services","Joint Venture","Laundry","Taiwan","45");
|
| 65 |
+
INSERT INTO "operate_company" VALUES (13, "VN/CX Catering Services Limited","Joint Venture","Catering services","Vietnam","40");
|
| 66 |
+
INSERT INTO "operate_company" VALUES (14, "CLS Catering Services Limited","Joint Venture","Catering services","Canada","30");
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
INSERT INTO "flight" VALUES (1,"M2-F1 #0","March 1, 1963","Thompson","135","0", 1,2);
|
| 70 |
+
INSERT INTO "flight" VALUES (2,"M2-F1 #1","August 16, 1963","Thompson","240","3650",2,3);
|
| 71 |
+
INSERT INTO "flight" VALUES (3,"M2-F1 #6","September 3, 1963","Thompson","240","3650",2,4);
|
| 72 |
+
INSERT INTO "flight" VALUES (4,"M2-F1 #13","October 25, 1963","Thompson","240","3650",3,4);
|
| 73 |
+
INSERT INTO "flight" VALUES (5,"M2-F1 #14","November 8, 1963","Thompson","240","3650",4,5);
|
| 74 |
+
INSERT INTO "flight" VALUES (6,"M2-F1 #21","January 29, 1964","Thompson","240","3650",4,6);
|
| 75 |
+
INSERT INTO "flight" VALUES (7,"M2-F1 #33","March 30, 1964","Peterson","240","3650",5,11);
|
| 76 |
+
INSERT INTO "flight" VALUES (8,"M2-F1 #39","May 19, 1964","Peterson","240","3650",2,13);
|
| 77 |
+
INSERT INTO "flight" VALUES (9,"M2-F1 #61","July 16, 1965","Thompson","240","3650",6,11);
|
| 78 |
+
INSERT INTO "flight" VALUES (10,"M2-F1 #64","August 30, 1965","Thompson","240","3650",9,1);
|
| 79 |
+
INSERT INTO "flight" VALUES (11,"M2-F1 #70","October 8, 1965","Thompson","240","3650",4,5);
|
| 80 |
+
INSERT INTO "flight" VALUES (12,"M2-F1 #71","March 28, 1966","Thompson","240","3650",6,7);
|
| 81 |
+
INSERT INTO "flight" VALUES (13,"M2-F1 #73","August 4, 1966","Peterson","240","3650",8,9);
|
| 82 |
+
|
database/formula_1/data_csv/results.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
database/icfp_1/q.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
q5. Retrieve the titles of all papers with a single author.
|
| 2 |
+
|
| 3 |
+
q6. Retrieve the titles and number of affiliated institutions of all papers with authors from more than one institution.
|
| 4 |
+
|
| 5 |
+
q7. Retrieve the title(s) and number of authors of the paper(s) with the most authors in the database instance. For example, if there is one paper with three authors in the whole batch, and every other paper has one or two authors (that's the case in the database you are given), identify that paper.
|
| 6 |
+
|
| 7 |
+
q8. Retrieve the authors' authID, first and last names, in alphabetical order, and the number of papers on which they have authorship.
|
| 8 |
+
|
| 9 |
+
q9. Retrieve the authID, first and last name of the author(s) and their number of collaborators (shared authorships), in alphabetical order.
|
database/inn_1/annotation.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label_id": null,
|
| 3 |
+
"data": [
|
| 4 |
+
{
|
| 5 |
+
"nl": "Find all modern rooms with a base price below $160 and two beds. Report room names and codes\n",
|
| 6 |
+
"id": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"nl": "Find all rooms occupied on February 6, 2010. Report full name of the room, the check-in and checkout dates of the reservation.\n",
|
| 10 |
+
"id": 1
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"nl": "For each reservation that starts on December 31, 2010 report the room name, nightly rate, number of nights spent and the total amount of money paid.\n",
|
| 14 |
+
"id": 2
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"nl": "Find the names of all people1 staying at the inn at the same time as HERBERT FRYDAY.\n",
|
| 18 |
+
"id": 3
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"nl": "Find the number of August reservations (both checkin and checkout dates are in August) where two adults are staying with two children.\n",
|
| 22 |
+
"id": 4
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"nl": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations\n",
|
| 26 |
+
"id": 5
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"nl": "Find the room that has been occupied the largest number of days based on the reservations. Report the room name\n",
|
| 30 |
+
"id": 6
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"nl": "For each room, report the most expensive reservation. Report the full room name, dates of stay\n",
|
| 34 |
+
"id": 7
|
| 35 |
+
}
|
| 36 |
+
],
|
| 37 |
+
"review_id": null
|
| 38 |
+
}
|
database/inn_1/inn_1.sql
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CREATE TABLE "Rooms" (
|
| 2 |
+
"RoomId" TEXT PRIMARY KEY,
|
| 3 |
+
"roomName" TEXT,
|
| 4 |
+
"beds" INTEGER,
|
| 5 |
+
"bedType" TEXT,
|
| 6 |
+
"maxOccupancy" INTEGER,
|
| 7 |
+
"basePrice" INTEGER,
|
| 8 |
+
"decor" TEXT
|
| 9 |
+
|
| 10 |
+
);
|
| 11 |
+
|
| 12 |
+
CREATE TABLE "Reservations" (
|
| 13 |
+
"Code" INTEGER PRIMARY KEY,
|
| 14 |
+
"Room" TEXT,
|
| 15 |
+
"CheckIn" TEXT,
|
| 16 |
+
"CheckOut" TEXT,
|
| 17 |
+
"Rate" REAL,
|
| 18 |
+
"LastName" TEXT,
|
| 19 |
+
"FirstName" TEXT,
|
| 20 |
+
"Adults" INTEGER,
|
| 21 |
+
"Kids" INTEGER,
|
| 22 |
+
FOREIGN KEY (Room) REFERENCES Rooms(RoomId)
|
| 23 |
+
);
|
| 24 |
+
|
database/insurance_and_eClaims/insurance_and_eClaims.sqlite
ADDED
|
Binary file (36.9 kB). View file
|
|
|