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/apartment_rentals/schema.sql +170 -0
- database/battle_death/battle_death.sqlite +0 -0
- database/battle_death/schema.sql +65 -0
- database/behavior_monitoring/behavior_monitoring.sqlite +0 -0
- database/behavior_monitoring/schema.sql +258 -0
- database/chinook_1/annotation.json +5 -0
- database/coffee_shop/coffee_shop.sqlite +0 -0
- database/coffee_shop/schema.sql +85 -0
- database/college_1/TinyCollege.sql +194 -0
- database/college_1/college_1.sqlite +0 -0
- database/college_1/link.txt +1 -0
- database/company_office/company_office.sqlite +0 -0
- database/company_office/schema.sql +86 -0
- database/county_public_safety/schema.sql +56 -0
- database/customer_complaints/customer_complaints.sqlite +0 -0
- database/device/schema.sql +61 -0
- database/dorm_1/dorm_1.sqlite +0 -0
- database/dorm_1/schema.sql +172 -0
- database/employee_hire_evaluation/employee_hire_evaluation.sqlite +0 -0
- database/employee_hire_evaluation/schema.sql +84 -0
- database/entrepreneur/entrepreneur.sqlite +0 -0
- database/entrepreneur/schema.sql +40 -0
- database/game_1/game_1.sqlite +0 -0
- database/inn_1/data_csv/README.INN.TXT +87 -0
- database/local_govt_mdm/local_govt_mdm.sqlite +0 -0
- database/local_govt_mdm/schema.sql +112 -0
- database/mountain_photos/schema.sql +75 -0
- database/product_catalog/product_catalog.sqlite +0 -0
- database/product_catalog/schema.sql +99 -0
- database/products_for_hire/products_for_hire.sqlite +0 -0
- database/products_for_hire/schema.sql +165 -0
- database/restaurant_1/schema.sql +87 -0
- database/scholar/schema.sql +88 -0
- database/scholar/scholar.sqlite +0 -0
- database/singer/singer.sqlite +0 -0
- database/store_1/schema.sql +0 -0
- database/student_1/link.txt +1 -0
- database/student_1/student_1.sql +13 -0
- database/student_transcripts_tracking/student_transcripts_tracking.sqlite +0 -0
- database/university_basketball/university_basketball.sqlite +0 -0
- test_database/boat_1/Reserves.csv +5 -0
- test_database/book_1/annotation.json +101 -0
- test_database/book_1/book_1.sqlite +0 -0
- test_database/book_1/schema_old.sql +91 -0
- test_database/browser_web/browser_web.sqlite +0 -0
- test_database/car_1/data_csv/cars-data.csv +407 -0
- test_database/car_1/data_csv/continents.csv +6 -0
- test_database/car_1/data_csv/countries.csv +16 -0
- test_database/country_language/country_language.sqlite +0 -0
- test_database/country_language/schema.sql +68 -0
database/apartment_rentals/schema.sql
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE Apartment_Buildings (
|
| 4 |
+
building_id INTEGER NOT NULL,
|
| 5 |
+
building_short_name CHAR(15),
|
| 6 |
+
building_full_name VARCHAR(80),
|
| 7 |
+
building_description VARCHAR(255),
|
| 8 |
+
building_address VARCHAR(255),
|
| 9 |
+
building_manager VARCHAR(50),
|
| 10 |
+
building_phone VARCHAR(80),
|
| 11 |
+
PRIMARY KEY (building_id),
|
| 12 |
+
UNIQUE (building_id)
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (133, 'Normandie Court', 'Normandie Court', 'Studio', '7950 Casper Vista Apt. 176
|
| 16 |
+
Marquiseberg, CA 70496', 'Emma', '(948)040-1064x387');
|
| 17 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (153, 'Mercedes House', 'Mercedes House', 'Studio', '354 Otto Villages
|
| 18 |
+
Charliefort, VT 71664', 'Brenden', '915-617-2408x832');
|
| 19 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (191, 'The Eugene', 'The Eugene', 'Flat', '71537 Gorczany Inlet
|
| 20 |
+
Wisozkburgh, AL 08256', 'Melyssa', '(609)946-0491');
|
| 21 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (196, 'VIA 57 WEST', 'VIA 57 WEST', 'Studio', '959 Ethel Viaduct
|
| 22 |
+
West Efrainburgh, DE 40074', 'Kathlyn', '681.772.2454');
|
| 23 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (225, 'Columbus Square', 'Columbus Square', 'Studio', '0703 Danika Mountains Apt. 362
|
| 24 |
+
Mohrland, AL 56839-5028', 'Kyle', '1-724-982-9507x640');
|
| 25 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (532, 'Avalon Park', 'Avalon Park', 'Duplex', '6827 Kessler Parkway Suite 908
|
| 26 |
+
Ahmedberg, WI 48788', 'Albert', '376-017-3538');
|
| 27 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (556, 'Peter Cooper Village', 'Peter Cooper Village', 'Flat', '861 Narciso Glens Suite 392
|
| 28 |
+
East Ottis, ND 73970', 'Darlene', '1-224-619-0295x13195');
|
| 29 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (624, 'Stuyvesant Town', 'Stuyvesant Town', 'Studio', '101 Queenie Mountains Suite 619
|
| 30 |
+
New Korbinmouth, KS 88726-1376', 'Marie', '(145)411-6406');
|
| 31 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (644, 'The Anthem', 'The Anthem', 'Flat', '50804 Mason Isle Suite 844
|
| 32 |
+
West Whitney, ID 66511', 'Ewald', '(909)086-5221x3455');
|
| 33 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (673, 'Barclay Tower', 'Barclay Tower', 'Flat', '1579 Runte Forges Apt. 548
|
| 34 |
+
Leuschkeland, OK 12009-8683', 'Rogers', '1-326-267-3386x613');
|
| 35 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (734, 'Windsor Court', 'Windsor Court', 'Studio', '601 Graham Roads
|
| 36 |
+
Port Luz, VA 29660-6703', 'Olaf', '(480)480-7401');
|
| 37 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (744, 'Silver Towers', 'Silver Towers', 'Flat', '1844 Armstrong Stravenue Suite 853
|
| 38 |
+
Myrnatown, CT 13528', 'Claude', '1-667-728-2287x3158');
|
| 39 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (790, 'Biltmore Plaza', 'Biltmore Plaza', 'Duplex', '489 Josh Orchard Apt. 998
|
| 40 |
+
Sipesview, DE 69053', 'Sydni', '544-148-5565x2847');
|
| 41 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (808, 'Petersfield', 'Petersfield', 'Studio', '54686 Christopher Circles Apt. 321
|
| 42 |
+
Daytonland, ID 88081-3991', 'Juvenal', '318-398-8140');
|
| 43 |
+
INSERT INTO `Apartment_Buildings` (`building_id`, `building_short_name`, `building_full_name`, `building_description`, `building_address`, `building_manager`, `building_phone`) VALUES (968, 'The Clinton', 'The Clinton', 'Flat', '012 Arnoldo Mountain
|
| 44 |
+
Gerholdland, ID 23342', 'Holly', '1-605-511-1973x25011');
|
| 45 |
+
|
| 46 |
+
CREATE TABLE Apartments (
|
| 47 |
+
apt_id INTEGER NOT NULL ,
|
| 48 |
+
building_id INTEGER NOT NULL,
|
| 49 |
+
apt_type_code CHAR(15),
|
| 50 |
+
apt_number CHAR(10),
|
| 51 |
+
bathroom_count INTEGER,
|
| 52 |
+
bedroom_count INTEGER,
|
| 53 |
+
room_count CHAR(5),
|
| 54 |
+
PRIMARY KEY (apt_id),
|
| 55 |
+
UNIQUE (apt_id),
|
| 56 |
+
FOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)
|
| 57 |
+
);
|
| 58 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (1, 808, 'Flat', 'Suite 645', 1, 3, '7');
|
| 59 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (2, 624, 'Flat', 'Apt. 585', 2, 4, '5');
|
| 60 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (3, 225, 'Studio', 'Apt. 908', 1, 6, '7');
|
| 61 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (4, 225, 'Duplex', 'Suite 749', 1, 5, '8');
|
| 62 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (5, 744, 'Flat', 'Suite 307', 2, 4, '9');
|
| 63 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (6, 191, 'Studio', 'Apt. 187', 3, 5, '9');
|
| 64 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (7, 790, 'Studio', 'Suite 088', 2, 4, '6');
|
| 65 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (8, 153, 'Flat', 'Suite 693', 2, 3, '9');
|
| 66 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (9, 624, 'Studio', 'Apt. 940', 1, 4, '8');
|
| 67 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (10, 225, 'Duplex', 'Apt. 859', 2, 3, '6');
|
| 68 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (11, 734, 'Flat', 'Apt. 794', 1, 5, '3');
|
| 69 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (12, 673, 'Duplex', 'Apt. 477', 2, 6, '3');
|
| 70 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (13, 744, 'Duplex', 'Apt. 411', 2, 5, '9');
|
| 71 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (14, 225, 'Flat', 'Apt. 837', 2, 4, '8');
|
| 72 |
+
INSERT INTO `Apartments` (`apt_id`, `building_id`, `apt_type_code`, `apt_number`, `bathroom_count`, `bedroom_count`, `room_count`) VALUES (15, 790, 'Duplex', 'Suite 634', 3, 6, '8');
|
| 73 |
+
|
| 74 |
+
CREATE TABLE Apartment_Facilities (
|
| 75 |
+
apt_id INTEGER NOT NULL,
|
| 76 |
+
facility_code CHAR(15) NOT NULL,
|
| 77 |
+
PRIMARY KEY (apt_id, facility_code),
|
| 78 |
+
FOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)
|
| 79 |
+
);
|
| 80 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (1, 'Boardband');
|
| 81 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (2, 'Boardband');
|
| 82 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (3, 'Gym');
|
| 83 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (5, 'Swimming Pool');
|
| 84 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (6, 'Cable TV');
|
| 85 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (9, 'Boardband');
|
| 86 |
+
INSERT INTO `Apartment_Facilities` (`apt_id`, `facility_code`) VALUES (15, 'Gym');
|
| 87 |
+
CREATE TABLE Guests (
|
| 88 |
+
guest_id INTEGER NOT NULL ,
|
| 89 |
+
gender_code CHAR(1),
|
| 90 |
+
guest_first_name VARCHAR(80),
|
| 91 |
+
guest_last_name VARCHAR(80),
|
| 92 |
+
date_of_birth DATETIME,
|
| 93 |
+
PRIMARY KEY (guest_id),
|
| 94 |
+
UNIQUE (guest_id)
|
| 95 |
+
);
|
| 96 |
+
|
| 97 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (1, 'Male', 'Kip', 'DuBuque', '1995-11-04 07:09:57');
|
| 98 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (2, 'Unknown', 'Rebeca', 'Runolfsdottir', '1974-05-12 21:53:58');
|
| 99 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (3, 'Female', 'Keon', 'Treutel', '1974-08-20 09:28:05');
|
| 100 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (4, 'Female', 'Gabe', 'Bode', '2007-09-11 19:01:39');
|
| 101 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (5, 'Female', 'Lou', 'Grady', '1997-01-15 17:37:40');
|
| 102 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (6, 'Unknown', 'Josefina', 'Jerde', '1978-03-08 04:43:04');
|
| 103 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (7, 'Female', 'Mozell', 'Toy', '1997-01-20 17:11:31');
|
| 104 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (8, 'Unknown', 'Keith', 'Hoeger', '2001-06-18 20:05:55');
|
| 105 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (9, 'Female', 'Crystal', 'Runolfsson', '1971-01-04 04:22:58');
|
| 106 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (10, 'Female', 'Nikki', 'Lehner', '1980-06-20 18:15:39');
|
| 107 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (11, 'Male', 'Gregoria', 'Schowalter', '2015-02-03 23:34:13');
|
| 108 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (12, 'Male', 'Louvenia', 'Crona', '1983-08-26 15:45:08');
|
| 109 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (13, 'Female', 'Else', 'Roberts', '1971-11-02 01:51:56');
|
| 110 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (14, 'Female', 'Juvenal', 'Kautzer', '2003-07-29 22:08:15');
|
| 111 |
+
INSERT INTO `Guests` (`guest_id`, `gender_code`, `guest_first_name`, `guest_last_name`, `date_of_birth`) VALUES (15, 'Female', 'Tamia', 'Mante', '2013-02-22 11:26:22');
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
CREATE TABLE Apartment_Bookings (
|
| 115 |
+
apt_booking_id INTEGER NOT NULL,
|
| 116 |
+
apt_id INTEGER,
|
| 117 |
+
guest_id INTEGER NOT NULL,
|
| 118 |
+
booking_status_code CHAR(15) NOT NULL,
|
| 119 |
+
booking_start_date DATETIME,
|
| 120 |
+
booking_end_date DATETIME,
|
| 121 |
+
PRIMARY KEY (apt_booking_id),
|
| 122 |
+
UNIQUE (apt_booking_id),
|
| 123 |
+
FOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),
|
| 124 |
+
FOREIGN KEY (guest_id) REFERENCES Guests (guest_id)
|
| 125 |
+
);
|
| 126 |
+
CREATE TABLE View_Unit_Status (
|
| 127 |
+
apt_id INTEGER,
|
| 128 |
+
apt_booking_id INTEGER,
|
| 129 |
+
status_date DATETIME NOT NULL,
|
| 130 |
+
available_yn BIT,
|
| 131 |
+
PRIMARY KEY (status_date),
|
| 132 |
+
FOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),
|
| 133 |
+
FOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)
|
| 134 |
+
);
|
| 135 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (258, 10, 2, 'Provisional', '2016-09-26 17:13:49', '2017-10-07 11:38:48');
|
| 136 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (279, 15, 15, 'Provisional', '2016-04-01 06:28:08', '2017-10-25 11:08:42');
|
| 137 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (337, 8, 5, 'Provisional', '2017-03-13 16:20:14', '2018-02-19 16:59:08');
|
| 138 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (343, 4, 13, 'Confirmed', '2016-08-04 10:33:00', '2017-09-29 12:43:50');
|
| 139 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (365, 9, 12, 'Confirmed', '2017-02-11 14:34:14', '2017-10-07 20:47:19');
|
| 140 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (401, 7, 14, 'Provisional', '2016-05-24 20:09:38', '2017-10-03 01:56:21');
|
| 141 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (497, 10, 8, 'Confirmed', '2016-07-25 02:57:04', '2017-09-28 11:08:15');
|
| 142 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (526, 8, 7, 'Confirmed', '2016-11-26 05:04:31', '2018-02-25 15:15:37');
|
| 143 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (575, 6, 3, 'Provisional', '2017-05-13 18:17:20', '2017-10-06 11:15:58');
|
| 144 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (577, 12, 2, 'Provisional', '2017-03-04 02:23:49', '2018-02-06 16:57:05');
|
| 145 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (623, 4, 5, 'Provisional', '2016-06-07 05:05:18', '2017-11-13 13:59:45');
|
| 146 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (807, 11, 2, 'Provisional', '2016-04-17 12:53:59', '2018-03-20 17:32:58');
|
| 147 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (889, 10, 4, 'Confirmed', '2016-09-28 05:00:50', '2017-09-30 18:41:04');
|
| 148 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (920, 2, 2, 'Confirmed', '2017-04-07 04:53:27', '2017-11-29 12:59:42');
|
| 149 |
+
INSERT INTO `Apartment_Bookings` (`apt_booking_id`, `apt_id`, `guest_id`, `booking_status_code`, `booking_start_date`, `booking_end_date`) VALUES (924, 8, 3, 'Confirmed', '2017-07-03 14:15:56', '2017-11-12 01:05:09');
|
| 150 |
+
|
| 151 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (11, 920, '1970-09-28 10:24:29', '1');
|
| 152 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (15, 575, '1972-03-23 22:55:53', '1');
|
| 153 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (15, 924, '1973-10-28 04:30:14', '1');
|
| 154 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (6, 497, '1976-12-18 04:03:51', '1');
|
| 155 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (12, 807, '1977-04-15 13:42:19', '1');
|
| 156 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (13, 575, '1978-12-28 11:53:34', '1');
|
| 157 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (2, 497, '1980-11-12 13:34:45', '1');
|
| 158 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (14, 401, '1985-11-05 11:46:35', '0');
|
| 159 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (11, 497, '1990-11-04 17:57:50', '1');
|
| 160 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (13, 337, '2000-02-04 07:50:09', '0');
|
| 161 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (14, 279, '2001-02-17 20:17:09', '1');
|
| 162 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (5, 337, '2003-07-25 10:13:48', '1');
|
| 163 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (1, 497, '2003-08-02 08:36:36', '1');
|
| 164 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (10, 497, '2006-02-23 05:50:04', '1');
|
| 165 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (6, 401, '2011-02-12 09:04:07', '1');
|
| 166 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (9, 623, '2011-11-06 22:08:42', '1');
|
| 167 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (14, 920, '2012-11-24 13:39:37', '0');
|
| 168 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (4, 258, '2014-12-10 13:53:21', '1');
|
| 169 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (13, 343, '2015-06-19 07:59:01', '1');
|
| 170 |
+
INSERT INTO `View_Unit_Status` (`apt_id`, `apt_booking_id`, `status_date`, `available_yn`) VALUES (5, 889, '2015-07-15 11:06:29', '1');
|
database/battle_death/battle_death.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/battle_death/schema.sql
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
CREATE TABLE "battle" (
|
| 3 |
+
"id" int,
|
| 4 |
+
"name" text,
|
| 5 |
+
"date" text,
|
| 6 |
+
"bulgarian_commander" text,
|
| 7 |
+
"latin_commander" text,
|
| 8 |
+
"result" text,
|
| 9 |
+
primary key("id")
|
| 10 |
+
);
|
| 11 |
+
|
| 12 |
+
CREATE TABLE "ship" (
|
| 13 |
+
"lost_in_battle" int,
|
| 14 |
+
"id" int,
|
| 15 |
+
"name" text,
|
| 16 |
+
"tonnage" text,
|
| 17 |
+
"ship_type" text,
|
| 18 |
+
"location" text,
|
| 19 |
+
"disposition_of_ship" text,
|
| 20 |
+
primary key("id"),
|
| 21 |
+
foreign key (`lost_in_battle`) references `battle`("id")
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
CREATE TABLE "death" (
|
| 26 |
+
"caused_by_ship_id" int,
|
| 27 |
+
"id" int,
|
| 28 |
+
"note" text,
|
| 29 |
+
"killed" int,
|
| 30 |
+
"injured" int,
|
| 31 |
+
primary key("id"),
|
| 32 |
+
foreign key ("caused_by_ship_id") references `ship`("id")
|
| 33 |
+
);
|
| 34 |
+
|
| 35 |
+
INSERT INTO "battle" VALUES (1,"Battle of Adrianople","14 April 1205","Kaloyan","Baldwin I","Bulgarian victory");
|
| 36 |
+
INSERT INTO "battle" VALUES (2,"Battle of Serres","June 1205","Kaloyan","Unknown","Bulgarian victory");
|
| 37 |
+
INSERT INTO "battle" VALUES (3,"Battle of Rusion","31 January 1206","Kaloyan","Thierry de Termond","Bulgarian victory");
|
| 38 |
+
INSERT INTO "battle" VALUES (4,"Battle of Rodosto","February 1206","Kaloyan","Unknown","Bulgarian victory");
|
| 39 |
+
INSERT INTO "battle" VALUES (5,"Battle of Messinopolis","4 September 1207","Unknown","Boniface of Montferrat","Bulgarian victory");
|
| 40 |
+
INSERT INTO "battle" VALUES (6,"Battle of Boruy","June 1205","Boril","Henry I","Bulgarian victory");
|
| 41 |
+
INSERT INTO "battle" VALUES (7,"Battle of Philippopolis","31 June 1208","Boril","Henry I","Latin victory");
|
| 42 |
+
INSERT INTO "battle" VALUES (8,"Siege of Constantinople","1235","Ivan Asen II","John of Brienne","Two Year Truce");
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
INSERT INTO "ship" VALUES (8, 1, "Lettice","t","Brig","English Channel","Captured");
|
| 46 |
+
INSERT INTO "ship" VALUES (7, 2, "Bon Accord","t","Brig","English Channel","Captured");
|
| 47 |
+
INSERT INTO "ship" VALUES (6, 3, "Mary","t","Brig","English Channel","Captured");
|
| 48 |
+
INSERT INTO "ship" VALUES (5, 4, "HMS Avon","391","18-gun Brig","English Channel","Wrecked");
|
| 49 |
+
INSERT INTO "ship" VALUES (5, 5, "Three Brothers","t","Brig","SW Approaches","Scuttled");
|
| 50 |
+
INSERT INTO "ship" VALUES (4, 6, "Bacchus","t","Brig","English Channel","Sank");
|
| 51 |
+
INSERT INTO "ship" VALUES (8, 7, "HMS Atalanta","225","8 gun Brig","Mid-Atlantic","Captured");
|
| 52 |
+
|
| 53 |
+
INSERT INTO "death" VALUES (1, "1","Dantewada, Chhattisgarh","8","0");
|
| 54 |
+
INSERT INTO "death" VALUES (2, "2","Dantewada, Chhattisgarh","3","0");
|
| 55 |
+
INSERT INTO "death" VALUES (3, "13","Erraboru, Chhattisgarh","25","0");
|
| 56 |
+
INSERT INTO "death" VALUES (3, "3","East Champaran, Bihar","2","0");
|
| 57 |
+
INSERT INTO "death" VALUES (4, "4","Gajapati, Odisha","3","0");
|
| 58 |
+
INSERT INTO "death" VALUES (4, "5","Sundargarh, Odisha","0","9");
|
| 59 |
+
INSERT INTO "death" VALUES (5, "6","Dantewada, Chhattisgarh","0","0");
|
| 60 |
+
INSERT INTO "death" VALUES (5, "7","Dantewada, Chhattisgarh","4","5");
|
| 61 |
+
INSERT INTO "death" VALUES (6, "8","Kanker, Chhattisgarh","0","0");
|
| 62 |
+
INSERT INTO "death" VALUES (1, "9","Dantewada, Chhattisgarh","29","0");
|
| 63 |
+
INSERT INTO "death" VALUES (3, "10","WestMidnapore, West Bengal","0","0");
|
| 64 |
+
INSERT INTO "death" VALUES (2, "11","Bastar, Chattisgarh","0","0");
|
| 65 |
+
INSERT INTO "death" VALUES (5, "12","Bokaro, Jharkhand","14","0");
|
database/behavior_monitoring/behavior_monitoring.sqlite
ADDED
|
Binary file (65.5 kB). View file
|
|
|
database/behavior_monitoring/schema.sql
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
CREATE TABLE `Ref_Address_Types` (
|
| 3 |
+
`address_type_code` VARCHAR(15) PRIMARY KEY,
|
| 4 |
+
`address_type_description` VARCHAR(80)
|
| 5 |
+
);
|
| 6 |
+
CREATE TABLE `Ref_Detention_Type` (
|
| 7 |
+
`detention_type_code` VARCHAR(10) PRIMARY KEY,
|
| 8 |
+
`detention_type_description` VARCHAR(80)
|
| 9 |
+
);
|
| 10 |
+
CREATE TABLE `Ref_Incident_Type` (
|
| 11 |
+
`incident_type_code` VARCHAR(10) PRIMARY KEY,
|
| 12 |
+
`incident_type_description` VARCHAR(80)
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
INSERT INTO Ref_Address_Types (`address_type_code`, `address_type_description`) VALUES ('BILL', 'Billing');
|
| 16 |
+
INSERT INTO Ref_Address_Types (`address_type_code`, `address_type_description`) VALUES ('HOME', 'Home or Residence');
|
| 17 |
+
INSERT INTO Ref_Detention_Type (`detention_type_code`, `detention_type_description`) VALUES ('BREAK ', 'During Break time');
|
| 18 |
+
INSERT INTO Ref_Detention_Type (`detention_type_code`, `detention_type_description`) VALUES ('AFTER', 'After School');
|
| 19 |
+
INSERT INTO Ref_Detention_Type (`detention_type_code`, `detention_type_description`) VALUES ('LUNCH', 'Lunch-time');
|
| 20 |
+
INSERT INTO Ref_Incident_Type (`incident_type_code`, `incident_type_description`) VALUES ('NOISE', 'Noise');
|
| 21 |
+
INSERT INTO Ref_Incident_Type (`incident_type_code`, `incident_type_description`) VALUES ('VIOLENCE', 'Violence');
|
| 22 |
+
INSERT INTO Ref_Incident_Type (`incident_type_code`, `incident_type_description`) VALUES ('DISTURB', 'Disturbance');
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
CREATE TABLE `Addresses` (
|
| 28 |
+
`address_id` INTEGER PRIMARY KEY,
|
| 29 |
+
`line_1` VARCHAR(120),
|
| 30 |
+
`line_2` VARCHAR(120),
|
| 31 |
+
`line_3` VARCHAR(120),
|
| 32 |
+
`city` VARCHAR(80),
|
| 33 |
+
`zip_postcode` VARCHAR(20),
|
| 34 |
+
`state_province_county` VARCHAR(50),
|
| 35 |
+
`country` VARCHAR(50),
|
| 36 |
+
`other_address_details` VARCHAR(255)
|
| 37 |
+
);
|
| 38 |
+
|
| 39 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (1, '020 Orie Canyon', NULL, NULL, 'North Loyceville', '197', 'Hawaii', 'USA', NULL);
|
| 40 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (2, '1333 Boyle Lane', NULL, NULL, 'West Sean', '937', 'Illinois', 'USA', NULL);
|
| 41 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (3, '027 Kim Divide Apt. 492', NULL, NULL, 'Beierview', '918', 'Texas', 'USA', NULL);
|
| 42 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (4, '056 Murphy Stravenue Apt. 600', NULL, NULL, 'Elinoreport', '238', 'Wisconsin', 'USA', NULL);
|
| 43 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (5, '719 Pfannerstill Ridge Suite 663', NULL, NULL, 'Meganeland', '002', 'SouthDakota', 'USA', NULL);
|
| 44 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (6, '420 Zieme Oval', NULL, NULL, 'Corkeryborough', '744', 'Wisconsin', 'USA', NULL);
|
| 45 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (7, '27712 Marks Lake Apt. 752', NULL, NULL, 'Gleasonshire', '182', 'Maryland', 'USA', NULL);
|
| 46 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (8, '6960 O''Connell Dale Suite 622', NULL, NULL, 'New Annabellefort', '062', 'Kentucky', 'USA', NULL);
|
| 47 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (9, '18327 Jaime Terrace Suite 343', NULL, NULL, 'Edmundton', '520', 'Oregon', 'USA', NULL);
|
| 48 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (10, '3069 Garrison Squares', NULL, NULL, 'Lake Ahmadland', '748', 'Nevada', 'USA', NULL);
|
| 49 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (11, '668 Wilkinson Corners Apt. 992', NULL, NULL, 'North Jayceton', '612', 'Illinois', 'USA', NULL);
|
| 50 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (12, '11940 Pauline Shoals', NULL, NULL, 'West Lianafurt', '619', 'Arkansas', 'USA', NULL);
|
| 51 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (13, '39834 Anne Mission Apt. 956', NULL, NULL, 'North Orlobury', '663', 'Utah', 'USA', NULL);
|
| 52 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (14, '4115 Ebert Fall', NULL, NULL, 'North Fletcherside', '607', 'Arizona', 'USA', NULL);
|
| 53 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (15, '920 Brayan Harbors', NULL, NULL, 'Caitlynstad', '435', 'Montana', 'USA', NULL);
|
| 54 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (16, '014 Runte Haven Apt. 870', NULL, NULL, 'Tressamouth', '637', 'NewYork', 'USA', NULL);
|
| 55 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (17, '654 Fisher Roads', NULL, NULL, 'Hegmannborough', '397', 'Tennessee', 'USA', NULL);
|
| 56 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (18, '266 Kub Crossing', NULL, NULL, 'Hintzport', '865', 'Alabama', 'USA', NULL);
|
| 57 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (19, '51391 Dach Parkways Apt. 124', NULL, NULL, 'Unachester', '753', 'Wisconsin', 'USA', NULL);
|
| 58 |
+
INSERT INTO Addresses (`address_id`, `line_1`, `line_2`, `line_3`, `city`, `zip_postcode`, `state_province_county`, `country`, `other_address_details`) VALUES (20, '2451 Wiza Inlet', NULL, NULL, 'Larkinport', '545', 'NewYork', 'USA', NULL);
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
CREATE TABLE `Students` (
|
| 62 |
+
`student_id` INTEGER PRIMARY KEY,
|
| 63 |
+
`address_id` INTEGER NOT NULL,
|
| 64 |
+
`first_name` VARCHAR(80),
|
| 65 |
+
`middle_name` VARCHAR(40),
|
| 66 |
+
`last_name` VARCHAR(40),
|
| 67 |
+
`cell_mobile_number` VARCHAR(40),
|
| 68 |
+
`email_address` VARCHAR(40),
|
| 69 |
+
`date_first_rental` DATETIME,
|
| 70 |
+
`date_left_university` DATETIME,
|
| 71 |
+
`other_student_details` VARCHAR(255),
|
| 72 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 73 |
+
);
|
| 74 |
+
|
| 75 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (1, 19, 'Emma', 'Frederic', 'Rohan', '235.899.9744', 'derrick.jenkins@example.com', '2017-12-05 15:20:04', '2018-03-03 03:33:05', NULL);
|
| 76 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (2, 9, 'Louvenia', 'Fatima', 'Hansen', '1-247-673-8446', 'rohan.clarabelle@example.org', '2017-08-08 22:30:36', '2018-02-24 11:12:11', NULL);
|
| 77 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (3, 10, 'Rhea', 'Gardner', 'Bergnaum', '1-751-162-9676x115', 'kkirlin@example.org', '2017-11-15 04:57:28', '2018-03-19 12:49:20', NULL);
|
| 78 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (4, 8, 'David', 'Darlene', 'Gorczany', '1-895-196-9979', 'eolson@example.com', '2018-02-15 20:03:11', '2018-03-11 02:21:24', NULL);
|
| 79 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (5, 8, 'Lucile', 'Stone', 'Gottlieb', '1-036-062-5465', 'dicki.kathryne@example.org', '2017-07-20 18:20:27', '2018-03-18 16:07:42', NULL);
|
| 80 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (6, 12, 'Antonietta', 'Crystal', 'Fahey', '(874)070-9495', 'norwood.howell@example.org', '2017-10-31 12:33:09', '2018-03-20 22:01:07', NULL);
|
| 81 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (7, 20, 'Rupert', 'Lincoln', 'Marks', '763.072.5520x5907', 'lisette.brekke@example.net', '2017-09-25 12:02:23', '2018-03-01 08:56:04', 'first honor');
|
| 82 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (8, 14, 'Julia', 'Arno', 'Balistreri', '319.497.4575x2214', 'jasmin.schuppe@example.com', '2018-02-23 02:28:07', '2018-03-01 16:03:55', NULL);
|
| 83 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (9, 19, 'Christy', 'Devonte', 'Huels', '(568)451-0917x3945', 'dora.zboncak@example.org', '2018-01-11 19:49:39', '2018-03-15 01:47:11', NULL);
|
| 84 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (10, 2, 'Adella', 'Chesley', 'Krajcik', '08605192839', 'frederique.mante@example.org', '2017-07-05 19:15:29', '2018-03-11 15:57:19', 'first honor');
|
| 85 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (11, 2, 'Isac', 'Cleta', 'Fadel', '+60(5)3280072514', 'qharvey@example.com', '2017-09-13 04:06:15', '2018-03-05 07:30:22', 'first honor');
|
| 86 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (12, 1, 'Ferne', 'Jerod', 'Weimann', '(921)011-7909x3518', 'mitchel55@example.net', '2017-05-24 05:00:18', '2018-02-28 12:33:53', NULL);
|
| 87 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (13, 17, 'Misael', 'Justyn', 'Will', '(062)892-7033', 'gbeatty@example.com', '2017-10-15 06:52:46', '2018-03-18 07:01:27', NULL);
|
| 88 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (14, 9, 'Fanny', 'Ashlee', 'Haley', '(820)260-5721', 'foster.zemlak@example.com', '2018-03-14 11:37:10', '2018-03-12 15:05:53', NULL);
|
| 89 |
+
INSERT INTO Students (`student_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `cell_mobile_number`, `email_address`, `date_first_rental`, `date_left_university`, `other_student_details`) VALUES (15, 15, 'Eugene', 'Mustafa', 'Tremblay', '1-498-138-8088', 'kertzmann.devon@example.net', '2018-03-11 22:42:47', '2018-03-07 11:41:26', 'first honor');
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
CREATE TABLE `Teachers` (
|
| 93 |
+
`teacher_id` INTEGER PRIMARY KEY,
|
| 94 |
+
`address_id` INTEGER NOT NULL,
|
| 95 |
+
`first_name` VARCHAR(80),
|
| 96 |
+
`middle_name` VARCHAR(80),
|
| 97 |
+
`last_name` VARCHAR(80),
|
| 98 |
+
`gender` VARCHAR(1),
|
| 99 |
+
`cell_mobile_number` VARCHAR(40),
|
| 100 |
+
`email_address` VARCHAR(40),
|
| 101 |
+
`other_details` VARCHAR(255),
|
| 102 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )
|
| 103 |
+
);
|
| 104 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (1, 15, 'Lyla', 'Wilson', 'Medhurst', '1', '792.333.7714', 'ohammes@example.com', NULL);
|
| 105 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (2, 7, 'Sid', 'Tremayne', 'Brakus', '1', '202.626.1698x9242', 'deborah37@example.com', NULL);
|
| 106 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (3, 8, 'Trystan', 'Alexane', 'Schuster', '1', '583-467-0403x647', 'hilll.kitty@example.com', NULL);
|
| 107 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (4, 7, 'Donnie', 'Morgan', 'Kuhic', '1', '07928511102', 'destany.reichert@example.net', NULL);
|
| 108 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (5, 15, 'Aniya', 'Ian', 'Becker', '1', '599.373.0773x67706', 'hahn.isom@example.com', 'Dean');
|
| 109 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (6, 16, 'Citlalli', 'Ahmad', 'Kuhic', '1', '017.636.7409', 'kozey.adeline@example.org', NULL);
|
| 110 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (7, 3, 'Alvis', 'Macey', 'Schultz', '1', '944-154-5379x4990', 'everardo.lynch@example.net', NULL);
|
| 111 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (8, 13, 'Cecilia', 'Mitchel', 'Ward', '0', '809.852.7009', 'paula.abbott@example.org', NULL);
|
| 112 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (9, 2, 'Woodrow', 'Lilla', 'Goldner', '1', '084-270-4880', 'ierdman@example.com', NULL);
|
| 113 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (10, 8, 'Gregory', 'Ardith', 'Heller', '0', '908-759-1808x63115', 'valentina.yost@example.com', NULL);
|
| 114 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (11, 12, 'Edmond', 'Kailyn', 'Lang', '0', '(659)018-0143x379', 'lila58@example.com', NULL);
|
| 115 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (12, 10, 'Camren', 'Kendall', 'Moore', '1', '(381)799-4759x169', 'randy.gerhold@example.org', NULL);
|
| 116 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (13, 19, 'Stephanie', 'Tamara', 'Price', '0', '952.821.3392', 'kiana.lang@example.net', NULL);
|
| 117 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (14, 14, 'Evelyn', 'Keanu', 'Hansen', '0', '1-787-044-8336x606', 'maribel21@example.org', NULL);
|
| 118 |
+
INSERT INTO Teachers (`teacher_id`, `address_id`, `first_name`, `middle_name`, `last_name`, `gender`, `cell_mobile_number`, `email_address`, `other_details`) VALUES (15, 10, 'Hobart', 'Michel', 'Bergnaum', '1', '796-453-5175x64012', 'willms.lane@example.com', NULL);
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
CREATE TABLE `Assessment_Notes` (
|
| 122 |
+
`notes_id` INTEGER NOT NULL ,
|
| 123 |
+
`student_id` INTEGER,
|
| 124 |
+
`teacher_id` INTEGER NOT NULL,
|
| 125 |
+
`date_of_notes` DATETIME,
|
| 126 |
+
`text_of_notes` VARCHAR(255),
|
| 127 |
+
`other_details` VARCHAR(255),
|
| 128 |
+
FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),
|
| 129 |
+
FOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )
|
| 130 |
+
);
|
| 131 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (1, 7, 3, '1978-04-15 04:49:18', NULL, NULL);
|
| 132 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (2, 11, 10, '2005-06-30 02:48:35', NULL, NULL);
|
| 133 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (3, 15, 3, '1988-06-09 00:24:01', NULL, NULL);
|
| 134 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (4, 12, 9, '1991-08-15 01:22:08', NULL, NULL);
|
| 135 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (5, 4, 10, '1971-05-05 20:07:08', NULL, NULL);
|
| 136 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (6, 12, 6, '2014-01-31 02:05:02', NULL, NULL);
|
| 137 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (7, 12, 7, '1984-12-13 23:04:28', NULL, NULL);
|
| 138 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (8, 7, 14, '1988-04-11 04:56:26', NULL, NULL);
|
| 139 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (9, 14, 15, '1972-04-27 04:51:51', NULL, NULL);
|
| 140 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (10, 13, 6, '2017-12-14 08:21:54', NULL, NULL);
|
| 141 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (11, 3, 14, '1993-08-16 17:39:53', NULL, NULL);
|
| 142 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (12, 1, 1, '1991-08-20 08:03:23', NULL, NULL);
|
| 143 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (13, 13, 3, '2014-04-28 02:07:53', NULL, NULL);
|
| 144 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (14, 14, 15, '1974-11-26 04:23:22', NULL, NULL);
|
| 145 |
+
INSERT INTO Assessment_Notes (`notes_id`, `student_id`, `teacher_id`, `date_of_notes`, `text_of_notes`, `other_details`) VALUES (15, 1, 9, '1984-09-10 01:18:34', NULL, NULL);
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
CREATE TABLE `Behavior_Incident` (
|
| 149 |
+
`incident_id` INTEGER PRIMARY KEY,
|
| 150 |
+
`incident_type_code` VARCHAR(10) NOT NULL,
|
| 151 |
+
`student_id` INTEGER NOT NULL,
|
| 152 |
+
`date_incident_start` DATETIME,
|
| 153 |
+
`date_incident_end` DATETIME,
|
| 154 |
+
`incident_summary` VARCHAR(255),
|
| 155 |
+
`recommendations` VARCHAR(255),
|
| 156 |
+
`other_details` VARCHAR(255),
|
| 157 |
+
FOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),
|
| 158 |
+
FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )
|
| 159 |
+
);
|
| 160 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (1, 'NOISE', 6, '2017-07-09 10:04:13', '2018-03-08 14:08:54', NULL, NULL, NULL);
|
| 161 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (2, 'DISTURB', 13, '2018-01-31 10:51:13', '2018-03-18 18:40:05', NULL, NULL, NULL);
|
| 162 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (3, 'VIOLENCE', 1, '2017-10-10 22:43:54', '2018-03-22 02:10:35', NULL, 'Transfer schools', NULL);
|
| 163 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (4, 'VIOLENCE', 10, '2017-07-20 17:43:50', '2018-03-09 06:28:44', NULL, NULL, NULL);
|
| 164 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (5, 'NOISE', 7, '2017-08-13 22:15:05', '2018-02-25 05:38:58', NULL, NULL, NULL);
|
| 165 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (6, 'VIOLENCE', 8, '2017-06-09 18:32:28', '2018-03-20 10:32:10', NULL, NULL, NULL);
|
| 166 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (7, 'VIOLENCE', 4, '2017-04-23 07:03:17', '2018-03-19 02:35:39', NULL, NULL, NULL);
|
| 167 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (8, 'DISTURB', 1, '2017-05-02 12:52:09', '2018-03-18 01:23:29', NULL, NULL, NULL);
|
| 168 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (9, 'NOISE', 11, '2017-06-19 14:25:54', '2018-03-08 09:36:36', NULL, NULL, NULL);
|
| 169 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (10, 'NOISE', 1, '2018-01-27 09:24:45', '2018-03-13 05:18:05', NULL, NULL, NULL);
|
| 170 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (11, 'VIOLENCE', 9, '2018-03-06 21:03:58', '2018-03-06 14:44:37', NULL, 'Transfer schools', NULL);
|
| 171 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (12, 'DISTURB', 7, '2017-08-27 03:21:30', '2018-03-02 16:06:34', NULL, NULL, NULL);
|
| 172 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (13, 'VIOLENCE', 5, '2017-05-25 15:02:53', '2018-03-10 21:12:22', NULL, NULL, NULL);
|
| 173 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (14, 'NOISE', 1, '2017-08-29 20:48:56', '2018-03-16 14:37:20', NULL, 'Transfer schools', NULL);
|
| 174 |
+
INSERT INTO Behavior_Incident (`incident_id`, `incident_type_code`, `student_id`, `date_incident_start`, `date_incident_end`, `incident_summary`, `recommendations`, `other_details`) VALUES (15, 'NOISE', 15, '2018-02-05 13:13:45', '2018-03-08 09:00:48', NULL, NULL, NULL);
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
CREATE TABLE `Detention` (
|
| 178 |
+
`detention_id` INTEGER PRIMARY KEY,
|
| 179 |
+
`detention_type_code` VARCHAR(10) NOT NULL,
|
| 180 |
+
`teacher_id` INTEGER,
|
| 181 |
+
`datetime_detention_start` DATETIME,
|
| 182 |
+
`datetime_detention_end` DATETIME,
|
| 183 |
+
`detention_summary` VARCHAR(255),
|
| 184 |
+
`other_details` VARCHAR(255),
|
| 185 |
+
FOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),
|
| 186 |
+
FOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )
|
| 187 |
+
);
|
| 188 |
+
|
| 189 |
+
CREATE TABLE `Student_Addresses` (
|
| 190 |
+
`student_id` INTEGER NOT NULL,
|
| 191 |
+
`address_id` INTEGER NOT NULL,
|
| 192 |
+
`date_address_from` DATETIME NOT NULL,
|
| 193 |
+
`date_address_to` DATETIME,
|
| 194 |
+
`monthly_rental` DECIMAL(19,4),
|
| 195 |
+
`other_details` VARCHAR(255),
|
| 196 |
+
FOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),
|
| 197 |
+
FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )
|
| 198 |
+
);
|
| 199 |
+
|
| 200 |
+
CREATE TABLE `Students_in_Detention` (
|
| 201 |
+
`student_id` INTEGER NOT NULL,
|
| 202 |
+
`detention_id` INTEGER NOT NULL,
|
| 203 |
+
`incident_id` INTEGER NOT NULL,
|
| 204 |
+
FOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),
|
| 205 |
+
FOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),
|
| 206 |
+
FOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )
|
| 207 |
+
);
|
| 208 |
+
|
| 209 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (1, 'AFTER', 7, '2017-09-05 00:38:25', '2018-03-08 02:08:32', NULL, NULL);
|
| 210 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (2, 'AFTER', 14, '2018-01-10 08:09:02', '2018-03-07 04:24:48', NULL, NULL);
|
| 211 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (3, 'BREAK ', 11, '2017-12-14 06:40:29', '2018-03-08 09:16:38', NULL, NULL);
|
| 212 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (4, 'AFTER', 8, '2017-06-09 06:13:09', '2018-03-21 19:34:56', NULL, NULL);
|
| 213 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (5, 'BREAK ', 3, '2017-08-25 12:00:46', '2018-03-11 13:21:07', NULL, NULL);
|
| 214 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (6, 'BREAK ', 12, '2017-10-20 22:34:44', '2018-03-11 12:58:40', NULL, NULL);
|
| 215 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (7, 'BREAK ', 15, '2018-02-19 11:44:52', '2018-03-17 12:35:41', NULL, NULL);
|
| 216 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (8, 'BREAK ', 5, '2017-11-26 15:05:05', '2018-03-16 01:37:25', NULL, NULL);
|
| 217 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (9, 'LUNCH', 15, '2017-10-30 16:04:00', '2018-03-22 20:15:47', NULL, NULL);
|
| 218 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (10, 'AFTER', 15, '2018-01-29 20:43:45', '2018-03-05 03:31:24', NULL, NULL);
|
| 219 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (11, 'AFTER', 8, '2017-10-03 18:44:31', '2018-03-03 14:58:43', NULL, NULL);
|
| 220 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (12, 'LUNCH', 3, '2018-01-20 19:06:56', '2018-02-25 07:20:30', NULL, NULL);
|
| 221 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (13, 'BREAK ', 10, '2017-08-02 07:46:39', '2018-03-10 14:58:31', NULL, NULL);
|
| 222 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (14, 'AFTER', 12, '2017-12-18 13:47:51', '2018-03-04 20:52:51', NULL, NULL);
|
| 223 |
+
INSERT INTO Detention (`detention_id`, `detention_type_code`, `teacher_id`, `datetime_detention_start`, `datetime_detention_end`, `detention_summary`, `other_details`) VALUES (15, 'LUNCH', 11, '2017-08-21 06:41:29', '2018-03-13 20:37:39', NULL, NULL);
|
| 224 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (6, 12, '2017-10-16 13:56:34', '2018-03-15 10:37:19', '826.4319', 'house');
|
| 225 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (3, 18, '2017-06-19 12:39:39', '2018-03-02 00:19:57', '1113.0996', 'house');
|
| 226 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (8, 1, '2017-10-31 12:40:34', '2018-02-25 05:21:34', '1297.3186', 'apartment');
|
| 227 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (7, 3, '2017-04-28 06:27:14', '2018-03-23 09:52:56', '894.0958', 'house');
|
| 228 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (13, 16, '2018-03-23 08:25:36', '2018-03-12 17:21:24', '1297.8070', 'apartment');
|
| 229 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (11, 12, '2018-02-18 06:58:49', '2018-02-27 04:45:57', '747.5312', 'house');
|
| 230 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (4, 1, '2017-06-22 12:20:52', '2018-03-04 17:04:35', '756.6745', 'house');
|
| 231 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (2, 8, '2017-07-21 10:13:10', '2018-03-20 09:02:48', '1287.5604', 'house');
|
| 232 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (7, 13, '2018-01-13 22:56:06', '2018-03-22 17:56:20', '1067.8383', 'house');
|
| 233 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (4, 2, '2017-09-10 19:41:10', '2018-03-04 06:51:19', '1132.7420', 'house');
|
| 234 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (8, 16, '2018-01-12 13:23:23', '2018-03-04 06:05:45', '683.0735', 'house');
|
| 235 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (5, 13, '2017-03-29 18:22:55', '2018-03-14 09:12:05', '1036.8462', 'apartment');
|
| 236 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (2, 3, '2017-08-12 18:28:31', '2018-03-06 21:41:20', '800.1214', 'house');
|
| 237 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (2, 8, '2017-04-18 05:36:44', '2018-03-07 04:29:28', '865.2615', 'house');
|
| 238 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (9, 9, '2018-02-04 02:28:04', '2018-03-12 02:57:48', '679.2988', 'house');
|
| 239 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (13, 19, '2017-08-17 11:51:00', '2018-03-04 13:24:28', '644.9306', 'apartment');
|
| 240 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (15, 1, '2018-03-05 19:28:26', '2018-03-15 04:44:58', '1032.8717', 'apartment');
|
| 241 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (12, 10, '2017-09-23 05:16:17', '2018-03-05 21:12:37', '1032.9782', 'apartment');
|
| 242 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (1, 5, '2017-11-12 04:24:02', '2018-03-14 17:00:44', '1007.2597', 'apartment');
|
| 243 |
+
INSERT INTO Student_Addresses (`student_id`, `address_id`, `date_address_from`, `date_address_to`, `monthly_rental`, `other_details`) VALUES (10, 18, '2017-10-09 17:31:44', '2018-03-18 03:28:47', '620.2801', 'house');
|
| 244 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (3, 15, 1);
|
| 245 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (8, 13, 3);
|
| 246 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (11, 6, 11);
|
| 247 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (12, 12, 1);
|
| 248 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (14, 15, 13);
|
| 249 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (7, 7, 8);
|
| 250 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (13, 9, 12);
|
| 251 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (10, 14, 8);
|
| 252 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (12, 2, 13);
|
| 253 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (12, 12, 1);
|
| 254 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (9, 15, 15);
|
| 255 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (10, 7, 12);
|
| 256 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (13, 3, 3);
|
| 257 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (8, 15, 14);
|
| 258 |
+
INSERT INTO Students_in_Detention (`student_id`, `detention_id`, `incident_id`) VALUES (8, 14, 14);
|
database/chinook_1/annotation.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label_id": null,
|
| 3 |
+
"data": [],
|
| 4 |
+
"review_id": null
|
| 5 |
+
}
|
database/coffee_shop/coffee_shop.sqlite
ADDED
|
Binary file (36.9 kB). View file
|
|
|
database/coffee_shop/schema.sql
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
PRAGMA foreign_keys = ON;
|
| 3 |
+
CREATE TABLE "shop" (
|
| 4 |
+
"Shop_ID" int,
|
| 5 |
+
"Address" text,
|
| 6 |
+
"Num_of_staff" text,
|
| 7 |
+
"Score" real,
|
| 8 |
+
"Open_Year" text,
|
| 9 |
+
PRIMARY KEY ("Shop_ID")
|
| 10 |
+
);
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
INSERT INTO "shop" VALUES ("1","1200 Main Street","13","42","2010");
|
| 14 |
+
INSERT INTO "shop" VALUES ("2","1111 Main Street","19","38","2008");
|
| 15 |
+
INSERT INTO "shop" VALUES ("3","1330 Baltimore Street","42","36","2010");
|
| 16 |
+
INSERT INTO "shop" VALUES ("4","909 Walnut Street","27","32","2010");
|
| 17 |
+
INSERT INTO "shop" VALUES ("5","414 E. 12th Street","24","30","2011");
|
| 18 |
+
INSERT INTO "shop" VALUES ("6","1201 Walnut Street","34","30","2010");
|
| 19 |
+
INSERT INTO "shop" VALUES ("7","2345 McGee Street","425","40","2008");
|
| 20 |
+
INSERT INTO "shop" VALUES ("8","909 Main Street","28","30","2011");
|
| 21 |
+
INSERT INTO "shop" VALUES ("9","1100 Main Street","23","30","2006");
|
| 22 |
+
INSERT INTO "shop" VALUES ("10","324 E. 11th Street","16","28","2008");
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
CREATE TABLE "member" (
|
| 27 |
+
"Member_ID" int,
|
| 28 |
+
"Name" text,
|
| 29 |
+
"Membership_card" text,
|
| 30 |
+
"Age" int,
|
| 31 |
+
"Time_of_purchase" int,
|
| 32 |
+
"Level_of_membership" int,
|
| 33 |
+
"Address" text,
|
| 34 |
+
PRIMARY KEY ("Member_ID")
|
| 35 |
+
);
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
INSERT INTO "member" VALUES (1,"Ashby, Lazale","Black","29","18","5","Hartford");
|
| 39 |
+
INSERT INTO "member" VALUES (2,"Breton, Robert","White","67","41","4","Waterbury");
|
| 40 |
+
INSERT INTO "member" VALUES (3,"Campbell, Jessie","Black","34","20","6","Hartford");
|
| 41 |
+
INSERT INTO "member" VALUES (4,"Cobb, Sedrick","Black","51","27","2","Waterbury");
|
| 42 |
+
INSERT INTO "member" VALUES (5,"Hayes, Steven","White","50","44","3","Cheshire");
|
| 43 |
+
INSERT INTO "member" VALUES (6,"Komisarjevsky, Joshua","White","33","26","2","Cheshire");
|
| 44 |
+
INSERT INTO "member" VALUES (7,"Peeler, Russell","Black","42","26","6","Bridgeport");
|
| 45 |
+
INSERT INTO "member" VALUES (8,"Reynolds, Richard","Black","45","24","1","Waterbury");
|
| 46 |
+
INSERT INTO "member" VALUES (9,"Rizzo, Todd","White","35","18","4","Waterbury");
|
| 47 |
+
INSERT INTO "member" VALUES (10,"Webb, Daniel","Black","51","27","22","Hartford");
|
| 48 |
+
|
| 49 |
+
CREATE TABLE "happy_hour" (
|
| 50 |
+
"HH_ID" int,
|
| 51 |
+
"Shop_ID" int,
|
| 52 |
+
"Month" text,
|
| 53 |
+
"Num_of_shaff_in_charge" int,
|
| 54 |
+
PRIMARY KEY ("HH_ID","Shop_ID","Month"),
|
| 55 |
+
FOREIGN KEY ("Shop_ID") REFERENCES `shop`("Shop_ID")
|
| 56 |
+
);
|
| 57 |
+
|
| 58 |
+
INSERT INTO "happy_hour" VALUES (1,1,"May",10);
|
| 59 |
+
INSERT INTO "happy_hour" VALUES (2,1,"April",12);
|
| 60 |
+
INSERT INTO "happy_hour" VALUES (3,10,"June",15);
|
| 61 |
+
INSERT INTO "happy_hour" VALUES (4,5,"July",5);
|
| 62 |
+
INSERT INTO "happy_hour" VALUES (5,1,"May",10);
|
| 63 |
+
INSERT INTO "happy_hour" VALUES (6,1,"April",12);
|
| 64 |
+
INSERT INTO "happy_hour" VALUES (7,2,"June",5);
|
| 65 |
+
INSERT INTO "happy_hour" VALUES (8,3,"July",15);
|
| 66 |
+
INSERT INTO "happy_hour" VALUES (9,3,"May",3);
|
| 67 |
+
INSERT INTO "happy_hour" VALUES (10,3,"April",4);
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
CREATE TABLE "happy_hour_member" (
|
| 71 |
+
"HH_ID" int,
|
| 72 |
+
"Member_ID" int,
|
| 73 |
+
"Total_amount" real,
|
| 74 |
+
PRIMARY KEY ("HH_ID","Member_ID"),
|
| 75 |
+
FOREIGN KEY ("Member_ID") REFERENCES `member`("Member_ID")
|
| 76 |
+
);
|
| 77 |
+
|
| 78 |
+
INSERT INTO "happy_hour_member" VALUES (1,3,20.90);
|
| 79 |
+
INSERT INTO "happy_hour_member" VALUES (4,3,20.92);
|
| 80 |
+
INSERT INTO "happy_hour_member" VALUES (7,9,4.90);
|
| 81 |
+
INSERT INTO "happy_hour_member" VALUES (2,5,16.90);
|
| 82 |
+
INSERT INTO "happy_hour_member" VALUES (5,5,16.92);
|
| 83 |
+
INSERT INTO "happy_hour_member" VALUES (8,9,4.20);
|
| 84 |
+
|
| 85 |
+
|
database/college_1/TinyCollege.sql
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Database Systems, Coronel/Morris */
|
| 2 |
+
/* Type of SQL : MySQL */
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
CREATE TABLE CLASS (
|
| 6 |
+
CLASS_CODE varchar(5) PRIMARY KEY,
|
| 7 |
+
CRS_CODE varchar(10),
|
| 8 |
+
CLASS_SECTION varchar(2),
|
| 9 |
+
CLASS_TIME varchar(20),
|
| 10 |
+
CLASS_ROOM varchar(8),
|
| 11 |
+
PROF_NUM int,
|
| 12 |
+
FOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)
|
| 13 |
+
FOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)
|
| 14 |
+
);
|
| 15 |
+
INSERT INTO CLASS VALUES('10012','ACCT-211','1','MWF 8:00-8:50 a.m.','BUS311','105');
|
| 16 |
+
INSERT INTO CLASS VALUES('10013','ACCT-211','2','MWF 9:00-9:50 a.m.','BUS200','105');
|
| 17 |
+
INSERT INTO CLASS VALUES('10014','ACCT-211','3','TTh 2:30-3:45 p.m.','BUS252','342');
|
| 18 |
+
INSERT INTO CLASS VALUES('10015','ACCT-212','1','MWF 10:00-10:50 a.m.','BUS311','301');
|
| 19 |
+
INSERT INTO CLASS VALUES('10016','ACCT-212','2','Th 6:00-8:40 p.m.','BUS252','301');
|
| 20 |
+
INSERT INTO CLASS VALUES('10017','CIS-220','1','MWF 9:00-9:50 a.m.','KLR209','228');
|
| 21 |
+
INSERT INTO CLASS VALUES('10018','CIS-220','2','MWF 9:00-9:50 a.m.','KLR211','114');
|
| 22 |
+
INSERT INTO CLASS VALUES('10019','CIS-220','3','MWF 10:00-10:50 a.m.','KLR209','228');
|
| 23 |
+
INSERT INTO CLASS VALUES('10020','CIS-420','1','W 6:00-8:40 p.m.','KLR209','162');
|
| 24 |
+
INSERT INTO CLASS VALUES('10021','QM-261','1','MWF 8:00-8:50 a.m.','KLR200','114');
|
| 25 |
+
INSERT INTO CLASS VALUES('10022','QM-261','2','TTh 1:00-2:15 p.m.','KLR200','114');
|
| 26 |
+
INSERT INTO CLASS VALUES('10023','QM-362','1','MWF 11:00-11:50 a.m.','KLR200','162');
|
| 27 |
+
INSERT INTO CLASS VALUES('10024','QM-362','2','TTh 2:30-3:45 p.m.','KLR200','162');
|
| 28 |
+
|
| 29 |
+
/* -- */
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
CREATE TABLE COURSE (
|
| 33 |
+
CRS_CODE varchar(10) PRIMARY KEY,
|
| 34 |
+
DEPT_CODE varchar(10),
|
| 35 |
+
CRS_DESCRIPTION varchar(35),
|
| 36 |
+
CRS_CREDIT float(8),
|
| 37 |
+
FOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)
|
| 38 |
+
);
|
| 39 |
+
INSERT INTO COURSE VALUES('ACCT-211','ACCT','Accounting I','3');
|
| 40 |
+
INSERT INTO COURSE VALUES('ACCT-212','ACCT','Accounting II','3');
|
| 41 |
+
INSERT INTO COURSE VALUES('CIS-220','CIS','Intro. to Microcomputing','3');
|
| 42 |
+
INSERT INTO COURSE VALUES('CIS-420','CIS','Database Design and Implementation','4');
|
| 43 |
+
INSERT INTO COURSE VALUES('QM-261','CIS','Intro. to Statistics','3');
|
| 44 |
+
INSERT INTO COURSE VALUES('QM-362','CIS','Statistical Applications','4');
|
| 45 |
+
|
| 46 |
+
/* -- */
|
| 47 |
+
|
| 48 |
+
CREATE TABLE DEPARTMENT (
|
| 49 |
+
DEPT_CODE varchar(10) PRIMARY KEY,
|
| 50 |
+
DEPT_NAME varchar(30),
|
| 51 |
+
SCHOOL_CODE varchar(8),
|
| 52 |
+
EMP_NUM int,
|
| 53 |
+
DEPT_ADDRESS varchar(20),
|
| 54 |
+
DEPT_EXTENSION varchar(4),
|
| 55 |
+
FOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)
|
| 56 |
+
);
|
| 57 |
+
INSERT INTO DEPARTMENT VALUES('ACCT','Accounting','BUS','114','KLR 211, Box 52','3119');
|
| 58 |
+
INSERT INTO DEPARTMENT VALUES('ART','Fine Arts','A&SCI','435','BBG 185, Box 128','2278');
|
| 59 |
+
INSERT INTO DEPARTMENT VALUES('BIOL','Biology','A&SCI','387','AAK 230, Box 415','4117');
|
| 60 |
+
INSERT INTO DEPARTMENT VALUES('CIS','Computer Info. Systems','BUS','209','KLR 333, Box 56','3245');
|
| 61 |
+
INSERT INTO DEPARTMENT VALUES('ECON/FIN','Economics/Finance','BUS','299','KLR 284, Box 63','3126');
|
| 62 |
+
INSERT INTO DEPARTMENT VALUES('ENG','English','A&SCI','160','DRE 102, Box 223','1004');
|
| 63 |
+
INSERT INTO DEPARTMENT VALUES('HIST','History','A&SCI','103','DRE 156, Box 284','1867');
|
| 64 |
+
INSERT INTO DEPARTMENT VALUES('MATH','Mathematics','A&SCI','297','AAK 194, Box 422','4234');
|
| 65 |
+
INSERT INTO DEPARTMENT VALUES('MKT/MGT','Marketing/Management','BUS','106','KLR 126, Box 55','3342');
|
| 66 |
+
INSERT INTO DEPARTMENT VALUES('PSYCH','Psychology','A&SCI','195','AAK 297, Box 438','4110');
|
| 67 |
+
INSERT INTO DEPARTMENT VALUES('SOC','Sociology','A&SCI','342','BBG 208, Box 132','2008');
|
| 68 |
+
|
| 69 |
+
/* -- */
|
| 70 |
+
|
| 71 |
+
CREATE TABLE EMPLOYEE (
|
| 72 |
+
EMP_NUM int PRIMARY KEY,
|
| 73 |
+
EMP_LNAME varchar(15),
|
| 74 |
+
EMP_FNAME varchar(12),
|
| 75 |
+
EMP_INITIAL varchar(1),
|
| 76 |
+
EMP_JOBCODE varchar(5),
|
| 77 |
+
EMP_HIREDATE datetime,
|
| 78 |
+
EMP_DOB datetime
|
| 79 |
+
);
|
| 80 |
+
INSERT INTO EMPLOYEE VALUES('100','Worley','James','F','CUST','1978-2-23','1950-6-12');
|
| 81 |
+
INSERT INTO EMPLOYEE VALUES('101','Ramso','Henry','B','CUST','1994-11-15','1961-11-2');
|
| 82 |
+
INSERT INTO EMPLOYEE VALUES('102','Edwards','Rosemary','D','TECH','1990-7-23','1953-7-3');
|
| 83 |
+
INSERT INTO EMPLOYEE VALUES('103','Donelly','Ronald','O','PROF','1987-7-1','1952-10-2');
|
| 84 |
+
INSERT INTO EMPLOYEE VALUES('104','Yukon','Preston','D','PROF','1992-5-1','1948-2-23');
|
| 85 |
+
INSERT INTO EMPLOYEE VALUES('105','Heffington','Arnelle','B','PROF','1991-7-1','1950-11-2');
|
| 86 |
+
INSERT INTO EMPLOYEE VALUES('106','Washington','Ross','E','PROF','1976-8-1','1941-3-4');
|
| 87 |
+
INSERT INTO EMPLOYEE VALUES('108','Robertson','Elaine','W','TECH','1983-10-18','1961-6-20');
|
| 88 |
+
INSERT INTO EMPLOYEE VALUES('110','Thieu','Van','S','PROF','1989-8-1','1951-8-12');
|
| 89 |
+
INSERT INTO EMPLOYEE VALUES('114','Graztevski','Gerald','B','PROF','1978-8-1','1939-3-18');
|
| 90 |
+
INSERT INTO EMPLOYEE VALUES('122','Wilson','Todd','H','CUST','1990-11-6','1966-10-19');
|
| 91 |
+
INSERT INTO EMPLOYEE VALUES('123','Jones','Suzanne','B','TECH','1994-1-5','1967-12-30');
|
| 92 |
+
INSERT INTO EMPLOYEE VALUES('124','Smith','Elsa','K','CLRK','1982-12-16','1943-9-13');
|
| 93 |
+
INSERT INTO EMPLOYEE VALUES('126','Ardano','James','G','CLRK','1994-10-1','1970-3-12');
|
| 94 |
+
INSERT INTO EMPLOYEE VALUES('155','Ritula','Annelise','','PROF','1990-8-1','1957-5-24');
|
| 95 |
+
INSERT INTO EMPLOYEE VALUES('160','Smith','Robert','T','PROF','1992-8-1','1955-6-19');
|
| 96 |
+
INSERT INTO EMPLOYEE VALUES('161','Watson','George','F','CUST','1994-11-1','1962-10-2');
|
| 97 |
+
INSERT INTO EMPLOYEE VALUES('162','Rob','Peter','','PROF','1981-8-1','1940-6-20');
|
| 98 |
+
INSERT INTO EMPLOYEE VALUES('165','Williamson','Kathryn','A','CLRK','1992-6-15','1968-11-17');
|
| 99 |
+
INSERT INTO EMPLOYEE VALUES('166','Herndon','Jill','M','TECH','1990-8-18','1965-8-29');
|
| 100 |
+
INSERT INTO EMPLOYEE VALUES('173','Teng','Weston','J','TECH','1980-7-15','1951-11-17');
|
| 101 |
+
INSERT INTO EMPLOYEE VALUES('191','Dexter','Willa','N','PROF','1984-8-1','1953-5-17');
|
| 102 |
+
INSERT INTO EMPLOYEE VALUES('195','Williams','Herman','H','PROF','1988-8-1','1955-11-19');
|
| 103 |
+
INSERT INTO EMPLOYEE VALUES('209','Smith','Melanie','K','PROF','1983-8-1','1946-5-24');
|
| 104 |
+
INSERT INTO EMPLOYEE VALUES('228','Coronel','Carlos','M','PROF','1988-8-1','1949-5-16');
|
| 105 |
+
INSERT INTO EMPLOYEE VALUES('231','Shebert','Rebecca','A','CUST','1994-2-21','1963-2-27');
|
| 106 |
+
INSERT INTO EMPLOYEE VALUES('297','Jones','Hermine','','PROF','1985-1-1','1950-7-4');
|
| 107 |
+
INSERT INTO EMPLOYEE VALUES('299','Stoddard','Doreen','L','PROF','1994-8-1','1960-4-25');
|
| 108 |
+
INSERT INTO EMPLOYEE VALUES('301','Osaki','Ismael','K','PROF','1989-8-1','1952-5-25');
|
| 109 |
+
INSERT INTO EMPLOYEE VALUES('333','Jordan','Julian','H','TECH','1991-4-23','1968-7-16');
|
| 110 |
+
INSERT INTO EMPLOYEE VALUES('335','Okomoto','Ronald','F','PROF','1975-8-1','1944-3-3');
|
| 111 |
+
INSERT INTO EMPLOYEE VALUES('342','Smith','Robert','A','PROF','1978-8-1','1937-12-30');
|
| 112 |
+
INSERT INTO EMPLOYEE VALUES('387','Smithson','George','D','PROF','1982-8-1','1948-10-1');
|
| 113 |
+
INSERT INTO EMPLOYEE VALUES('401','Blalock','James','G','PROF','1981-8-1','1945-3-15');
|
| 114 |
+
INSERT INTO EMPLOYEE VALUES('412','Smith','Robert','E','CUST','1985-6-24','1963-9-25');
|
| 115 |
+
INSERT INTO EMPLOYEE VALUES('425','Matler','Ralph','F','PROF','1995-8-1','1973-12-2');
|
| 116 |
+
INSERT INTO EMPLOYEE VALUES('435','Doornberg','Anne','D','PROF','1992-8-1','1963-10-2');
|
| 117 |
+
|
| 118 |
+
/* -- */
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
CREATE TABLE ENROLL (
|
| 122 |
+
CLASS_CODE varchar(5),
|
| 123 |
+
STU_NUM int,
|
| 124 |
+
ENROLL_GRADE varchar(50),
|
| 125 |
+
FOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)
|
| 126 |
+
FOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)
|
| 127 |
+
);
|
| 128 |
+
INSERT INTO ENROLL VALUES('10014','321452','C');
|
| 129 |
+
INSERT INTO ENROLL VALUES('10014','324257','B');
|
| 130 |
+
INSERT INTO ENROLL VALUES('10018','321452','A');
|
| 131 |
+
INSERT INTO ENROLL VALUES('10018','324257','B');
|
| 132 |
+
INSERT INTO ENROLL VALUES('10021','321452','C');
|
| 133 |
+
INSERT INTO ENROLL VALUES('10021','324257','C');
|
| 134 |
+
|
| 135 |
+
/* -- */
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
CREATE TABLE PROFESSOR (
|
| 139 |
+
EMP_NUM int,
|
| 140 |
+
DEPT_CODE varchar(10),
|
| 141 |
+
PROF_OFFICE varchar(50),
|
| 142 |
+
PROF_EXTENSION varchar(4),
|
| 143 |
+
PROF_HIGH_DEGREE varchar(5),
|
| 144 |
+
FOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),
|
| 145 |
+
FOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)
|
| 146 |
+
);
|
| 147 |
+
INSERT INTO PROFESSOR VALUES('103','HIST','DRE 156','6783','Ph.D.');
|
| 148 |
+
INSERT INTO PROFESSOR VALUES('104','ENG','DRE 102','5561','MA');
|
| 149 |
+
INSERT INTO PROFESSOR VALUES('105','ACCT','KLR 229D','8665','Ph.D.');
|
| 150 |
+
INSERT INTO PROFESSOR VALUES('106','MKT/MGT','KLR 126','3899','Ph.D.');
|
| 151 |
+
INSERT INTO PROFESSOR VALUES('110','BIOL','AAK 160','3412','Ph.D.');
|
| 152 |
+
INSERT INTO PROFESSOR VALUES('114','ACCT','KLR 211','4436','Ph.D.');
|
| 153 |
+
INSERT INTO PROFESSOR VALUES('155','MATH','AAK 201','4440','Ph.D.');
|
| 154 |
+
INSERT INTO PROFESSOR VALUES('160','ENG','DRE 102','2248','Ph.D.');
|
| 155 |
+
INSERT INTO PROFESSOR VALUES('162','CIS','KLR 203E','2359','Ph.D.');
|
| 156 |
+
INSERT INTO PROFESSOR VALUES('191','MKT/MGT','KLR 409B','4016','DBA');
|
| 157 |
+
INSERT INTO PROFESSOR VALUES('195','PSYCH','AAK 297','3550','Ph.D.');
|
| 158 |
+
INSERT INTO PROFESSOR VALUES('209','CIS','KLR 333','3421','Ph.D.');
|
| 159 |
+
INSERT INTO PROFESSOR VALUES('228','CIS','KLR 300','3000','Ph.D.');
|
| 160 |
+
INSERT INTO PROFESSOR VALUES('297','MATH','AAK 194','1145','Ph.D.');
|
| 161 |
+
INSERT INTO PROFESSOR VALUES('299','ECON/FIN','KLR 284','2851','Ph.D.');
|
| 162 |
+
INSERT INTO PROFESSOR VALUES('301','ACCT','KLR 244','4683','Ph.D.');
|
| 163 |
+
INSERT INTO PROFESSOR VALUES('335','ENG','DRE 208','2000','Ph.D.');
|
| 164 |
+
INSERT INTO PROFESSOR VALUES('342','SOC','BBG 208','5514','Ph.D.');
|
| 165 |
+
INSERT INTO PROFESSOR VALUES('387','BIOL','AAK 230','8665','Ph.D.');
|
| 166 |
+
INSERT INTO PROFESSOR VALUES('401','HIST','DRE 156','6783','MA');
|
| 167 |
+
INSERT INTO PROFESSOR VALUES('425','ECON/FIN','KLR 284','2851','MBA');
|
| 168 |
+
INSERT INTO PROFESSOR VALUES('435','ART','BBG 185','2278','Ph.D.');
|
| 169 |
+
|
| 170 |
+
/* -- */
|
| 171 |
+
|
| 172 |
+
CREATE TABLE STUDENT (
|
| 173 |
+
STU_NUM int PRIMARY KEY,
|
| 174 |
+
STU_LNAME varchar(15),
|
| 175 |
+
STU_FNAME varchar(15),
|
| 176 |
+
STU_INIT varchar(1),
|
| 177 |
+
STU_DOB datetime,
|
| 178 |
+
STU_HRS int,
|
| 179 |
+
STU_CLASS varchar(2),
|
| 180 |
+
STU_GPA float(8),
|
| 181 |
+
STU_TRANSFER numeric,
|
| 182 |
+
DEPT_CODE varchar(18),
|
| 183 |
+
STU_PHONE varchar(4),
|
| 184 |
+
PROF_NUM int,
|
| 185 |
+
FOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)
|
| 186 |
+
);
|
| 187 |
+
INSERT INTO STUDENT VALUES('321452','Bowser','William','C','1975-2-12','42','So','2.84','0','BIOL','2134','205');
|
| 188 |
+
INSERT INTO STUDENT VALUES('324257','Smithson','Anne','K','1981-11-15','81','Jr','3.27','1','CIS','2256','222');
|
| 189 |
+
INSERT INTO STUDENT VALUES('324258','Brewer','Juliette','','1969-8-23','36','So','2.26','1','ACCT','2256','228');
|
| 190 |
+
INSERT INTO STUDENT VALUES('324269','Oblonski','Walter','H','1976-9-16','66','Jr','3.09','0','CIS','2114','222');
|
| 191 |
+
INSERT INTO STUDENT VALUES('324273','Smith','John','D','1958-12-30','102','Sr','2.11','1','ENGL','2231','199');
|
| 192 |
+
INSERT INTO STUDENT VALUES('324274','Katinga','Raphael','P','1979-10-21','114','Sr','3.15','0','ACCT','2267','228');
|
| 193 |
+
INSERT INTO STUDENT VALUES('324291','Robertson','Gerald','T','1973-4-8','120','Sr','3.87','0','EDU','2267','311');
|
| 194 |
+
INSERT INTO STUDENT VALUES('324299','Smith','John','B','1986-11-30','15','Fr','2.92','0','ACCT','2315','230');
|
database/college_1/college_1.sqlite
ADDED
|
Binary file (53.2 kB). View file
|
|
|
database/college_1/link.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
http://www.cs.dartmouth.edu/~cs61/Examples/
|
database/company_office/company_office.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/company_office/schema.sql
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "buildings" (
|
| 4 |
+
"id" int,
|
| 5 |
+
"name" text,
|
| 6 |
+
"City" text,
|
| 7 |
+
"Height" int,
|
| 8 |
+
"Stories" int,
|
| 9 |
+
"Status" text,
|
| 10 |
+
PRIMARY KEY("id")
|
| 11 |
+
);
|
| 12 |
+
|
| 13 |
+
INSERT INTO "buildings" VALUES (1, "Torre KOI","Monterrey","220","67","under construction");
|
| 14 |
+
INSERT INTO "buildings" VALUES (2, "Torre Mitikah","Mexico City","210","60","under construction");
|
| 15 |
+
INSERT INTO "buildings" VALUES (3, "Punto Chapultepec","Mexico City","210","59","proposed");
|
| 16 |
+
INSERT INTO "buildings" VALUES (4, "Torre Reforma","Mexico City","330","57","under construction");
|
| 17 |
+
INSERT INTO "buildings" VALUES (5, "Corporativo BBVA Bancomer","Mexico City","220","50","under construction");
|
| 18 |
+
INSERT INTO "buildings" VALUES (6, "Reforma 432","Mexico City","300","100","under construction");
|
| 19 |
+
INSERT INTO "buildings" VALUES (7, "Torre New York Life","Mexico City","50","6","under construction");
|
| 20 |
+
INSERT INTO "buildings" VALUES (8, "LIU East","Monterrey","73","20","under construction");
|
| 21 |
+
INSERT INTO "buildings" VALUES (9, "Residencial Vidalta Torre Altaire 2","Mexico City","150","44","on-hold");
|
| 22 |
+
INSERT INTO "buildings" VALUES (10, "Residencial Vidalta Torre Altaire 3","Mexico City","200","44","on-hold");
|
| 23 |
+
INSERT INTO "buildings" VALUES (11, "Reforma 90","Mexico City","200","42","on-hold");
|
| 24 |
+
INSERT INTO "buildings" VALUES (12, "Ritz-Carlton Mexico City","Mexico City","100","34","on-hold");
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
CREATE TABLE "Companies" (
|
| 28 |
+
"id" int,
|
| 29 |
+
"name" text,
|
| 30 |
+
"Headquarters" text,
|
| 31 |
+
"Industry" text,
|
| 32 |
+
"Sales_billion" real,
|
| 33 |
+
"Profits_billion" real,
|
| 34 |
+
"Assets_billion" real,
|
| 35 |
+
"Market_Value_billion" text,
|
| 36 |
+
PRIMARY KEY ("id")
|
| 37 |
+
);
|
| 38 |
+
|
| 39 |
+
INSERT INTO "Companies" VALUES ("1","JPMorgan Chase","USA","Banking","115.5","17.4","2117.6","182.2");
|
| 40 |
+
INSERT INTO "Companies" VALUES ("2","HSBC","UK","Banking","103.3","13.3","2467.9","186.5");
|
| 41 |
+
INSERT INTO "Companies" VALUES ("3","General Electric","USA","Conglomerate","156.2","11.6","751.2","216.2");
|
| 42 |
+
INSERT INTO "Companies" VALUES ("4","ExxonMobil","USA","Oil and gas","341.6","30.5","302.5","407.2");
|
| 43 |
+
INSERT INTO "Companies" VALUES ("5","Royal Dutch Shell","Netherlands","Oil and gas","369.1","20.1","317.2","212.9");
|
| 44 |
+
INSERT INTO "Companies" VALUES ("6","PetroChina","China","Oil and gas","222.3","21.2","251.3","320.8");
|
| 45 |
+
INSERT INTO "Companies" VALUES ("7","Industrial and Commercial Bank of China","China","Banking","69.2","18.8","1723.5","239.5");
|
| 46 |
+
INSERT INTO "Companies" VALUES ("8","Berkshire Hathaway","USA","Conglomerate","136.2","13","372.2","211");
|
| 47 |
+
INSERT INTO "Companies" VALUES ("9","Petrobras","Brazil","Oil and gas","121.3","21.2","313.2","238.8");
|
| 48 |
+
INSERT INTO "Companies" VALUES ("10","Citigroup","USA","Banking","111.5","10.6","1913.9","132.8");
|
| 49 |
+
INSERT INTO "Companies" VALUES ("11","BNP Paribas","France","Banking","130.4","10.5","2680.7","88");
|
| 50 |
+
INSERT INTO "Companies" VALUES ("12","Wells Fargo","USA","Banking","93.2","12.4","1258.1","170.6");
|
| 51 |
+
INSERT INTO "Companies" VALUES ("13","Santander Group","Spain","Banking","109.7","12.8","1570.6","94.7");
|
| 52 |
+
INSERT INTO "Companies" VALUES ("14","AT&T Inc.","USA","Telecommunications","124.3","19.9","268.5","168.2");
|
| 53 |
+
INSERT INTO "Companies" VALUES ("15","Gazprom","Russia","Oil and gas","98.7","25.7","275.9","172.9");
|
| 54 |
+
INSERT INTO "Companies" VALUES ("16","Chevron","USA","Oil and gas","189.6","19","184.8","200.6");
|
| 55 |
+
INSERT INTO "Companies" VALUES ("17","China Construction Bank","China","Banking","58.2","15.6","1408","224.8");
|
| 56 |
+
INSERT INTO "Companies" VALUES ("18","Walmart","USA","Retailing","421.8","16.4","180.7","187.3");
|
| 57 |
+
INSERT INTO "Companies" VALUES ("19","Total","France","Oil and gas","188.1","14.2","192.8","138");
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
CREATE TABLE "Office_locations" (
|
| 62 |
+
"building_id" int,
|
| 63 |
+
"company_id" int,
|
| 64 |
+
"move_in_year" int,
|
| 65 |
+
PRIMARY KEY ("building_id", "company_id"),
|
| 66 |
+
FOREIGN KEY ("building_id") REFERENCES "buildings"("id"),
|
| 67 |
+
FOREIGN KEY ("company_id") REFERENCES "Companies"("id")
|
| 68 |
+
);
|
| 69 |
+
|
| 70 |
+
INSERT INTO "Office_locations" VALUES (1,1,2021);
|
| 71 |
+
INSERT INTO "Office_locations" VALUES (2,2,2022);
|
| 72 |
+
INSERT INTO "Office_locations" VALUES (3,4,2023);
|
| 73 |
+
INSERT INTO "Office_locations" VALUES (4,3,2024);
|
| 74 |
+
INSERT INTO "Office_locations" VALUES (5,3,2025);
|
| 75 |
+
INSERT INTO "Office_locations" VALUES (5,7,2026);
|
| 76 |
+
INSERT INTO "Office_locations" VALUES (11,5,2027);
|
| 77 |
+
INSERT INTO "Office_locations" VALUES (7,4,2027);
|
| 78 |
+
INSERT INTO "Office_locations" VALUES (3,2,2028);
|
| 79 |
+
INSERT INTO "Office_locations" VALUES (3,9,2029);
|
| 80 |
+
INSERT INTO "Office_locations" VALUES (10,9,2031);
|
| 81 |
+
INSERT INTO "Office_locations" VALUES (6,9,2022);
|
| 82 |
+
INSERT INTO "Office_locations" VALUES (8,19,2022);
|
| 83 |
+
INSERT INTO "Office_locations" VALUES (9,10,2019);
|
| 84 |
+
INSERT INTO "Office_locations" VALUES (3,11,2020);
|
| 85 |
+
INSERT INTO "Office_locations" VALUES (2,11,2025);
|
| 86 |
+
|
database/county_public_safety/schema.sql
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "county_public_safety" (
|
| 4 |
+
"County_ID" int,
|
| 5 |
+
"Name" text,
|
| 6 |
+
"Population" int,
|
| 7 |
+
"Police_officers" int,
|
| 8 |
+
"Residents_per_officer" int,
|
| 9 |
+
"Case_burden" int,
|
| 10 |
+
"Crime_rate" real,
|
| 11 |
+
"Police_force" text,
|
| 12 |
+
"Location" text,
|
| 13 |
+
PRIMARY KEY ("County_ID")
|
| 14 |
+
);
|
| 15 |
+
|
| 16 |
+
CREATE TABLE "city" (
|
| 17 |
+
"City_ID" int,
|
| 18 |
+
"County_ID" int,
|
| 19 |
+
"Name" text,
|
| 20 |
+
"White" real,
|
| 21 |
+
"Black" real,
|
| 22 |
+
"Amerindian" real,
|
| 23 |
+
"Asian" real,
|
| 24 |
+
"Multiracial" real,
|
| 25 |
+
"Hispanic" real,
|
| 26 |
+
PRIMARY KEY ("City_ID"),
|
| 27 |
+
FOREIGN KEY ("County_ID") REFERENCES "county_public_safety"("County_ID")
|
| 28 |
+
);
|
| 29 |
+
|
| 30 |
+
INSERT INTO "county_public_safety" VALUES (1,"Abbotsford","128165","187","685","81","118","Abbotsford Police Department","East");
|
| 31 |
+
INSERT INTO "county_public_safety" VALUES (2,"Burnaby","204320","253","808","100","123","RCMP","East");
|
| 32 |
+
INSERT INTO "county_public_safety" VALUES (3,"Campbell River","30810","40","770","137","178","RCMP","West");
|
| 33 |
+
INSERT INTO "county_public_safety" VALUES (4,"Castlegar","7821","11","711","107","150","RCMP","North");
|
| 34 |
+
INSERT INTO "county_public_safety" VALUES (5,"Central Saanich","16821","21","801","39","49","Central Saanich Police","East");
|
| 35 |
+
INSERT INTO "county_public_safety" VALUES (6,"Chilliwack","73066","91","803","140","174","RCMP","West");
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
INSERT INTO "city" VALUES (1,1,"Adjuntas","93.1","3.1","0.3","0.0","3.4","99.6");
|
| 40 |
+
INSERT INTO "city" VALUES (2,1,"Aguada","86.6","5.3","0.3","0.1","7.7","99.4");
|
| 41 |
+
INSERT INTO "city" VALUES (3,1,"Aguadilla","83.0","7.4","0.3","0.2","8.2","98.5");
|
| 42 |
+
INSERT INTO "city" VALUES (4,2,"Aguas Buenas","72.5","12.6","0.6","0.1","14.2","99.5");
|
| 43 |
+
INSERT INTO "city" VALUES (5,2,"Aibonito","83.5","7.3","0.2","0.0","9.0","99.3");
|
| 44 |
+
INSERT INTO "city" VALUES (6,3,"Añasco","82.0","7.2","0.4","0.1","10.3","99.2");
|
| 45 |
+
INSERT INTO "city" VALUES (7,3,"Arecibo","84.5","6.1","0.4","0.1","7.9","99.2");
|
| 46 |
+
INSERT INTO "city" VALUES (8,3,"Arroyo","53.5","32.5","0.9","0.2","13.0","99.1");
|
| 47 |
+
INSERT INTO "city" VALUES (9,3,"Barceloneta","80.7","7.6","0.3","0.1","11.2","99.4");
|
| 48 |
+
INSERT INTO "city" VALUES (10,3,"Barranquitas","86.0","5.4","0.3","0.0","8.3","99.3");
|
| 49 |
+
INSERT INTO "city" VALUES (11,3,"Bayamón","78.3","10.3","0.6","0.2","10.7","99.0");
|
| 50 |
+
INSERT INTO "city" VALUES (12,4,"Cabo Rojo","84.1","5.4","0.3","0.1","10.1","98.9");
|
| 51 |
+
INSERT INTO "city" VALUES (13,4,"Caguas","76.1","11.0","0.6","0.2","12.1","99.1");
|
| 52 |
+
INSERT INTO "city" VALUES (14,5,"Camuy","87.9","4.1","0.3","0.1","7.6","99.4");
|
| 53 |
+
INSERT INTO "city" VALUES (15,5,"Canóvanas","61.2","21.6","0.9","0.2","16.1","99.2");
|
| 54 |
+
INSERT INTO "city" VALUES (16,6,"Carolina","64.3","22.8","0.9","0.4","11.7","98.6");
|
| 55 |
+
INSERT INTO "city" VALUES (17,6,"Cataño","70.7","14.4","1.0","0.3","13.7","99.0");
|
| 56 |
+
|
database/customer_complaints/customer_complaints.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
database/device/schema.sql
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "device" (
|
| 4 |
+
"Device_ID" int,
|
| 5 |
+
"Device" text,
|
| 6 |
+
"Carrier" text,
|
| 7 |
+
"Package_Version" text,
|
| 8 |
+
"Applications" text,
|
| 9 |
+
"Software_Platform" text,
|
| 10 |
+
PRIMARY KEY ("Device_ID")
|
| 11 |
+
);
|
| 12 |
+
|
| 13 |
+
CREATE TABLE "shop" (
|
| 14 |
+
"Shop_ID" int,
|
| 15 |
+
"Shop_Name" text,
|
| 16 |
+
"Location" text,
|
| 17 |
+
"Open_Date" text,
|
| 18 |
+
"Open_Year" int,
|
| 19 |
+
PRIMARY KEY ("Shop_ID")
|
| 20 |
+
);
|
| 21 |
+
|
| 22 |
+
INSERT INTO "device" VALUES (1,"BlackBerry Storm 9530","MTS Mobility","5.0.0.808","5.0.0.419","Android");
|
| 23 |
+
INSERT INTO "device" VALUES (2,"Apple","Verizon Wireless","5.0.0.328","5.0.0.328","iOS");
|
| 24 |
+
INSERT INTO "device" VALUES (3,"Huawei","Telus Mobility","5.0.0.419","5.0.0.419","Android");
|
| 25 |
+
INSERT INTO "device" VALUES (4,"Xiaomi","Bell Mobility","5.0.0.419","5.0.0.419","Android");
|
| 26 |
+
INSERT INTO "device" VALUES (5,"Samsung","Iusacell","4.7.0.208","4.7.0.151","Android");
|
| 27 |
+
INSERT INTO "device" VALUES (6,"Galaxy","Vodafone AU","5.0.0.742","5.0.0.451","Android");
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
INSERT INTO "shop" VALUES (1,"Dinas Device","Dinas","1 January","2014");
|
| 32 |
+
INSERT INTO "shop" VALUES (2,"Best Buy","Cymmer","15 July","2006");
|
| 33 |
+
INSERT INTO "shop" VALUES (3,"Ferndale","Blaenllechau","8 November","2009");
|
| 34 |
+
INSERT INTO "shop" VALUES (4,"Apple","Blaenllechau","10 June","2009");
|
| 35 |
+
INSERT INTO "shop" VALUES (5,"Pentre store","Pentre","24 February","2011");
|
| 36 |
+
INSERT INTO "shop" VALUES (6,"Tynewydd repair","Porth","11 April","2007");
|
| 37 |
+
INSERT INTO "shop" VALUES (7,"Dinas store","Dinas","13 January","2009");
|
| 38 |
+
INSERT INTO "shop" VALUES (8,"Naval repair","Penygraig","10 December","2010");
|
| 39 |
+
INSERT INTO "shop" VALUES (9,"Gelli repair","Gelli","21 August","2013");
|
| 40 |
+
INSERT INTO "shop" VALUES (10,"Naval's shop","Penygraig","27 January","2014");
|
| 41 |
+
INSERT INTO "shop" VALUES (11,"ATnT","Maerdy","23–24 December","2015");
|
| 42 |
+
INSERT INTO "shop" VALUES (12,"National Cellphone","Wattstown","18 February","2017");
|
| 43 |
+
|
| 44 |
+
CREATE TABLE "stock" (
|
| 45 |
+
"Shop_ID" int,
|
| 46 |
+
"Device_ID" int,
|
| 47 |
+
"Quantity" int,
|
| 48 |
+
PRIMARY KEY ("Shop_ID","Device_ID"),
|
| 49 |
+
FOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),
|
| 50 |
+
FOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)
|
| 51 |
+
);
|
| 52 |
+
|
| 53 |
+
INSERT INTO "stock" VALUES (1,6,100);
|
| 54 |
+
INSERT INTO "stock" VALUES (2,6,110);
|
| 55 |
+
INSERT INTO "stock" VALUES (3,6,134);
|
| 56 |
+
INSERT INTO "stock" VALUES (4,6,56);
|
| 57 |
+
INSERT INTO "stock" VALUES (1,4,200);
|
| 58 |
+
INSERT INTO "stock" VALUES (11,6,112);
|
| 59 |
+
INSERT INTO "stock" VALUES (3,4,124);
|
| 60 |
+
INSERT INTO "stock" VALUES (9,4,51);
|
| 61 |
+
|
database/dorm_1/dorm_1.sqlite
ADDED
|
Binary file (24.6 kB). View file
|
|
|
database/dorm_1/schema.sql
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
create table Student (
|
| 3 |
+
StuID INTEGER PRIMARY KEY,
|
| 4 |
+
LName VARCHAR(12),
|
| 5 |
+
Fname VARCHAR(12),
|
| 6 |
+
Age INTEGER,
|
| 7 |
+
Sex VARCHAR(1),
|
| 8 |
+
Major INTEGER,
|
| 9 |
+
Advisor INTEGER,
|
| 10 |
+
city_code VARCHAR(3)
|
| 11 |
+
);
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
create table Dorm (
|
| 15 |
+
dormid INTEGER,
|
| 16 |
+
dorm_name VARCHAR(20),
|
| 17 |
+
student_capacity INTEGER,
|
| 18 |
+
gender VARCHAR(1)
|
| 19 |
+
) ;
|
| 20 |
+
|
| 21 |
+
create table Dorm_amenity (
|
| 22 |
+
amenid INTEGER,
|
| 23 |
+
amenity_name VARCHAR(25)
|
| 24 |
+
) ;
|
| 25 |
+
|
| 26 |
+
create table Has_amenity (
|
| 27 |
+
dormid INTEGER,
|
| 28 |
+
amenid INTEGER,
|
| 29 |
+
FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),
|
| 30 |
+
FOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)
|
| 31 |
+
);
|
| 32 |
+
|
| 33 |
+
create table Lives_in (
|
| 34 |
+
stuid INTEGER,
|
| 35 |
+
dormid INTEGER,
|
| 36 |
+
room_number INTEGER,
|
| 37 |
+
FOREIGN KEY (stuid) REFERENCES `Student`(StuID),
|
| 38 |
+
FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)
|
| 39 |
+
);
|
| 40 |
+
|
| 41 |
+
insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
|
| 42 |
+
insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
|
| 43 |
+
insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
|
| 44 |
+
insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
|
| 45 |
+
insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
|
| 46 |
+
insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
|
| 47 |
+
insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
|
| 48 |
+
insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
|
| 49 |
+
insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
|
| 50 |
+
insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
|
| 51 |
+
insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
|
| 52 |
+
insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
|
| 53 |
+
insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
|
| 54 |
+
insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
|
| 55 |
+
insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
|
| 56 |
+
insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
|
| 57 |
+
insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
|
| 58 |
+
insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
|
| 59 |
+
insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
|
| 60 |
+
insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
|
| 61 |
+
insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
|
| 62 |
+
insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
|
| 63 |
+
insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
|
| 64 |
+
insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
|
| 65 |
+
insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
|
| 66 |
+
insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
|
| 67 |
+
insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
|
| 68 |
+
insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
|
| 69 |
+
insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
|
| 70 |
+
insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
|
| 71 |
+
insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
|
| 72 |
+
insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
|
| 73 |
+
insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
|
| 74 |
+
insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
|
| 75 |
+
|
| 76 |
+
insert into Dorm values (100,'Smith Hall',85,'X');
|
| 77 |
+
insert into Dorm values (110,'Bud Jones Hall',116,'M');
|
| 78 |
+
insert into Dorm values (140,'Fawlty Towers',355,'X');
|
| 79 |
+
insert into Dorm values (160,'Dorm-plex 2000',400,'X');
|
| 80 |
+
insert into Dorm values (109,'Anonymous Donor Hall',128,'F');
|
| 81 |
+
insert into Dorm values (117,'University Hovels',40,'X');
|
| 82 |
+
insert into Dorm values (104,'Grad Student Asylum',256,'X');
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
insert into Dorm_amenity values ( 900 , 'TV Lounge' ) ;
|
| 86 |
+
insert into Dorm_amenity values ( 901 , 'Study Room' ) ;
|
| 87 |
+
insert into Dorm_amenity values ( 902 , 'Pub in Basement' ) ;
|
| 88 |
+
insert into Dorm_amenity values ( 903 , 'Carpeted Rooms' ) ;
|
| 89 |
+
insert into Dorm_amenity values ( 904 , '4 Walls' ) ;
|
| 90 |
+
insert into Dorm_amenity values ( 930 , 'Roof' ) ;
|
| 91 |
+
insert into Dorm_amenity values ( 931 , 'Ethernet Ports' ) ;
|
| 92 |
+
insert into Dorm_amenity values ( 932 , 'Air Conditioning' ) ;
|
| 93 |
+
insert into Dorm_amenity values ( 922 , 'Heat' ) ;
|
| 94 |
+
insert into Dorm_amenity values ( 950 , 'Working Fireplaces' ) ;
|
| 95 |
+
insert into Dorm_amenity values ( 955 , 'Kitchen in Every Room' ) ;
|
| 96 |
+
insert into Dorm_amenity values ( 909 , 'Allows Pets' ) ;
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
insert into Has_amenity values ( 109 , 900) ;
|
| 100 |
+
insert into Has_amenity values ( 109 , 901) ;
|
| 101 |
+
insert into Has_amenity values ( 109 , 903) ;
|
| 102 |
+
insert into Has_amenity values ( 109 , 904 ) ;
|
| 103 |
+
insert into Has_amenity values ( 109 , 930 ) ;
|
| 104 |
+
insert into Has_amenity values ( 109 , 931) ;
|
| 105 |
+
insert into Has_amenity values ( 109 , 932) ;
|
| 106 |
+
insert into Has_amenity values ( 109 , 922) ;
|
| 107 |
+
insert into Has_amenity values ( 104 , 901) ;
|
| 108 |
+
insert into Has_amenity values ( 104 , 904) ;
|
| 109 |
+
insert into Has_amenity values ( 104 , 930 ) ;
|
| 110 |
+
insert into Has_amenity values ( 160 , 900 ) ;
|
| 111 |
+
insert into Has_amenity values ( 160 , 901 ) ;
|
| 112 |
+
insert into Has_amenity values ( 160 , 902 ) ;
|
| 113 |
+
insert into Has_amenity values ( 160 , 903 ) ;
|
| 114 |
+
insert into Has_amenity values ( 160 , 931 ) ;
|
| 115 |
+
insert into Has_amenity values ( 160 , 904) ;
|
| 116 |
+
insert into Has_amenity values ( 160 , 930 ) ;
|
| 117 |
+
insert into Has_amenity values ( 160 , 922 ) ;
|
| 118 |
+
insert into Has_amenity values ( 160 , 932 ) ;
|
| 119 |
+
insert into Has_amenity values ( 160 , 950 ) ;
|
| 120 |
+
insert into Has_amenity values ( 160 , 955 ) ;
|
| 121 |
+
insert into Has_amenity values ( 160 , 909 ) ;
|
| 122 |
+
insert into Has_amenity values ( 100 , 901) ;
|
| 123 |
+
insert into Has_amenity values ( 100 , 903) ;
|
| 124 |
+
insert into Has_amenity values ( 100 , 904) ;
|
| 125 |
+
insert into Has_amenity values ( 100 , 930 ) ;
|
| 126 |
+
insert into Has_amenity values ( 100 , 922 ) ;
|
| 127 |
+
insert into Has_amenity values ( 117 , 930 ) ;
|
| 128 |
+
insert into Has_amenity values ( 110 , 901) ;
|
| 129 |
+
insert into Has_amenity values ( 110 , 903) ;
|
| 130 |
+
insert into Has_amenity values ( 110 , 904) ;
|
| 131 |
+
insert into Has_amenity values ( 110 , 930 ) ;
|
| 132 |
+
insert into Has_amenity values ( 110 , 922 ) ;
|
| 133 |
+
insert into Has_amenity values ( 140 , 909 ) ;
|
| 134 |
+
insert into Has_amenity values ( 140 , 900) ;
|
| 135 |
+
insert into Has_amenity values ( 140 , 902) ;
|
| 136 |
+
insert into Has_amenity values ( 140 , 904) ;
|
| 137 |
+
insert into Has_amenity values ( 140 , 930 ) ;
|
| 138 |
+
insert into Has_amenity values ( 140 , 932 ) ;
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
insert into Lives_in values ( 1001 , 109 , 105 ) ;
|
| 142 |
+
insert into Lives_in values ( 1002 , 100 , 112 ) ;
|
| 143 |
+
insert into Lives_in values ( 1003 , 100 , 124 ) ;
|
| 144 |
+
insert into Lives_in values ( 1004 , 140 , 215 ) ;
|
| 145 |
+
insert into Lives_in values ( 1005 , 160 , 333 ) ;
|
| 146 |
+
insert into Lives_in values ( 1007 , 140 , 113 ) ;
|
| 147 |
+
insert into Lives_in values ( 1008 , 160 , 334 ) ;
|
| 148 |
+
insert into Lives_in values ( 1009 , 140 , 332 ) ;
|
| 149 |
+
insert into Lives_in values ( 1010 , 160 , 443 ) ;
|
| 150 |
+
insert into Lives_in values ( 1011 , 140 , 102 ) ;
|
| 151 |
+
insert into Lives_in values ( 1012 , 160 , 333 ) ;
|
| 152 |
+
insert into Lives_in values ( 1014 , 104 , 211 ) ;
|
| 153 |
+
insert into Lives_in values ( 1015 , 160 , 443 ) ;
|
| 154 |
+
insert into Lives_in values ( 1016 , 140 , 301 ) ;
|
| 155 |
+
insert into Lives_in values ( 1017 , 140 , 319 ) ;
|
| 156 |
+
insert into Lives_in values ( 1018 , 140 , 225 ) ;
|
| 157 |
+
insert into Lives_in values ( 1020 , 160 , 405 ) ;
|
| 158 |
+
insert into Lives_in values ( 1021 , 160 , 405 ) ;
|
| 159 |
+
insert into Lives_in values ( 1022 , 100 , 153 ) ;
|
| 160 |
+
insert into Lives_in values ( 1023 , 160 , 317 ) ;
|
| 161 |
+
insert into Lives_in values ( 1024 , 100 , 151 ) ;
|
| 162 |
+
insert into Lives_in values ( 1025 , 160 , 317 ) ;
|
| 163 |
+
insert into Lives_in values ( 1027 , 140 , 208 ) ;
|
| 164 |
+
insert into Lives_in values ( 1028 , 110 , 48 ) ;
|
| 165 |
+
insert into Lives_in values ( 1029 , 140 , 418 ) ;
|
| 166 |
+
insert into Lives_in values ( 1030 , 109 , 211 ) ;
|
| 167 |
+
insert into Lives_in values ( 1031 , 100 , 112 ) ;
|
| 168 |
+
insert into Lives_in values ( 1032 , 109 , 105 ) ;
|
| 169 |
+
insert into Lives_in values ( 1033 , 117 , 3 ) ;
|
| 170 |
+
insert into Lives_in values ( 1034 , 160 , 105 ) ;
|
| 171 |
+
insert into Lives_in values ( 1035 , 100 , 124 ) ;
|
| 172 |
+
|
database/employee_hire_evaluation/employee_hire_evaluation.sqlite
ADDED
|
Binary file (36.9 kB). View file
|
|
|
database/employee_hire_evaluation/schema.sql
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
PRAGMA foreign_keys = ON;
|
| 3 |
+
|
| 4 |
+
CREATE TABLE "employee" (
|
| 5 |
+
"Employee_ID" int,
|
| 6 |
+
"Name" text,
|
| 7 |
+
"Age" int,
|
| 8 |
+
"City" text,
|
| 9 |
+
PRIMARY KEY ("Employee_ID")
|
| 10 |
+
);
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
INSERT INTO "employee" VALUES (1, "George Chuter",23,"Bristol");
|
| 14 |
+
INSERT INTO "employee" VALUES (2,"Lee Mears",29,"Bath");
|
| 15 |
+
INSERT INTO "employee" VALUES (3,"Mark Regan",43,"Bristol");
|
| 16 |
+
INSERT INTO "employee" VALUES (4,"Jason Hobson",30,"Bristol");
|
| 17 |
+
INSERT INTO "employee" VALUES (5,"Tim Payne",29,"Wasps");
|
| 18 |
+
INSERT INTO "employee" VALUES (6,"Andrew Sheridan",28,"Sale");
|
| 19 |
+
INSERT INTO "employee" VALUES (7,"Matt Stevens",29,"Bath");
|
| 20 |
+
INSERT INTO "employee" VALUES (8,"Phil Vickery",40,"Wasps");
|
| 21 |
+
INSERT INTO "employee" VALUES (9,"Steve Borthwick",32,"Bath");
|
| 22 |
+
INSERT INTO "employee" VALUES (10,"Louis Deacon",36,"Leicester");
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
CREATE TABLE "shop" (
|
| 27 |
+
"Shop_ID" int,
|
| 28 |
+
"Name" text,
|
| 29 |
+
"Location" text,
|
| 30 |
+
"District" text,
|
| 31 |
+
"Number_products" int,
|
| 32 |
+
"Manager_name" text,
|
| 33 |
+
PRIMARY KEY ("Shop_ID")
|
| 34 |
+
);
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
INSERT INTO "shop" VALUES (1,"FC Haka","Valkeakoski","Tehtaan kenttä","3516","Olli Huttunen");
|
| 38 |
+
INSERT INTO "shop" VALUES (2,"HJK","Helsinki","Finnair Stadium","10770","Antti Muurinen");
|
| 39 |
+
INSERT INTO "shop" VALUES (3,"FC Honka","Espoo","Tapiolan Urheilupuisto","6000","Mika Lehkosuo");
|
| 40 |
+
INSERT INTO "shop" VALUES (4,"FC Inter","Turku","Veritas Stadion","10000","Job Dragtsma");
|
| 41 |
+
INSERT INTO "shop" VALUES (5,"FF Jaro","Jakobstad","Jakobstads Centralplan","5000","Mika Laurikainen");
|
| 42 |
+
INSERT INTO "shop" VALUES (6,"FC KooTeePee","Kotka","Arto Tolsa Areena","4780","Tommi Kautonen");
|
| 43 |
+
INSERT INTO "shop" VALUES (7,"KuPS","Kuopio","Magnum Areena","3500","Kai Nyyssönen");
|
| 44 |
+
INSERT INTO "shop" VALUES (8,"FC Lahti","Lahti","Lahden Stadion","15000","Ilkka Mäkelä");
|
| 45 |
+
INSERT INTO "shop" VALUES (9,"IFK Mariehamn","Mariehamn","Wiklöf Holding Arena","1600","Pekka Lyyski");
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
CREATE TABLE "hiring" (
|
| 49 |
+
"Shop_ID" int,
|
| 50 |
+
"Employee_ID" int,
|
| 51 |
+
"Start_from" text,
|
| 52 |
+
"Is_full_time" bool,
|
| 53 |
+
PRIMARY KEY ("Employee_ID"),
|
| 54 |
+
FOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),
|
| 55 |
+
FOREIGN KEY (`Employee_ID`) REFERENCES `employee`(`Employee_ID`)
|
| 56 |
+
);
|
| 57 |
+
|
| 58 |
+
INSERT INTO "hiring" VALUES (1,1,"2009","T");
|
| 59 |
+
INSERT INTO "hiring" VALUES (1,2,"2003","T");
|
| 60 |
+
INSERT INTO "hiring" VALUES (8,3,"2011","F");
|
| 61 |
+
INSERT INTO "hiring" VALUES (4,4,"2012","T");
|
| 62 |
+
INSERT INTO "hiring" VALUES (5,5,"2013","T");
|
| 63 |
+
INSERT INTO "hiring" VALUES (2,6,"2010","F");
|
| 64 |
+
INSERT INTO "hiring" VALUES (6,7,"2008","T");
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
CREATE TABLE "evaluation" (
|
| 70 |
+
"Employee_ID" text,
|
| 71 |
+
"Year_awarded" text,
|
| 72 |
+
"Bonus" real,
|
| 73 |
+
PRIMARY KEY ("Employee_ID","Year_awarded"),
|
| 74 |
+
FOREIGN KEY (`Employee_ID`) REFERENCES `employee`(`Employee_ID`)
|
| 75 |
+
);
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
INSERT INTO "evaluation" VALUES (1,"2011", 3000);
|
| 79 |
+
INSERT INTO "evaluation" VALUES (2,"2015", 3200);
|
| 80 |
+
INSERT INTO "evaluation" VALUES (1,"2016", 2900);
|
| 81 |
+
INSERT INTO "evaluation" VALUES (4,"2017", 3200);
|
| 82 |
+
INSERT INTO "evaluation" VALUES (7,"2018", 3200);
|
| 83 |
+
INSERT INTO "evaluation" VALUES (10,"2016", 4000);
|
| 84 |
+
|
database/entrepreneur/entrepreneur.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
database/entrepreneur/schema.sql
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "entrepreneur" (
|
| 4 |
+
"Entrepreneur_ID" int,
|
| 5 |
+
"People_ID" int,
|
| 6 |
+
"Company" text,
|
| 7 |
+
"Money_Requested" real,
|
| 8 |
+
"Investor" text,
|
| 9 |
+
PRIMARY KEY ("Entrepreneur_ID"),
|
| 10 |
+
FOREIGN KEY ("People_ID") REFERENCES "people"("People_ID")
|
| 11 |
+
);
|
| 12 |
+
|
| 13 |
+
CREATE TABLE "people" (
|
| 14 |
+
"People_ID" int,
|
| 15 |
+
"Name" text,
|
| 16 |
+
"Height" real,
|
| 17 |
+
"Weight" real,
|
| 18 |
+
"Date_of_Birth" text,
|
| 19 |
+
PRIMARY KEY ("People_ID")
|
| 20 |
+
);
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
INSERT INTO "people" VALUES (1,"Francesco Postiglione",1.9,80,"1972-04-29");
|
| 24 |
+
INSERT INTO "people" VALUES (2,"Leonardo Binchi",1.86,57,"1975-08-27");
|
| 25 |
+
INSERT INTO "people" VALUES (3,"Fabrizio Buonocore",1.83, 45, "1977-04-28");
|
| 26 |
+
INSERT INTO "people" VALUES (4,"Marco Gerini",1.72, 75,"1971-08-05");
|
| 27 |
+
INSERT INTO "people" VALUES (5,"Roberto Calcaterra",1.75, 67, "1972-02-06");
|
| 28 |
+
INSERT INTO "people" VALUES (6,"Goran Fiorentini",1.78, 89, "1981-11-21");
|
| 29 |
+
INSERT INTO "people" VALUES (7,"Alberto Angelini",1.82,58, "1974-09-28");
|
| 30 |
+
INSERT INTO "people" VALUES (8,"Maurizio Felugo",1.95,76, "1981-03-04");
|
| 31 |
+
|
| 32 |
+
INSERT INTO "entrepreneur" VALUES (1,1,"Umbrolly","150000","Duncan Bannatyne");
|
| 33 |
+
INSERT INTO "entrepreneur" VALUES (2,2,"Grails Ltd","120000","Doug Richard");
|
| 34 |
+
INSERT INTO "entrepreneur" VALUES (3,3,"Le Beanock","54000","Rachel Elnaugh");
|
| 35 |
+
INSERT INTO "entrepreneur" VALUES (4,5,"IV Cam","50000","Peter Jones");
|
| 36 |
+
INSERT INTO "entrepreneur" VALUES (5,6,"Mycorrhizal Systems","75000","Simon Woodroffe");
|
| 37 |
+
INSERT INTO "entrepreneur" VALUES (6,8,"Elizabeth Galton Ltd","110000","Duncan Bannatyne");
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
|
database/game_1/game_1.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
database/inn_1/data_csv/README.INN.TXT
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*****************************************************
|
| 2 |
+
CPE 365 Alex Dekhtyar
|
| 3 |
+
Cal Poly Computer Science Department
|
| 4 |
+
San Luis Obispo College of Engineering
|
| 5 |
+
California dekhtyar@calpoly.edu
|
| 6 |
+
*****************************************************
|
| 7 |
+
INN DATASET
|
| 8 |
+
Version 1.0
|
| 9 |
+
April 6, 2011
|
| 10 |
+
*****************************************************
|
| 11 |
+
Sources: this is a synthesized dataset.
|
| 12 |
+
|
| 13 |
+
******************************************************
|
| 14 |
+
|
| 15 |
+
This file describes the contents of the INN dataset
|
| 16 |
+
developed for the CPE 365, Introduction to Databases,
|
| 17 |
+
course at Cal Poly.
|
| 18 |
+
|
| 19 |
+
The dataset contains information a one year worth of reservations
|
| 20 |
+
at a fictional Bed & Breakfast hotel called Seaside Grove Inn.
|
| 21 |
+
The hotel has 10 rooms. The dataset contains information about
|
| 22 |
+
the completed (i.e., guests arrived and stayed) reservations for
|
| 23 |
+
one year of the hotel's operation.
|
| 24 |
+
|
| 25 |
+
General Conventions.
|
| 26 |
+
|
| 27 |
+
1. All files in the dataset are CSV (comma-separated values) files.
|
| 28 |
+
2. First line of each file provides the names of
|
| 29 |
+
columns. Second line may be empty, or may contain
|
| 30 |
+
the first row of the data.
|
| 31 |
+
3. All string values are enclosed in single quotes (')
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
The dataset consists of the following files:
|
| 35 |
+
|
| 36 |
+
- Rooms.csv : list of Seaside Grove Inn rooms
|
| 37 |
+
- Reservations.csv : list of completed room reservations
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
Individual files have the following formats.
|
| 41 |
+
|
| 42 |
+
**************************************************************************
|
| 43 |
+
|
| 44 |
+
Rooms.csv
|
| 45 |
+
|
| 46 |
+
RoomId : a three-letter unique Id code of a room
|
| 47 |
+
roomName : official name of the room (all rooms in B&B inns
|
| 48 |
+
typically have names)
|
| 49 |
+
beds : number of beds in the room
|
| 50 |
+
bedType : type of the bed(s) in the room. All beds in each room
|
| 51 |
+
are of the same type.
|
| 52 |
+
maxOccupancy : maximum number of people allowed to stay in the room
|
| 53 |
+
basePrice : base price (in US dollars) of one night of stay in the room.
|
| 54 |
+
decor : decoration style of the room
|
| 55 |
+
|
| 56 |
+
**************************************************************************
|
| 57 |
+
|
| 58 |
+
Reservations.csv
|
| 59 |
+
|
| 60 |
+
Code : reservation code
|
| 61 |
+
Room : the three-letter room code (see Rooms.RoomId)
|
| 62 |
+
CheckIn : date of check-in/arrival
|
| 63 |
+
CheckOut : date of check-out/departure
|
| 64 |
+
Rate : actual nightly rate. Each night of stay on one reservation
|
| 65 |
+
always costs the same amount, although rates may vary
|
| 66 |
+
for the same room from one reservation to another
|
| 67 |
+
LastName : last name of the person who made the reservation
|
| 68 |
+
FirstName : first name of the person who made the reservation
|
| 69 |
+
Adults : number of adults (18 and above) staying in the room. Each
|
| 70 |
+
reservation must have at least one adult
|
| 71 |
+
Kids : number of kids (ages 0-17) staying in the room.
|
| 72 |
+
|
| 73 |
+
**************************************************************************
|
| 74 |
+
**************************************************************************
|
| 75 |
+
|
| 76 |
+
Permission granted to use and distribute this dataset in its current form,
|
| 77 |
+
provided this file is kept unchanged and is distributed together with the
|
| 78 |
+
data.
|
| 79 |
+
|
| 80 |
+
Permission granted to modify and expand this dataset, provided this
|
| 81 |
+
file is updated accordingly with new information.
|
| 82 |
+
|
| 83 |
+
Acknowledgements. We thank Dr. Clint Staley for the software script that
|
| 84 |
+
produced the names of the rooms.
|
| 85 |
+
|
| 86 |
+
**************************************************************************
|
| 87 |
+
**************************************************************************
|
database/local_govt_mdm/local_govt_mdm.sqlite
ADDED
|
Binary file (36.9 kB). View file
|
|
|
database/local_govt_mdm/schema.sql
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE Customer_Master_Index (
|
| 4 |
+
master_customer_id INTEGER NOT NULL,
|
| 5 |
+
cmi_details VARCHAR(255),
|
| 6 |
+
PRIMARY KEY (master_customer_id)
|
| 7 |
+
);
|
| 8 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (1, 'Schmitt-Lang');
|
| 9 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (2, 'Volkman, Mills and Ferry');
|
| 10 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (3, 'Gusikowski PLC');
|
| 11 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (4, 'Schmidt, Kertzmann and Lubowitz');
|
| 12 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (5, 'Gottlieb, Becker and Wyman');
|
| 13 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (6, 'Mayer-Hagenes');
|
| 14 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (7, 'Streich-Morissette');
|
| 15 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (8, 'Quigley-Paucek');
|
| 16 |
+
INSERT INTO `Customer_Master_Index` (`master_customer_id`, `cmi_details`) VALUES (9, 'Reynolds-McClure');
|
| 17 |
+
|
| 18 |
+
CREATE TABLE CMI_Cross_References (
|
| 19 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 20 |
+
master_customer_id INTEGER NOT NULL,
|
| 21 |
+
source_system_code CHAR(15) NOT NULL,
|
| 22 |
+
PRIMARY KEY (cmi_cross_ref_id),
|
| 23 |
+
FOREIGN KEY (master_customer_id) REFERENCES Customer_Master_Index (master_customer_id)
|
| 24 |
+
|
| 25 |
+
);
|
| 26 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (2, 4, 'Rent');
|
| 27 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (4, 5, 'Parking');
|
| 28 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (8, 1, 'Rent');
|
| 29 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (41, 5, 'Benefits');
|
| 30 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (48, 5, 'Benefits');
|
| 31 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (49, 1, 'Business');
|
| 32 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (59, 1, 'Rent');
|
| 33 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (65, 9, 'Benefits');
|
| 34 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (75, 5, 'Electoral');
|
| 35 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (77, 4, 'Electoral');
|
| 36 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (81, 9, 'Parking');
|
| 37 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (83, 3, 'Benefits');
|
| 38 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (95, 2, 'Business');
|
| 39 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (99, 9, 'Business');
|
| 40 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (100, 4, 'Rent');
|
| 41 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (101, 2, 'Tax');
|
| 42 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (102, 4, 'Tax');
|
| 43 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (103, 9, 'Tax');
|
| 44 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (104, 2, 'Tax');
|
| 45 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (105, 2, 'Tax');
|
| 46 |
+
INSERT INTO `CMI_Cross_References` (`cmi_cross_ref_id`, `master_customer_id`, `source_system_code`) VALUES (106, 1, 'Tax');
|
| 47 |
+
|
| 48 |
+
CREATE TABLE Council_Tax (
|
| 49 |
+
council_tax_id INTEGER NOT NULL,
|
| 50 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 51 |
+
PRIMARY KEY (council_tax_id),
|
| 52 |
+
FOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)
|
| 53 |
+
);
|
| 54 |
+
CREATE TABLE Business_Rates (
|
| 55 |
+
business_rates_id INTEGER NOT NULL,
|
| 56 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 57 |
+
PRIMARY KEY (business_rates_id),
|
| 58 |
+
FOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)
|
| 59 |
+
);
|
| 60 |
+
CREATE TABLE Benefits_Overpayments (
|
| 61 |
+
council_tax_id INTEGER NOT NULL,
|
| 62 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 63 |
+
PRIMARY KEY (council_tax_id),
|
| 64 |
+
FOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)
|
| 65 |
+
);
|
| 66 |
+
CREATE TABLE Parking_Fines (
|
| 67 |
+
council_tax_id INTEGER NOT NULL,
|
| 68 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 69 |
+
PRIMARY KEY (council_tax_id),
|
| 70 |
+
FOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)
|
| 71 |
+
);
|
| 72 |
+
CREATE TABLE Rent_Arrears (
|
| 73 |
+
council_tax_id INTEGER NOT NULL,
|
| 74 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 75 |
+
PRIMARY KEY (council_tax_id),
|
| 76 |
+
FOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)
|
| 77 |
+
);
|
| 78 |
+
CREATE TABLE Electoral_Register (
|
| 79 |
+
electoral_register_id INTEGER NOT NULL,
|
| 80 |
+
cmi_cross_ref_id INTEGER NOT NULL,
|
| 81 |
+
PRIMARY KEY (electoral_register_id),
|
| 82 |
+
FOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)
|
| 83 |
+
);
|
| 84 |
+
INSERT INTO `Benefits_Overpayments` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (3, 65);
|
| 85 |
+
INSERT INTO `Benefits_Overpayments` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (7, 83);
|
| 86 |
+
INSERT INTO `Benefits_Overpayments` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (6, 41);
|
| 87 |
+
INSERT INTO `Benefits_Overpayments` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (8, 48);
|
| 88 |
+
|
| 89 |
+
INSERT INTO `Business_Rates` (`business_rates_id`, `cmi_cross_ref_id`) VALUES (5, 49);
|
| 90 |
+
INSERT INTO `Business_Rates` (`business_rates_id`, `cmi_cross_ref_id`) VALUES (2, 99);
|
| 91 |
+
INSERT INTO `Business_Rates` (`business_rates_id`, `cmi_cross_ref_id`) VALUES (8, 95);
|
| 92 |
+
|
| 93 |
+
INSERT INTO `Council_Tax` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (1, 101);
|
| 94 |
+
INSERT INTO `Council_Tax` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (7, 102);
|
| 95 |
+
INSERT INTO `Council_Tax` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (2, 103);
|
| 96 |
+
INSERT INTO `Council_Tax` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (3, 104);
|
| 97 |
+
INSERT INTO `Council_Tax` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (9, 105);
|
| 98 |
+
INSERT INTO `Council_Tax` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (8, 106);
|
| 99 |
+
|
| 100 |
+
INSERT INTO `Electoral_Register` (`electoral_register_id`, `cmi_cross_ref_id`) VALUES (3, 65);
|
| 101 |
+
INSERT INTO `Electoral_Register` (`electoral_register_id`, `cmi_cross_ref_id`) VALUES (7, 65);
|
| 102 |
+
INSERT INTO `Electoral_Register` (`electoral_register_id`, `cmi_cross_ref_id`) VALUES (8, 75);
|
| 103 |
+
INSERT INTO `Electoral_Register` (`electoral_register_id`, `cmi_cross_ref_id`) VALUES (2, 83);
|
| 104 |
+
INSERT INTO `Electoral_Register` (`electoral_register_id`, `cmi_cross_ref_id`) VALUES (6, 95);
|
| 105 |
+
INSERT INTO `Electoral_Register` (`electoral_register_id`, `cmi_cross_ref_id`) VALUES (4, 100);
|
| 106 |
+
INSERT INTO `Parking_Fines` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (9, 4);
|
| 107 |
+
INSERT INTO `Parking_Fines` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (10, 81);
|
| 108 |
+
|
| 109 |
+
INSERT INTO `Rent_Arrears` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (7, 2);
|
| 110 |
+
INSERT INTO `Rent_Arrears` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (2, 8);
|
| 111 |
+
INSERT INTO `Rent_Arrears` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (6, 59);
|
| 112 |
+
INSERT INTO `Rent_Arrears` (`council_tax_id`, `cmi_cross_ref_id`) VALUES (1, 100);
|
database/mountain_photos/schema.sql
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys=ON;
|
| 2 |
+
BEGIN TRANSACTION;
|
| 3 |
+
CREATE TABLE IF NOT EXISTS "mountain" (
|
| 4 |
+
"id" int,
|
| 5 |
+
"name" text,
|
| 6 |
+
"Height" real,
|
| 7 |
+
"Prominence" real,
|
| 8 |
+
"Range" text,
|
| 9 |
+
"Country" text,
|
| 10 |
+
primary key("id")
|
| 11 |
+
);
|
| 12 |
+
INSERT INTO mountain VALUES(1,'Abune Yosef / Guliba Amba',4260.0000000000000002,1908.9999999999999999,'Lasta Massif','Ethiopia');
|
| 13 |
+
INSERT INTO mountain VALUES(2,'Ioll / Yoll',4219.9999999999999998,350.0,'Kollo Massif','Ethiopia');
|
| 14 |
+
INSERT INTO mountain VALUES(3,'Bada',4195.0000000000000001,1605.0,'Arsi Mountains','Ethiopia');
|
| 15 |
+
INSERT INTO mountain VALUES(4,'Kaka / Kecha / Chiqe',4193.0000000000000001,1215.0,'Arsi Mountains','Ethiopia');
|
| 16 |
+
INSERT INTO mountain VALUES(5,'Jbel Toubkal',4167.0,3755.0000000000000001,'Toubkal Atlas','Morocco');
|
| 17 |
+
INSERT INTO mountain VALUES(6,'Muhavura',4127.0,1529.9999999999999999,'Virunga Mountains','Rwanda Uganda');
|
| 18 |
+
INSERT INTO mountain VALUES(7,'Hey / Hay',4125.0,659.99999999999999999,'Semien Mountains','Ethiopia');
|
| 19 |
+
INSERT INTO mountain VALUES(8,'Guna',4119.9999999999999998,1509.9999999999999999,'Guna Massif','Ethiopia');
|
| 20 |
+
INSERT INTO mountain VALUES(9,'Choqa / Choke / Birhan',4099.9999999999999999,2224.9999999999999999,'Choqa Mountains','Ethiopia');
|
| 21 |
+
INSERT INTO mountain VALUES(10,'Ouanoukrim',4088.0,419.99999999999999998,'Toubkal Atlas','Morocco');
|
| 22 |
+
INSERT INTO mountain VALUES(11,'Chilalo',4071.0000000000000001,609.99999999999999999,'Arsi Mountains','Ethiopia');
|
| 23 |
+
INSERT INTO mountain VALUES(12,'Mount Cameroon',4070.0000000000000001,3931.0000000000000001,'Cameroon line','Cameroon');
|
| 24 |
+
INSERT INTO mountain VALUES(13,'Inatye',4070.0000000000000001,500.0,'Semien Mountains','Ethiopia');
|
| 25 |
+
INSERT INTO mountain VALUES(14,'Ighil Mgoun',4068.0000000000000001,1903.9999999999999999,'Central High Atlas','Morocco');
|
| 26 |
+
INSERT INTO mountain VALUES(15,'Weshema / Wasema?',4030.0000000000000001,419.99999999999999998,'Bale Mountains','Ethiopia');
|
| 27 |
+
INSERT INTO mountain VALUES(16,'Oldoinyo Lesatima',4001.0,2080.9999999999999999,'Aberdare Range','Kenya');
|
| 28 |
+
INSERT INTO mountain VALUES(17,'Jebel n''Tarourt / Tifnout / Iferouane',3995.9999999999999999,910.00000000000000003,'Toubkal Atlas','Morocco');
|
| 29 |
+
INSERT INTO mountain VALUES(18,'Muggia',3950.0,500.0,'Lasta Massif','Ethiopia');
|
| 30 |
+
INSERT INTO mountain VALUES(19,'Dubbai',3941.0,1539.9999999999999999,'Tigray Mountains','Ethiopia');
|
| 31 |
+
INSERT INTO mountain VALUES(20,'Taska n’Zat',3911.9999999999999999,459.99999999999999999,'Toubkal Atlas','Morocco');
|
| 32 |
+
INSERT INTO mountain VALUES(21,'Aksouâl',3902.9999999999999998,450.0,'Toubkal Atlas','Morocco');
|
| 33 |
+
INSERT INTO mountain VALUES(22,'Mount Kinangop',3901.9999999999999998,530.00000000000000001,'Aberdare Range','Kenya');
|
| 34 |
+
INSERT INTO mountain VALUES(23,'Cimbia',3900.0,590.0,'Kollo Massif','Ethiopia');
|
| 35 |
+
CREATE TABLE IF NOT EXISTS "camera_lens" (
|
| 36 |
+
"id" int,
|
| 37 |
+
"brand" text,
|
| 38 |
+
"name" text,
|
| 39 |
+
"focal_length_mm" real,
|
| 40 |
+
"max_aperture" real,
|
| 41 |
+
primary key("id")
|
| 42 |
+
);
|
| 43 |
+
INSERT INTO camera_lens VALUES(1,'Olympus','Olympus 15mm f/8.0 Body Cap',15.0,8.0);
|
| 44 |
+
INSERT INTO camera_lens VALUES(2,'Olympus','Olympus M.Zuiko Digital ED 45mm f/1.8',45.0,1.8000000000000000444);
|
| 45 |
+
INSERT INTO camera_lens VALUES(3,'Olympus','Olympus M.Zuiko Digital ED 75mm f/1.8',75.0,1.8000000000000000444);
|
| 46 |
+
INSERT INTO camera_lens VALUES(4,'Panasonic','Panasonic Leica DG Summilux 25mm f /1.4 Asph.',25.0,1.3999999999999999111);
|
| 47 |
+
INSERT INTO camera_lens VALUES(5,'Panasonic','Panasonic Leica DG Nocticron 42.5mm f /1.2',42.5,1.1999999999999999555);
|
| 48 |
+
INSERT INTO camera_lens VALUES(6,'Panasonic','Panasonic Lumix G 150mm f /2.8',150.0,2.7999999999999998223);
|
| 49 |
+
INSERT INTO camera_lens VALUES(7,'Schneider Kreuznach','Schneider Kreuznach Super Angulon 14mm f /2.0',13.999999999999999999,2.0);
|
| 50 |
+
INSERT INTO camera_lens VALUES(8,'Schneider Kreuznach','Schneider Kreuznach Xenon 30mm f /1.4',30.0,1.3999999999999999111);
|
| 51 |
+
INSERT INTO camera_lens VALUES(9,'Sigma','Sigma 19mm f2.8 DN',19.0,2.7999999999999998223);
|
| 52 |
+
INSERT INTO camera_lens VALUES(10,'Sigma','Sigma 19mm f2.8 EX DN',19.0,2.7999999999999998223);
|
| 53 |
+
INSERT INTO camera_lens VALUES(11,'Sigma','Sigma 30mm f2.8 DN',30.0,2.7999999999999998223);
|
| 54 |
+
CREATE TABLE IF NOT EXISTS "photos" (
|
| 55 |
+
"id" int,
|
| 56 |
+
"camera_lens_id" int,
|
| 57 |
+
"mountain_id" int,
|
| 58 |
+
"color" text,
|
| 59 |
+
"name" text,
|
| 60 |
+
primary key("id"),
|
| 61 |
+
foreign key("camera_lens_id") references `camera_lens`("id"),
|
| 62 |
+
foreign key("mountain_id") references `mountain`("id")
|
| 63 |
+
);
|
| 64 |
+
INSERT INTO photos VALUES(1,1,20,'RBG','monkey');
|
| 65 |
+
INSERT INTO photos VALUES(2,10,2,'RBG','rabbits');
|
| 66 |
+
INSERT INTO photos VALUES(3,10,1,'Black/White','deers');
|
| 67 |
+
INSERT INTO photos VALUES(4,1,10,'RBG','grass');
|
| 68 |
+
INSERT INTO photos VALUES(5,5,14,'RBG','cloud');
|
| 69 |
+
INSERT INTO photos VALUES(6,6,12,'RBG','sunset');
|
| 70 |
+
INSERT INTO photos VALUES(7,7,12,'RBG','river');
|
| 71 |
+
INSERT INTO photos VALUES(8,7,12,'Black/White','wolfs');
|
| 72 |
+
INSERT INTO photos VALUES(9,10,14,'RBG','the mountain');
|
| 73 |
+
INSERT INTO photos VALUES(10,10,20,'RBG','life');
|
| 74 |
+
COMMIT;
|
| 75 |
+
|
database/product_catalog/product_catalog.sqlite
ADDED
|
Binary file (24.6 kB). View file
|
|
|
database/product_catalog/schema.sql
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE `Attribute_Definitions` (
|
| 4 |
+
`attribute_id` INTEGER PRIMARY KEY,
|
| 5 |
+
`attribute_name` VARCHAR(30),
|
| 6 |
+
`attribute_data_type` VARCHAR(10)
|
| 7 |
+
);
|
| 8 |
+
INSERT INTO Attribute_Definitions (`attribute_id`, `attribute_name`, `attribute_data_type`) VALUES (1, 'Green', 'Bool');
|
| 9 |
+
INSERT INTO Attribute_Definitions (`attribute_id`, `attribute_name`, `attribute_data_type`) VALUES (2, 'Black', 'Bool');
|
| 10 |
+
INSERT INTO Attribute_Definitions (`attribute_id`, `attribute_name`, `attribute_data_type`) VALUES (3, 'Yellow', 'Bool');
|
| 11 |
+
INSERT INTO Attribute_Definitions (`attribute_id`, `attribute_name`, `attribute_data_type`) VALUES (4, 'Sweet', 'Bool');
|
| 12 |
+
|
| 13 |
+
CREATE TABLE `Catalogs` (
|
| 14 |
+
`catalog_id` INTEGER PRIMARY KEY,
|
| 15 |
+
`catalog_name` VARCHAR(50),
|
| 16 |
+
`catalog_publisher` VARCHAR(80),
|
| 17 |
+
`date_of_publication` DATETIME,
|
| 18 |
+
`date_of_latest_revision` DATETIME
|
| 19 |
+
);
|
| 20 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (1, 'Chocolate', 'Koepp-Rutherford handmade chocolate store', '2013-03-15 05:09:17', '2017-09-26 12:10:36');
|
| 21 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (2, 'Coffee Bean', 'Murray Coffee shop', '2012-04-13 06:37:09', '2017-10-26 01:16:51');
|
| 22 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (3, 'Lemonade', 'Russel-Gislason Lemon shop', '2012-11-27 19:29:22', '2017-12-04 06:48:13');
|
| 23 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (4, 'Breakfast Tea', 'Grady & Kautzer', '2011-07-22 04:57:19', '2017-03-30 09:15:37');
|
| 24 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (5, 'Coco powder', 'Lidl', '2013-03-15 05:09:17', '2017-09-26 12:10:36');
|
| 25 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (6, 'Latte', 'Murray Coffee shop', '2012-04-13 06:37:09', '2017-10-26 01:16:51');
|
| 26 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (7, 'Sparkling Water', 'Russel-Gislason Lemon shop', '2012-11-27 19:29:22', '2017-12-04 06:48:13');
|
| 27 |
+
INSERT INTO Catalogs (`catalog_id`, `catalog_name`, `catalog_publisher`, `date_of_publication`, `date_of_latest_revision`) VALUES (8, 'Jam', 'Grady & Kautzer', '2011-07-22 04:57:19', '2017-03-30 09:15:37');
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
CREATE TABLE `Catalog_Structure` (
|
| 31 |
+
`catalog_level_number` INTEGER PRIMARY KEY,
|
| 32 |
+
`catalog_id` INTEGER NOT NULL,
|
| 33 |
+
`catalog_level_name` VARCHAR(50),
|
| 34 |
+
FOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )
|
| 35 |
+
);
|
| 36 |
+
|
| 37 |
+
INSERT INTO Catalog_Structure (`catalog_level_number`, `catalog_id`, `catalog_level_name`) VALUES (1, 1, 'Category');
|
| 38 |
+
INSERT INTO Catalog_Structure (`catalog_level_number`, `catalog_id`, `catalog_level_name`) VALUES (8, 2, 'Sub-Category');
|
| 39 |
+
INSERT INTO Catalog_Structure (`catalog_level_number`, `catalog_id`, `catalog_level_name`) VALUES (9, 8, 'Product');
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
CREATE TABLE `Catalog_Contents` (
|
| 43 |
+
`catalog_entry_id` INTEGER PRIMARY KEY,
|
| 44 |
+
`catalog_level_number` INTEGER NOT NULL,
|
| 45 |
+
`parent_entry_id` INTEGER,
|
| 46 |
+
`previous_entry_id` INTEGER,
|
| 47 |
+
`next_entry_id` INTEGER,
|
| 48 |
+
`catalog_entry_name` VARCHAR(80),
|
| 49 |
+
`product_stock_number` VARCHAR(50),
|
| 50 |
+
`price_in_dollars` DOUBLE NULL,
|
| 51 |
+
`price_in_euros` DOUBLE NULL,
|
| 52 |
+
`price_in_pounds` DOUBLE NULL,
|
| 53 |
+
`capacity` VARCHAR(20),
|
| 54 |
+
`length` VARCHAR(20),
|
| 55 |
+
`height` VARCHAR(20),
|
| 56 |
+
`width` VARCHAR(20),
|
| 57 |
+
FOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )
|
| 58 |
+
);
|
| 59 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (1, 1, 5, 9, 7, 'Cola', '89 cp', '200.78', '159.84', '172.17', '1', '3', '9', '5');
|
| 60 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (2, 8, 6, 9, 8, 'Root beer', '37 hq', '687.59', '590.11', '471.78', '8', '6', '5', '6');
|
| 61 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (3, 8, 6, 6, 1, 'Cream Soda', '52 ee', '360.5', '202.32', '110.32', '5', '9', '7', '8');
|
| 62 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (4, 1, 7, 8, 6, 'Carbonated Water', '15 mr', '667.89', '458.45', '349.01', '8', '6', '2', '1');
|
| 63 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (5, 9, 4, 7, 6, 'Ginger Beer', '42 cp', '616.22', '537.66', '405.75', '5', '5', '7', '9');
|
| 64 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (6, 1, 3, 4, 8, 'Tizer', '61 py', '642.37', '434.21', '331.43', '6', '6', '7', '1');
|
| 65 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (7, 9, 7, 3, 3, 'Vimto', '01 ap', '745.02', '510.32', '497.4', '6', '9', '6', '5');
|
| 66 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (8, 8, 6, 5, 3, 'Ramune', '53 bg', '574.35', '441.82', '440.52', '4', '4', '7', '5');
|
| 67 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (9, 1, 7, 9, 9, 'Sprite Lemo', '24 ec', '952.37', '703.17', '433.82', '8', '7', '1', '3');
|
| 68 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (10, 8, 5, 6, 6, 'Dr Pepper', '26 op', '777.41', '616.54', '572.41', '1', '6', '1', '6');
|
| 69 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (11, 1, 3, 6, 9, 'Diet Pepsi', '49 jg', '808.31', '643.77', '515.62', '9', '8', '3', '3');
|
| 70 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (12, 8, 4, 5, 3, 'Diet Mountain Dew', '96 zx', '883.43', '752.87', '678.01', '8', '8', '1', '3');
|
| 71 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (13, 1, 5, 9, 1, 'Mountain Dew', '49 cz', '475.79', '457.4', '335.63', '7', '8', '4', '5');
|
| 72 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (14, 9, 3, 5, 8, 'Fenta Orange', '65 wc', '415.92', '385.85', '371.9', '7', '4', '3', '7');
|
| 73 |
+
INSERT INTO Catalog_Contents (`catalog_entry_id`, `catalog_level_number`, `parent_entry_id`, `previous_entry_id`, `next_entry_id`, `catalog_entry_name`, `product_stock_number`, `price_in_dollars`, `price_in_euros`, `price_in_pounds`, `capacity`, `length`, `height`, `width`) VALUES (15, 1, 6, 8, 9, 'Wanglaoji', '51 kr', '533.6', '498.62', '422.71', '4', '5', '8', '8');
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
CREATE TABLE `Catalog_Contents_Additional_Attributes` (
|
| 78 |
+
`catalog_entry_id` INTEGER NOT NULL,
|
| 79 |
+
`catalog_level_number` INTEGER NOT NULL,
|
| 80 |
+
`attribute_id` INTEGER NOT NULL,
|
| 81 |
+
`attribute_value` VARCHAR(255) NOT NULL,
|
| 82 |
+
FOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),
|
| 83 |
+
FOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )
|
| 84 |
+
);
|
| 85 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (5, 8, 4, '1');
|
| 86 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (15, 9, 3, '0');
|
| 87 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (11, 1, 2, '0');
|
| 88 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (12, 1, 4, '0');
|
| 89 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (1, 8, 3, '1');
|
| 90 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (8, 1, 3, '1');
|
| 91 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (14, 9, 2, '0');
|
| 92 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (15, 9, 2, '0');
|
| 93 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (15, 1, 3, '1');
|
| 94 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (1, 8, 4, '0');
|
| 95 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (11, 1, 3, '1');
|
| 96 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (8, 9, 3, '0');
|
| 97 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (2, 8, 4, '1');
|
| 98 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (6, 1, 1, '1');
|
| 99 |
+
INSERT INTO Catalog_Contents_Additional_Attributes (`catalog_entry_id`, `catalog_level_number`, `attribute_id`, `attribute_value`) VALUES (4, 8, 4, '0');
|
database/products_for_hire/products_for_hire.sqlite
ADDED
|
Binary file (41 kB). View file
|
|
|
database/products_for_hire/schema.sql
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE `Discount_Coupons` (
|
| 4 |
+
`coupon_id` INTEGER PRIMARY KEY,
|
| 5 |
+
`date_issued` DATETIME,
|
| 6 |
+
`coupon_amount` DECIMAL(19,4)
|
| 7 |
+
);
|
| 8 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (1, '2017-09-06 01:33:27', '500.0000');
|
| 9 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (2, '2018-02-20 09:40:56', '686.2500');
|
| 10 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (3, '2017-09-17 23:31:36', '501.3000');
|
| 11 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (4, '2017-07-21 10:10:47', '370.4400');
|
| 12 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (5, '2017-06-21 22:47:58', '399.8900');
|
| 13 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (6, '2017-08-16 03:16:48', '689.2900');
|
| 14 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (7, '2018-02-10 21:18:23', '508.4400');
|
| 15 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (8, '2017-12-28 20:11:42', '666.4600');
|
| 16 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (9, '2017-07-03 23:02:14', '685.9600');
|
| 17 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (10, '2018-03-22 01:10:03', '175.9400');
|
| 18 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (11, '2017-10-22 06:03:39', '607.6200');
|
| 19 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (12, '2018-03-21 11:49:13', '523.7800');
|
| 20 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (13, '2017-07-13 00:37:36', '770.8200');
|
| 21 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (14, '2018-02-24 01:40:52', '547.3900');
|
| 22 |
+
INSERT INTO Discount_Coupons (`coupon_id`, `date_issued`, `coupon_amount`) VALUES (15, '2017-07-02 06:49:42', '245.3600');
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
CREATE TABLE `Customers` (
|
| 26 |
+
`customer_id` INTEGER PRIMARY KEY,
|
| 27 |
+
`coupon_id` INTEGER NOT NULL,
|
| 28 |
+
`good_or_bad_customer` VARCHAR(4),
|
| 29 |
+
`first_name` VARCHAR(80),
|
| 30 |
+
`last_name` VARCHAR(80),
|
| 31 |
+
`gender_mf` VARCHAR(1),
|
| 32 |
+
`date_became_customer` DATETIME,
|
| 33 |
+
`date_last_hire` DATETIME,
|
| 34 |
+
FOREIGN KEY (`coupon_id` ) REFERENCES `Discount_Coupons`(`coupon_id` )
|
| 35 |
+
);
|
| 36 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (1, 12, 'good', 'Geovany', 'Homenick', '0', '2017-10-20 12:13:17', '2018-02-27 18:55:26');
|
| 37 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (2, 14, 'good', 'Jailyn', 'Gerlach', '0', '2015-04-06 21:18:37', '2018-01-30 04:47:13');
|
| 38 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (3, 7, 'good', 'Rosalee', 'Kessler', '0', '2016-02-03 16:58:11', '2018-03-04 21:30:23');
|
| 39 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (4, 12, 'bad', 'Reba', 'Jacobs', '1', '2016-06-17 14:11:50', '2018-02-19 06:04:01');
|
| 40 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (5, 10, 'good', 'Ericka', 'Greenholt', '0', '2016-08-11 01:50:37', '2018-02-25 04:40:15');
|
| 41 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (6, 14, 'bad', 'Bridget', 'Ankunding', '1', '2015-04-24 02:38:16', '2018-02-10 19:44:08');
|
| 42 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (7, 12, 'good', 'Marilou', 'Strosin', '1', '2015-12-16 08:05:53', '2018-02-01 16:48:30');
|
| 43 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (8, 6, 'good', 'Elinore', 'Crona', '0', '2017-07-27 08:04:22', '2018-03-04 08:59:40');
|
| 44 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (9, 7, 'good', 'German', 'Little', '1', '2017-02-28 14:40:25', '2018-03-13 21:20:05');
|
| 45 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (10, 1, 'bad', 'Layne', 'Terry', '1', '2015-05-05 20:29:01', '2018-02-04 08:56:55');
|
| 46 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (11, 10, 'good', 'Maximilian', 'Murphy', '0', '2015-07-21 09:24:57', '2018-03-12 09:23:41');
|
| 47 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (12, 11, 'good', 'Vergie', 'Nicolas', '0', '2016-02-03 10:31:18', '2018-03-03 23:37:31');
|
| 48 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (13, 2, 'good', 'Laury', 'Lemke', '1', '2017-03-18 04:37:59', '2018-03-18 17:35:43');
|
| 49 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (14, 6, 'good', 'Tyler', 'Breitenberg', '1', '2016-04-20 21:04:35', '2018-03-03 13:46:38');
|
| 50 |
+
INSERT INTO Customers (`customer_id`, `coupon_id`, `good_or_bad_customer`, `first_name`, `last_name`, `gender_mf`, `date_became_customer`, `date_last_hire`) VALUES (15, 3, 'bad', 'Jamir', 'Schroeder', '1', '2016-05-25 01:12:49', '2018-02-24 11:15:29');
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
CREATE TABLE `Bookings` (
|
| 54 |
+
`booking_id` INTEGER PRIMARY KEY ,
|
| 55 |
+
`customer_id` INTEGER NOT NULL,
|
| 56 |
+
`booking_status_code` VARCHAR(10) NOT NULL,
|
| 57 |
+
`returned_damaged_yn` VARCHAR(40),
|
| 58 |
+
`booking_start_date` DATETIME,
|
| 59 |
+
`booking_end_date` DATETIME,
|
| 60 |
+
`count_hired` VARCHAR(40),
|
| 61 |
+
`amount_payable` DECIMAL(19,4),
|
| 62 |
+
`amount_of_discount` DECIMAL(19,4),
|
| 63 |
+
`amount_outstanding` DECIMAL(19,4),
|
| 64 |
+
`amount_of_refund` DECIMAL(19,4),
|
| 65 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 66 |
+
);
|
| 67 |
+
|
| 68 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (1, 7, 'Provisional', '1', '2016-12-07 23:39:17', '2018-02-01 16:39:13', '298', '214.3900', '71.4500', '28.2200', '179.1400');
|
| 69 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (2, 15, 'Confirmed', '1', '2017-06-16 11:42:31', '2018-02-19 21:53:31', '331', '386.9200', '83.8200', '57.6200', '183.6800');
|
| 70 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (3, 3, 'Confirmed', '1', '2017-04-04 11:02:43', '2018-02-01 09:30:50', '729', '351.3200', '49.2600', '66.0100', '135.9400');
|
| 71 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (4, 7, 'Provisional', '0', '2017-06-05 17:56:01', '2017-12-02 00:37:00', '152', '272.0800', '45.0600', '38.8700', '100.7800');
|
| 72 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (5, 7, 'Provisional', '1', '2016-11-06 20:54:26', '2017-10-11 03:00:15', '546', '338.1000', '79.3400', '32.9900', '191.3100');
|
| 73 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (6, 10, 'Confirmed', '0', '2016-06-05 05:18:17', '2018-01-14 00:29:01', '282', '209.4100', '27.7800', '52.6200', '192.0200');
|
| 74 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (7, 3, 'Provisional', '1', '2017-07-15 06:28:54', '2017-11-28 08:11:52', '236', '322.8700', '39.2700', '56.0200', '126.1000');
|
| 75 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (8, 11, 'Provisional', '0', '2016-09-26 01:09:20', '2018-03-24 21:21:32', '746', '303.3000', '61.5500', '68.0200', '145.6300');
|
| 76 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (9, 10, 'Provisional', '0', '2017-05-24 16:16:29', '2018-03-07 17:39:04', '846', '374.5900', '50.9300', '26.0400', '130.8700');
|
| 77 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (10, 3, 'Confirmed', '1', '2016-05-06 03:50:49', '2017-08-30 04:33:23', '857', '320.7300', '39.1600', '27.8100', '112.6300');
|
| 78 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (11, 9, 'Provisional', '1', '2017-04-11 00:39:03', '2017-10-02 07:28:09', '488', '273.2800', '48.7300', '73.8800', '181.1900');
|
| 79 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (12, 3, 'Provisional', '1', '2017-02-27 12:04:35', '2018-02-06 19:27:09', '914', '281.0900', '26.3700', '22.9700', '110.3900');
|
| 80 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (13, 8, 'Provisional', '0', '2016-11-27 17:19:40', '2018-03-04 21:42:45', '499', '286.4700', '89.0500', '36.7900', '143.9900');
|
| 81 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (14, 8, 'Confirmed', '1', '2016-04-25 11:04:18', '2018-01-01 10:19:20', '843', '221.5700', '24.1900', '64.0100', '161.9000');
|
| 82 |
+
INSERT INTO Bookings (`booking_id`, `customer_id`, `booking_status_code`, `returned_damaged_yn`, `booking_start_date`, `booking_end_date`, `count_hired`, `amount_payable`, `amount_of_discount`, `amount_outstanding`, `amount_of_refund`) VALUES (15, 9, 'Provisional', '1', '2017-04-28 08:35:56', '2018-01-18 23:54:44', '994', '306.2600', '78.3100', '93.8800', '124.9500');
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
CREATE TABLE `Products_for_Hire` (
|
| 87 |
+
`product_id` INTEGER PRIMARY KEY,
|
| 88 |
+
`product_type_code` VARCHAR(15) NOT NULL,
|
| 89 |
+
`daily_hire_cost` DECIMAL(19,4),
|
| 90 |
+
`product_name` VARCHAR(80),
|
| 91 |
+
`product_description` VARCHAR(255)
|
| 92 |
+
);
|
| 93 |
+
|
| 94 |
+
INSERT INTO Products_for_Hire (`product_id`, `product_type_code`, `daily_hire_cost`, `product_name`, `product_description`) VALUES (1, 'Cutlery', '26.1500', 'Book collection C', 'Anna Karenina');
|
| 95 |
+
INSERT INTO Products_for_Hire (`product_id`, `product_type_code`, `daily_hire_cost`, `product_name`, `product_description`) VALUES (2, 'Cutlery', '15.6200', 'Book collection B', 'War and Peace');
|
| 96 |
+
INSERT INTO Products_for_Hire (`product_id`, `product_type_code`, `daily_hire_cost`, `product_name`, `product_description`) VALUES (3, 'Cutlery', '39.7300', 'Book collection A', 'The Great Gatsby');
|
| 97 |
+
INSERT INTO Products_for_Hire (`product_id`, `product_type_code`, `daily_hire_cost`, `product_name`, `product_description`) VALUES (4, 'Din_Plates', '18.5000', 'DVD collection A', 'Twilight');
|
| 98 |
+
INSERT INTO Products_for_Hire (`product_id`, `product_type_code`, `daily_hire_cost`, `product_name`, `product_description`) VALUES (5, 'Cutlery', '39.5800', 'DVD collection B', 'One Hundred Years of Solitude');
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
CREATE TABLE `Payments` (
|
| 102 |
+
`payment_id` INTEGER PRIMARY KEY,
|
| 103 |
+
`booking_id` INTEGER,
|
| 104 |
+
`customer_id` INTEGER NOT NULL,
|
| 105 |
+
`payment_type_code` VARCHAR(15) NOT NULL,
|
| 106 |
+
`amount_paid_in_full_yn` VARCHAR(1),
|
| 107 |
+
`payment_date` DATETIME,
|
| 108 |
+
`amount_due` DECIMAL(19,4),
|
| 109 |
+
`amount_paid` DECIMAL(19,4),
|
| 110 |
+
FOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),
|
| 111 |
+
FOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )
|
| 112 |
+
);
|
| 113 |
+
|
| 114 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (1, 6, 15, 'Check', '1', '2018-03-09 16:28:00', '369.5200', '206.2700');
|
| 115 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (2, 9, 12, 'Cash', '1', '2018-03-03 13:39:44', '278.6000', '666.4500');
|
| 116 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (3, 5, 7, 'Credit Card', '0', '2018-03-22 15:00:23', '840.0600', '135.7000');
|
| 117 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (4, 6, 1, 'Check', '0', '2018-03-22 02:28:11', '678.2900', '668.4000');
|
| 118 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (5, 8, 11, 'Cash', '1', '2018-03-23 20:36:04', '830.2500', '305.6500');
|
| 119 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (6, 15, 8, 'Check', '0', '2018-03-19 12:39:31', '410.1000', '175.5400');
|
| 120 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (7, 1, 8, 'Cash', '1', '2018-03-02 06:25:45', '482.2600', '602.8000');
|
| 121 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (8, 9, 14, 'Cash', '1', '2018-03-12 23:00:55', '653.1800', '505.2300');
|
| 122 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (9, 3, 7, 'Direct Debit', '0', '2018-03-12 23:23:56', '686.8500', '321.5800');
|
| 123 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (10, 13, 10, 'Credit Card', '1', '2018-03-23 13:24:33', '486.7500', '681.2100');
|
| 124 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (11, 14, 15, 'Credit Card', '1', '2018-03-03 03:07:00', '259.1800', '464.0600');
|
| 125 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (12, 14, 9, 'Cash', '0', '2018-02-27 10:50:39', '785.7300', '685.3200');
|
| 126 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (13, 15, 14, 'Direct Debit', '0', '2018-03-03 14:22:51', '665.5800', '307.1400');
|
| 127 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (14, 5, 5, 'Direct Debit', '1', '2018-03-17 15:51:52', '407.5100', '704.4100');
|
| 128 |
+
INSERT INTO Payments (`payment_id`, `booking_id`, `customer_id`, `payment_type_code`, `amount_paid_in_full_yn`, `payment_date`, `amount_due`, `amount_paid`) VALUES (15, 4, 12, 'Credit Card', '1', '2018-03-17 03:07:45', '631.9300', '334.2000');
|
| 129 |
+
|
| 130 |
+
CREATE TABLE `Products_Booked` (
|
| 131 |
+
`booking_id` INTEGER NOT NULL,
|
| 132 |
+
`product_id` INTEGER NOT NULL,
|
| 133 |
+
`returned_yn` VARCHAR(1),
|
| 134 |
+
`returned_late_yn` VARCHAR(1),
|
| 135 |
+
`booked_count` INTEGER,
|
| 136 |
+
`booked_amount` FLOAT NULL,
|
| 137 |
+
PRIMARY KEY (`booking_id`, `product_id`)
|
| 138 |
+
FOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),
|
| 139 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )
|
| 140 |
+
);
|
| 141 |
+
|
| 142 |
+
CREATE TABLE `View_Product_Availability` (
|
| 143 |
+
`product_id` INTEGER NOT NULL,
|
| 144 |
+
`booking_id` INTEGER NOT NULL,
|
| 145 |
+
`status_date` DATETIME PRIMARY KEY,
|
| 146 |
+
`available_yn` VARCHAR(1),
|
| 147 |
+
FOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),
|
| 148 |
+
FOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )
|
| 149 |
+
);
|
| 150 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (4, 1, '1', '1', 5, '309.73');
|
| 151 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (14, 1, '1', '0', 3, '102.76');
|
| 152 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (13, 3, '1', '0', 4, '151.68');
|
| 153 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (11, 1, '1', '1', 1, '344.38');
|
| 154 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (15, 3, '1', '0', 2, '236.13');
|
| 155 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (10, 4, '1', '0', 6, '123.43');
|
| 156 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (14, 5, '1', '1', 6, '351.38');
|
| 157 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (11, 5, '1', '1', 3, '146.01');
|
| 158 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (3, 5, '1', '1', 3, '189.16');
|
| 159 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (15, 1, '1', '0', 1, '398.68');
|
| 160 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (2, 4, '1', '1', 9, '290.72');
|
| 161 |
+
INSERT INTO Products_Booked (`booking_id`, `product_id`, `returned_yn`, `returned_late_yn`, `booked_count`, `booked_amount`) VALUES (1, 2, '1', '0', 5, '110.2');
|
| 162 |
+
INSERT INTO View_Product_Availability (`product_id`, `booking_id`, `status_date`, `available_yn`) VALUES (1, 5, '2018-03-18 05:25:55', '1');
|
| 163 |
+
INSERT INTO View_Product_Availability (`product_id`, `booking_id`, `status_date`, `available_yn`) VALUES (2, 5, '2018-03-21 15:20:32', '0');
|
| 164 |
+
INSERT INTO View_Product_Availability (`product_id`, `booking_id`, `status_date`, `available_yn`) VALUES (3, 11, '2018-03-25 10:20:15', '1');
|
| 165 |
+
INSERT INTO View_Product_Availability (`product_id`, `booking_id`, `status_date`, `available_yn`) VALUES (5, 11, '2018-03-22 00:16:58', '1');
|
database/restaurant_1/schema.sql
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 Restaurant (
|
| 13 |
+
ResID INTEGER PRIMARY KEY,
|
| 14 |
+
ResName VARCHAR(100),
|
| 15 |
+
Address VARCHAR(100),
|
| 16 |
+
Rating INTEGER
|
| 17 |
+
);
|
| 18 |
+
|
| 19 |
+
create table Type_Of_Restaurant (
|
| 20 |
+
ResID INTEGER,
|
| 21 |
+
ResTypeID INTEGER,
|
| 22 |
+
FOREIGN KEY(ResID) REFERENCES Restaurant(ResID),
|
| 23 |
+
FOREIGN KEY(ResTypeID) REFERENCES Restaurant_Type(ResTypeID)
|
| 24 |
+
);
|
| 25 |
+
|
| 26 |
+
create table Restaurant_Type (
|
| 27 |
+
ResTypeID INTEGER PRIMARY KEY,
|
| 28 |
+
ResTypeName VARCHAR(40),
|
| 29 |
+
ResTypeDescription VARCHAR(100)
|
| 30 |
+
);
|
| 31 |
+
|
| 32 |
+
create table Visits_Restaurant (
|
| 33 |
+
StuID INTEGER,
|
| 34 |
+
ResID INTEGER,
|
| 35 |
+
Time TIMESTAMP,
|
| 36 |
+
Spent FLOAT,
|
| 37 |
+
FOREIGN KEY(StuID) REFERENCES Student(StuID),
|
| 38 |
+
FOREIGN KEY(ResID) REFERENCES Restaurant(ResID)
|
| 39 |
+
);
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
|
| 43 |
+
insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
|
| 44 |
+
insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
|
| 45 |
+
insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
|
| 46 |
+
insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
|
| 47 |
+
insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
|
| 48 |
+
insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
|
| 49 |
+
insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
|
| 50 |
+
insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
|
| 51 |
+
insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
|
| 52 |
+
insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
|
| 53 |
+
insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
|
| 54 |
+
insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
|
| 55 |
+
insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
|
| 56 |
+
insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
|
| 57 |
+
insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
|
| 58 |
+
insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
|
| 59 |
+
insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
|
| 60 |
+
insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
|
| 61 |
+
insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
|
| 62 |
+
insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
|
| 63 |
+
insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
|
| 64 |
+
insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
|
| 65 |
+
insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
|
| 66 |
+
insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
|
| 67 |
+
insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
|
| 68 |
+
insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
|
| 69 |
+
insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
|
| 70 |
+
insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
|
| 71 |
+
insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
|
| 72 |
+
insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
|
| 73 |
+
insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
|
| 74 |
+
insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
|
| 75 |
+
insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
|
| 76 |
+
|
| 77 |
+
insert into Restaurant values ( 1, 'Subway', '3233 St Paul St, Baltimore, MD 21218', 3);
|
| 78 |
+
insert into Restaurant values ( 2, 'Honeygrow', '3212 St Paul St, Baltimore, MD 21218', 4);
|
| 79 |
+
|
| 80 |
+
insert into Restaurant_Type values ( 1, 'Sandwich', 'Simplest there is.');
|
| 81 |
+
insert into Restaurant_Type values ( 2, 'Stir-fry', 'Classic Chinese cooking.');
|
| 82 |
+
|
| 83 |
+
insert into Type_Of_Restaurant values (1, 1);
|
| 84 |
+
insert into Type_Of_Restaurant values (2, 2);
|
| 85 |
+
|
| 86 |
+
insert into Visits_Restaurant values (1001, 1, '2017-10-09 18:15:00', 6.53);
|
| 87 |
+
insert into Visits_Restaurant values (1032, 2, '2017-10-08 13:00:30', 13.2);
|
database/scholar/schema.sql
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
CREATE TABLE `venue` (
|
| 6 |
+
`venueId` integer NOT NULL
|
| 7 |
+
, `venueName` varchar(100) DEFAULT NULL
|
| 8 |
+
, PRIMARY KEY (`venueId`)
|
| 9 |
+
);
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
CREATE TABLE `author` (
|
| 14 |
+
`authorId` integer NOT NULL
|
| 15 |
+
, `authorName` varchar(50) DEFAULT NULL
|
| 16 |
+
, PRIMARY KEY (`authorId`)
|
| 17 |
+
);
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
CREATE TABLE `dataset` (
|
| 21 |
+
`datasetId` integer NOT NULL
|
| 22 |
+
, `datasetName` varchar(50) DEFAULT NULL
|
| 23 |
+
, PRIMARY KEY (`datasetId`)
|
| 24 |
+
);
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
CREATE TABLE `journal` (
|
| 28 |
+
`journalId` integer NOT NULL
|
| 29 |
+
, `journalName` varchar(100) DEFAULT NULL
|
| 30 |
+
, PRIMARY KEY (`journalId`)
|
| 31 |
+
);
|
| 32 |
+
|
| 33 |
+
CREATE TABLE `keyphrase` (
|
| 34 |
+
`keyphraseId` integer NOT NULL
|
| 35 |
+
, `keyphraseName` varchar(50) DEFAULT NULL
|
| 36 |
+
, PRIMARY KEY (`keyphraseId`)
|
| 37 |
+
);
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
CREATE TABLE `paper` (
|
| 41 |
+
`paperId` integer NOT NULL
|
| 42 |
+
, `title` varchar(300) DEFAULT NULL
|
| 43 |
+
, `venueId` integer DEFAULT NULL
|
| 44 |
+
, `year` integer DEFAULT NULL
|
| 45 |
+
, `numCiting` integer DEFAULT NULL
|
| 46 |
+
, `numCitedBy` integer DEFAULT NULL
|
| 47 |
+
, `journalId` integer DEFAULT NULL
|
| 48 |
+
, PRIMARY KEY (`paperId`)
|
| 49 |
+
, FOREIGN KEY(`journalId`) REFERENCES `journal`(`journalId`)
|
| 50 |
+
, FOREIGN KEY(`venueId`) REFERENCES `venue`(`venueId`)
|
| 51 |
+
);
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
CREATE TABLE `cite` (
|
| 56 |
+
`citingPaperId` integer NOT NULL
|
| 57 |
+
, `citedPaperId` integer NOT NULL
|
| 58 |
+
, PRIMARY KEY (`citingPaperId`,`citedPaperId`)
|
| 59 |
+
, FOREIGN KEY(`citedpaperId`) REFERENCES `paper`(`paperId`)
|
| 60 |
+
, FOREIGN KEY(`citingpaperId`) REFERENCES `paper`(`paperId`)
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
CREATE TABLE `paperDataset` (
|
| 65 |
+
`paperId` integer DEFAULT NULL
|
| 66 |
+
, `datasetId` integer DEFAULT NULL
|
| 67 |
+
, PRIMARY KEY (`datasetId`, `paperId`)
|
| 68 |
+
);
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
CREATE TABLE `paperKeyphrase` (
|
| 73 |
+
`paperId` integer DEFAULT NULL
|
| 74 |
+
, `keyphraseId` integer DEFAULT NULL
|
| 75 |
+
, PRIMARY KEY (`keyphraseId`,`paperId`)
|
| 76 |
+
, FOREIGN KEY(`paperId`) REFERENCES `paper`(`paperId`)
|
| 77 |
+
, FOREIGN KEY(`keyphraseId`) REFERENCES `keyphrase`(`keyphraseId`)
|
| 78 |
+
);
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
CREATE TABLE `writes` (
|
| 82 |
+
`paperId` integer DEFAULT NULL
|
| 83 |
+
, `authorId` integer DEFAULT NULL
|
| 84 |
+
, PRIMARY KEY (`paperId`,`authorId`)
|
| 85 |
+
, FOREIGN KEY(`paperId`) REFERENCES `paper`(`paperId`)
|
| 86 |
+
, FOREIGN KEY(`authorId`) REFERENCES `author`(`authorId`)
|
| 87 |
+
);
|
| 88 |
+
|
database/scholar/scholar.sqlite
ADDED
|
Binary file (61.4 kB). View file
|
|
|
database/singer/singer.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
database/store_1/schema.sql
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
database/student_1/link.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
http://users.csc.calpoly.edu/~dekhtyar/365-Spring2017/index.html
|
database/student_1/student_1.sql
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CREATE TABLE "list" (
|
| 2 |
+
"LastName" TEXT,
|
| 3 |
+
"FirstName" TEXT,
|
| 4 |
+
"Grade" INTEGER,
|
| 5 |
+
"Classroom" INTEGER,
|
| 6 |
+
PRIMARY KEY(LastName, FirstName)
|
| 7 |
+
);
|
| 8 |
+
CREATE TABLE "teachers" (
|
| 9 |
+
"LastName" TEXT,
|
| 10 |
+
"FirstName" TEXT,
|
| 11 |
+
"Classroom" INTEGER,
|
| 12 |
+
PRIMARY KEY(LastName, FirstName)
|
| 13 |
+
);
|
database/student_transcripts_tracking/student_transcripts_tracking.sqlite
ADDED
|
Binary file (49.2 kB). View file
|
|
|
database/university_basketball/university_basketball.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
test_database/boat_1/Reserves.csv
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sid,bid,day
|
| 2 |
+
1,102,9/12
|
| 3 |
+
2,102,9/13
|
| 4 |
+
2,103,9/14
|
| 5 |
+
2,103,9/15
|
test_database/book_1/annotation.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label_id": null,
|
| 3 |
+
"data": [
|
| 4 |
+
{
|
| 5 |
+
"nl": "List of books, the publication year of each of them and their authors, ordered by publication year\n",
|
| 6 |
+
"id": 0,
|
| 7 |
+
"sql": "SELECT TITLE, A\u00d1O \"YEAR\", NAME \"Author name\"\nFROM BOOK NATURAL JOIN AUTHOR_BOOK, AUTHOR\nWHERE AUTHOR_BOOK.AUTHOR=AUTHOR.IDAUTHOR\nORDER BY A\u00d1O;\n"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"nl": "List of books that were published before 01-01-2000.\n",
|
| 11 |
+
"id": 1,
|
| 12 |
+
"sql": "SELECT TITLE, A\u00d1O\nFROM BOOK\nWHERE A\u00d1O<'2000';\n"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"nl": "List of clients that have bought at least one book. \n",
|
| 16 |
+
"id": 2,
|
| 17 |
+
"sql": "SELECT DISTINCT IDCLIENT, NAME\nFROM CLIENT NATURAL JOIN ORDERS;\nselect distinct client.name, Client.IdClient\nfrom Client, Orders where\nClient.IdClient=Orders.IdClient;\n"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"nl": "List of clients that bought the book whose ISBN= 4554672899910.\n",
|
| 21 |
+
"id": 3,
|
| 22 |
+
"sql": "SELECT IDCLIENT, NAME\nFROM CLIENT NATURAL JOIN ORDERS NATURAL JOIN BOOKS_ORDER\nWHERE ISBN='4554672899910';\n"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"nl": "List of clients whose name contains \u2018Jo\u2019 and the books that they have bought. \n",
|
| 26 |
+
"id": 4,
|
| 27 |
+
"sql": "SELECT IDCLIENT, NAME, TITLE\nFROM CLIENT NATURAL JOIN ORDERS NATURAL JOIN BOOKS_ORDER NATURAL JOIN BOOK\nWHERE NAME LIKE '%Jo%';\n"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"nl": "List of clients that have bought at least a book whose price is greater than 10.\n",
|
| 31 |
+
"id": 5,
|
| 32 |
+
"sql": "SELECT DISTINCT IDCLIENT, NAME\nFROM CLIENT NATURAL JOIN ORDERS NATURAL JOIN BOOKS_ORDER NATURAL JOIN BOOK\nWHERE BOOK.SALEPRICE>10;\n"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"nl": "List of clients that have placed more than one order in the same date. \n",
|
| 36 |
+
"id": 6,
|
| 37 |
+
"sql": "SELECT IDCLIENT, NAME\nFROM CLIENT\nWHERE IDCLIENT=(\n SELECT IDCLIENT\n FROM ORDERS\n GROUP BY(IDCLIENT,DATEORDER)\n HAVING COUNT(DATEORDER)>1\n);\n"
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"nl": "List of clients and dates in which they have placed orders that have not been sent yet. \n",
|
| 41 |
+
"id": 7,
|
| 42 |
+
"sql": "SELECT IDCLIENT, NAME, DATEORDER\nFROM CLIENT NATURAL JOIN ORDERS\nWHERE DATEEXPED IS NULL;\n"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"nl": "List of clients that have not bought books whose price is greater than 10.\n",
|
| 46 |
+
"id": 8,
|
| 47 |
+
"sql": "SELECT DISTINCT IDCLIENT, NAME\nFROM CLIENT\nWHERE IDCLIENT NOT IN (\n SELECT IDCLIENT\n FROM ORDERS NATURAL JOIN BOOKS_ORDER NATURAL JOIN BOOK\n WHERE SALEPRICE < 10\n);\n"
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"nl": "List of books whose sale price is greater than 30\u20ac or that were published before 2000. \n",
|
| 51 |
+
"id": 9,
|
| 52 |
+
"sql": "SELECT TITLE, A\u00d1O, SALEPRICE\nFROM BOOK\nWHERE A\u00d1O<'2000' OR SALEPRICE>30;\n"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"nl": "List of books and amount of copies of each of them that have been sold. \n",
|
| 56 |
+
"id": 10,
|
| 57 |
+
"sql": "SELECT TITLE, ISBN, SUM(AMOUNT)\nFROM BOOKS_ORDER NATURAL JOIN BOOK\nGROUP BY TITLE, ISBN\nORDER BY SUM(AMOUNT) DESC;\n"
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"nl": "List of clients and the total amount that they have spent in the bookstore. \n",
|
| 61 |
+
"id": 11,
|
| 62 |
+
"sql": "SELECT IDCLIENT, NAME, SUM(AMOUNT*SALEPRICE) \"Total\"\nFROM CLIENT NATURAL JOIN ORDERS NATURAL JOIN BOOKS_ORDER NATURAL JOIN BOOK\nGROUP BY IDCLIENT, NAME;\n"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"nl": "Profits obtained from sales of books. \n",
|
| 66 |
+
"id": 12,
|
| 67 |
+
"sql": "SELECT SUM(AMOUNT*(SALEPRICE-PURCHASEPRICE)) \"Total\"\nFROM BOOKS_ORDER NATURAL JOIN BOOK;\n"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"nl": "Orders whose total amount is greater than 100.\n",
|
| 71 |
+
"id": 13,
|
| 72 |
+
"sql": "SELECT IDORDER, SUM(AMOUNT*SALEPRICE) \"TOTAL\"\nFROM BOOKS_ORDER NATURAL JOIN BOOK\nGROUP BY IDORDER\nHAVING SUM(AMOUNT*SALEPRICE)>100\nORDER BY IDORDER;\n"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"nl": "Orders and the total amount of each of them that contains more than a book (title). \n",
|
| 76 |
+
"id": 14,
|
| 77 |
+
"sql": "SELECT IDORDER, SUM(AMOUNT*SALEPRICE) \"TOTAL\"\nFROM BOOKS_ORDER NATURAL JOIN BOOK\nGROUP BY IDORDER\nHAVING COUNT(TITLE)>1;\n"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"nl": "Orders and the total amount of each of them that contains more than 4 copies\n",
|
| 81 |
+
"id": 15,
|
| 82 |
+
"sql": "SELECT IDORDER, SUM(AMOUNT*SALEPRICE) \"Total\"\nFROM BOOKS_ORDER NATURAL JOIN BOOK \nWHERE AMOUNT>4\nGROUP BY IDORDER;\n"
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"nl": "List of the most expensive books. \n",
|
| 86 |
+
"id": 16,
|
| 87 |
+
"sql": "SELECT ISBN, TITLE, SALEPRICE\nFROM BOOK\nWHERE SALEPRICE IN (SELECT MAX(SALEPRICE) FROM BOOK);\n"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"nl": "List of books that have not been sold or that have been sold but the profit per copy is less than 5\n",
|
| 91 |
+
"id": 17,
|
| 92 |
+
"sql": "SELECT ISBN, TITLE\nFROM BOOK\nWHERE(SALEPRICE-PURCHASEPRICE)<5 OR ISBN NOT IN(\n SELECT DISTINCT ISBN FROM BOOKS_ORDER\n);\n"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"nl": "List of clients that have bought more than one copy of a book sometime",
|
| 96 |
+
"id": 18,
|
| 97 |
+
"sql": "SELECT NAME\nFROM CLIENT NATURAL JOIN ORDERS\nWHERE IDORDER IN (\n SELECT IDORDER\n FROM BOOKS_ORDER\n WHERE AMOUNT>1\n);"
|
| 98 |
+
}
|
| 99 |
+
],
|
| 100 |
+
"review_id": null
|
| 101 |
+
}
|
test_database/book_1/book_1.sqlite
ADDED
|
Binary file (53.2 kB). View file
|
|
|
test_database/book_1/schema_old.sql
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
create table Client
|
| 3 |
+
(IdClient CHAR(10) PRIMARY KEY,
|
| 4 |
+
Name VARCHAR(25) NOT NULL,
|
| 5 |
+
Address VARCHAR(60) NOT NULL,
|
| 6 |
+
NumCC CHAR(16) NOT NULL);
|
| 7 |
+
|
| 8 |
+
create table Orders
|
| 9 |
+
(IdOrder CHAR(10) PRIMARY KEY,
|
| 10 |
+
IdClient CHAR(10) NOT NULL REFERENCES Client on delete cascade,
|
| 11 |
+
DateOrder DATE,
|
| 12 |
+
DateExped DATE);
|
| 13 |
+
|
| 14 |
+
create table Author
|
| 15 |
+
( idAuthor NUMBER PRIMARY KEY,
|
| 16 |
+
Name VARCHAR(25));
|
| 17 |
+
|
| 18 |
+
create table Book
|
| 19 |
+
(ISBN CHAR(15) PRIMARY KEY,
|
| 20 |
+
Title VARCHAR(60) NOT NULL,
|
| 21 |
+
Author CHAR(4) NOT NULL,
|
| 22 |
+
PurchasePrice NUMBER(6,2) DEFAULT 0,
|
| 23 |
+
SalePrice NUMBER(6,2) DEFAULT 0);
|
| 24 |
+
|
| 25 |
+
create table Author_Book
|
| 26 |
+
(ISBN CHAR(15),
|
| 27 |
+
Author NUMBER,
|
| 28 |
+
CONSTRAINT al_PK PRIMARY KEY (ISBN, Author),
|
| 29 |
+
CONSTRAINT BookA_FK FOREIGN KEY (ISBN) REFERENCES Book on delete cascade,
|
| 30 |
+
CONSTRAINT Author_FK FOREIGN KEY (Author) REFERENCES Author);
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
create table Books_Order(
|
| 34 |
+
ISBN CHAR(15),
|
| 35 |
+
IdOrder CHAR(10),
|
| 36 |
+
amount NUMBER(3) CHECK (amount >0),
|
| 37 |
+
CONSTRAINT lp_PK PRIMARY KEY (ISBN, idOrder),
|
| 38 |
+
CONSTRAINT Book_FK FOREIGN KEY (ISBN) REFERENCES Book on delete cascade,
|
| 39 |
+
CONSTRAINT pedido_FK FOREIGN KEY (IdOrder) REFERENCES Orders on delete cascade);
|
| 40 |
+
|
| 41 |
+
insert into Client values ('0000001','James Smith', 'Picadilly 2','1234567890123456');
|
| 42 |
+
insert into Client values ('0000002','Laura Jones', 'Holland Park 13', '1234567756953456');
|
| 43 |
+
insert into Client values ('0000003','Peter Doe', 'High Street 42', '1237596390123456');
|
| 44 |
+
insert into Client values ('0000004','Rose Johnson', 'Notting Hill 46', '4896357890123456');
|
| 45 |
+
insert into Client values ('0000005','Joseph Clinton', 'Leicester Square 1', '1224569890123456');
|
| 46 |
+
insert into Client values ('0000006','Betty Fraser', 'Whitehall 32', '2444889890123456' );
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
insert into Orders values ('0000001P','0000001', DATE('01/12/2011'),DATE('03/12/2011'));
|
| 50 |
+
insert into Orders values ('0000002P','0000001', DATE('01/12/2011'),null);
|
| 51 |
+
insert into Orders values ('0000003P','0000002', DATE('02/12/2011'),DATE('03/12/2011'));
|
| 52 |
+
insert into Orders values ('0000004P','0000004', DATE('02/12/2011'),DATE('05/12/2011'));
|
| 53 |
+
insert into Orders values ('0000005P','0000005', DATE('03/12/2011'),DATE('03/12/2011'));
|
| 54 |
+
insert into Orders values ('0000006P','0000003', DATE('04/12/2011'),null);
|
| 55 |
+
|
| 56 |
+
insert into Author values (1,'Jane Austin');
|
| 57 |
+
insert into Author values (2,'George Orwell');
|
| 58 |
+
insert into Author values (3,'J.R.R Tolkien');
|
| 59 |
+
insert into Author values (4,'Antoine de Saint-Exupy');
|
| 60 |
+
insert into Author values (5,'Bram Stoker');
|
| 61 |
+
insert into Author values (6,'Plato');
|
| 62 |
+
insert into Author values (7,'Vladimir Nabokov');
|
| 63 |
+
|
| 64 |
+
insert into Book values ('8233771378567', 'Pride and Prejudice', '2008', 9.45, 13.45);
|
| 65 |
+
insert into Book values ('1235271378662', '1984', '2009', 12.50, 19.25);
|
| 66 |
+
insert into Book values ('4554672899910', 'The Hobbit', '2002', 19.00, 33.15);
|
| 67 |
+
insert into Book values ('5463467723747', 'The Little Prince', '2000', 49.00, 73.45);
|
| 68 |
+
insert into Book values ('0853477468299', 'Dracula', '2011', 9.45, 13.45);
|
| 69 |
+
insert into Book values ('1243415243666', 'The Republic', '1997', 10.45, 15.75);
|
| 70 |
+
insert into Book values ('0482174555366', 'Lolita', '1998', 4.00, 9.45);
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
insert into Author_Book values ('8233771378567',1);
|
| 74 |
+
insert into Author_Book values ('1235271378662',2);
|
| 75 |
+
insert into Author_Book values ('4554672899910',3);
|
| 76 |
+
insert into Author_Book values ('5463467723747',4);
|
| 77 |
+
insert into Author_Book values ('0853477468299',5);
|
| 78 |
+
insert into Author_Book values ('1243415243666',6);
|
| 79 |
+
insert into Author_Book values ('0482174555366',7);
|
| 80 |
+
|
| 81 |
+
insert into Books_Order values ('8233771378567','0000001P', 1);
|
| 82 |
+
insert into Books_Order values ('5463467723747','0000001P', 2);
|
| 83 |
+
insert into Books_Order values ('0482174555366','0000002P', 1);
|
| 84 |
+
insert into Books_Order values ('4554672899910','0000003P', 1);
|
| 85 |
+
insert into Books_Order values ('8233771378567','0000003P', 1);
|
| 86 |
+
insert into Books_Order values ('1243415243666','0000003P', 1);
|
| 87 |
+
insert into Books_Order values ('8233771378567','0000004P', 1);
|
| 88 |
+
insert into Books_Order values ('4554672899910','0000005P', 1);
|
| 89 |
+
insert into Books_Order values ('1243415243666','0000005P', 1);
|
| 90 |
+
insert into Books_Order values ('5463467723747','0000005P', 3);
|
| 91 |
+
insert into Books_Order values ('8233771378567','0000006P', 5);
|
test_database/browser_web/browser_web.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
test_database/car_1/data_csv/cars-data.csv
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Id,MPG,Cylinders,Edispl,Horsepower,Weight,Accelerate,Year
|
| 2 |
+
1,18,8,307,130,3504,12,1970
|
| 3 |
+
2,15,8,350,165,3693,11.5,1970
|
| 4 |
+
3,18,8,318,150,3436,11,1970
|
| 5 |
+
4,16,8,304,150,3433,12,1970
|
| 6 |
+
5,17,8,302,140,3449,10.5,1970
|
| 7 |
+
6,15,8,429,198,4341,10,1970
|
| 8 |
+
7,14,8,454,220,4354,9,1970
|
| 9 |
+
8,14,8,440,215,4312,8.5,1970
|
| 10 |
+
9,14,8,455,225,4425,10,1970
|
| 11 |
+
10,15,8,390,190,3850,8.5,1970
|
| 12 |
+
11,null,4,133,115,3090,17.5,1970
|
| 13 |
+
12,null,8,350,165,4142,11.5,1970
|
| 14 |
+
13,null,8,351,153,4034,11,1970
|
| 15 |
+
14,null,8,383,175,4166,10.5,1970
|
| 16 |
+
15,null,8,360,175,3850,11,1970
|
| 17 |
+
16,15,8,383,170,3563,10,1970
|
| 18 |
+
17,14,8,340,160,3609,8,1970
|
| 19 |
+
18,null,8,302,140,3353,8,1970
|
| 20 |
+
19,15,8,400,150,3761,9.5,1970
|
| 21 |
+
20,14,8,455,225,3086,10,1970
|
| 22 |
+
21,24,4,113,95,2372,15,1970
|
| 23 |
+
22,22,6,198,95,2833,15.5,1970
|
| 24 |
+
23,18,6,199,97,2774,15.5,1970
|
| 25 |
+
24,21,6,200,85,2587,16,1970
|
| 26 |
+
25,27,4,97,88,2130,14.5,1970
|
| 27 |
+
26,26,4,97,46,1835,20.5,1970
|
| 28 |
+
27,25,4,110,87,2672,17.5,1970
|
| 29 |
+
28,24,4,107,90,2430,14.5,1970
|
| 30 |
+
29,25,4,104,95,2375,17.5,1970
|
| 31 |
+
30,26,4,121,113,2234,12.5,1970
|
| 32 |
+
31,21,6,199,90,2648,15,1970
|
| 33 |
+
32,10,8,360,215,4615,14,1970
|
| 34 |
+
33,10,8,307,200,4376,15,1970
|
| 35 |
+
34,11,8,318,210,4382,13.5,1970
|
| 36 |
+
35,9,8,304,193,4732,18.5,1970
|
| 37 |
+
36,27,4,97,88,2130,14.5,1971
|
| 38 |
+
37,28,4,140,90,2264,15.5,1971
|
| 39 |
+
38,25,4,113,95,2228,14,1971
|
| 40 |
+
39,25,4,98,null,2046,19,1971
|
| 41 |
+
40,null,4,97,48,1978,20,1971
|
| 42 |
+
41,19,6,232,100,2634,13,1971
|
| 43 |
+
42,16,6,225,105,3439,15.5,1971
|
| 44 |
+
43,17,6,250,100,3329,15.5,1971
|
| 45 |
+
44,19,6,250,88,3302,15.5,1971
|
| 46 |
+
45,18,6,232,100,3288,15.5,1971
|
| 47 |
+
46,14,8,350,165,4209,12,1971
|
| 48 |
+
47,14,8,400,175,4464,11.5,1971
|
| 49 |
+
48,14,8,351,153,4154,13.5,1971
|
| 50 |
+
49,14,8,318,150,4096,13,1971
|
| 51 |
+
50,12,8,383,180,4955,11.5,1971
|
| 52 |
+
51,13,8,400,170,4746,12,1971
|
| 53 |
+
52,13,8,400,175,5140,12,1971
|
| 54 |
+
53,18,6,258,110,2962,13.5,1971
|
| 55 |
+
54,22,4,140,72,2408,19,1971
|
| 56 |
+
55,19,6,250,100,3282,15,1971
|
| 57 |
+
56,18,6,250,88,3139,14.5,1971
|
| 58 |
+
57,23,4,122,86,2220,14,1971
|
| 59 |
+
58,28,4,116,90,2123,14,1971
|
| 60 |
+
59,30,4,79,70,2074,19.5,1971
|
| 61 |
+
60,30,4,88,76,2065,14.5,1971
|
| 62 |
+
61,31,4,71,65,1773,19,1971
|
| 63 |
+
62,35,4,72,69,1613,18,1971
|
| 64 |
+
63,27,4,97,60,1834,19,1971
|
| 65 |
+
64,26,4,91,70,1955,20.5,1971
|
| 66 |
+
65,24,4,113,95,2278,15.5,1972
|
| 67 |
+
66,25,4,97.5,80,2126,17,1972
|
| 68 |
+
67,23,4,97,54,2254,23.5,1972
|
| 69 |
+
68,20,4,140,90,2408,19.5,1972
|
| 70 |
+
69,21,4,122,86,2226,16.5,1972
|
| 71 |
+
70,13,8,350,165,4274,12,1972
|
| 72 |
+
71,14,8,400,175,4385,12,1972
|
| 73 |
+
72,15,8,318,150,4135,13.5,1972
|
| 74 |
+
73,14,8,351,153,4129,13,1972
|
| 75 |
+
74,17,8,304,150,3672,11.5,1972
|
| 76 |
+
75,11,8,429,208,4633,11,1972
|
| 77 |
+
76,13,8,350,155,4502,13.5,1972
|
| 78 |
+
77,12,8,350,160,4456,13.5,1972
|
| 79 |
+
78,13,8,400,190,4422,12.5,1972
|
| 80 |
+
79,19,3,70,97,2330,13.5,1972
|
| 81 |
+
80,15,8,304,150,3892,12.5,1972
|
| 82 |
+
81,13,8,307,130,4098,14,1972
|
| 83 |
+
82,13,8,302,140,4294,16,1972
|
| 84 |
+
83,14,8,318,150,4077,14,1972
|
| 85 |
+
84,18,4,121,112,2933,14.5,1972
|
| 86 |
+
85,22,4,121,76,2511,18,1972
|
| 87 |
+
86,21,4,120,87,2979,19.5,1972
|
| 88 |
+
87,26,4,96,69,2189,18,1972
|
| 89 |
+
88,22,4,122,86,2395,16,1972
|
| 90 |
+
89,28,4,97,92,2288,17,1972
|
| 91 |
+
90,23,4,120,97,2506,14.5,1972
|
| 92 |
+
91,28,4,98,80,2164,15,1972
|
| 93 |
+
92,27,4,97,88,2100,16.5,1972
|
| 94 |
+
93,13,8,350,175,4100,13,1973
|
| 95 |
+
94,14,8,304,150,3672,11.5,1973
|
| 96 |
+
95,13,8,350,145,3988,13,1973
|
| 97 |
+
96,14,8,302,137,4042,14.5,1973
|
| 98 |
+
97,15,8,318,150,3777,12.5,1973
|
| 99 |
+
98,12,8,429,198,4952,11.5,1973
|
| 100 |
+
99,13,8,400,150,4464,12,1973
|
| 101 |
+
100,13,8,351,158,4363,13,1973
|
| 102 |
+
101,14,8,318,150,4237,14.5,1973
|
| 103 |
+
102,13,8,440,215,4735,11,1973
|
| 104 |
+
103,12,8,455,225,4951,11,1973
|
| 105 |
+
104,13,8,360,175,3821,11,1973
|
| 106 |
+
105,18,6,225,105,3121,16.5,1973
|
| 107 |
+
106,16,6,250,100,3278,18,1973
|
| 108 |
+
107,18,6,232,100,2945,16,1973
|
| 109 |
+
108,18,6,250,88,3021,16.5,1973
|
| 110 |
+
109,23,6,198,95,2904,16,1973
|
| 111 |
+
110,26,4,97,46,1950,21,1973
|
| 112 |
+
111,11,8,400,150,4997,14,1973
|
| 113 |
+
112,12,8,400,167,4906,12.5,1973
|
| 114 |
+
113,13,8,360,170,4654,13,1973
|
| 115 |
+
114,12,8,350,180,4499,12.5,1973
|
| 116 |
+
115,18,6,232,100,2789,15,1973
|
| 117 |
+
116,20,4,97,88,2279,19,1973
|
| 118 |
+
117,21,4,140,72,2401,19.5,1973
|
| 119 |
+
118,22,4,108,94,2379,16.5,1973
|
| 120 |
+
119,18,3,70,90,2124,13.5,1973
|
| 121 |
+
120,19,4,122,85,2310,18.5,1973
|
| 122 |
+
121,21,6,155,107,2472,14,1973
|
| 123 |
+
122,26,4,98,90,2265,15.5,1973
|
| 124 |
+
123,15,8,350,145,4082,13,1973
|
| 125 |
+
124,16,8,400,230,4278,9.5,1973
|
| 126 |
+
125,29,4,68,49,1867,19.5,1973
|
| 127 |
+
126,24,4,116,75,2158,15.5,1973
|
| 128 |
+
127,20,4,114,91,2582,14,1973
|
| 129 |
+
128,19,4,121,112,2868,15.5,1973
|
| 130 |
+
129,15,8,318,150,3399,11,1973
|
| 131 |
+
130,24,4,121,110,2660,14,1973
|
| 132 |
+
131,20,6,156,122,2807,13.5,1973
|
| 133 |
+
132,11,8,350,180,3664,11,1973
|
| 134 |
+
133,20,6,198,95,3102,16.5,1974
|
| 135 |
+
134,21,6,200,null,2875,17,1974
|
| 136 |
+
135,19,6,232,100,2901,16,1974
|
| 137 |
+
136,15,6,250,100,3336,17,1974
|
| 138 |
+
137,31,4,79,67,1950,19,1974
|
| 139 |
+
138,26,4,122,80,2451,16.5,1974
|
| 140 |
+
139,32,4,71,65,1836,21,1974
|
| 141 |
+
140,25,4,140,75,2542,17,1974
|
| 142 |
+
141,16,6,250,100,3781,17,1974
|
| 143 |
+
142,16,6,258,110,3632,18,1974
|
| 144 |
+
143,18,6,225,105,3613,16.5,1974
|
| 145 |
+
144,16,8,302,140,4141,14,1974
|
| 146 |
+
145,13,8,350,150,4699,14.5,1974
|
| 147 |
+
146,14,8,318,150,4457,13.5,1974
|
| 148 |
+
147,14,8,302,140,4638,16,1974
|
| 149 |
+
148,14,8,304,150,4257,15.5,1974
|
| 150 |
+
149,29,4,98,83,2219,16.5,1974
|
| 151 |
+
150,26,4,79,67,1963,15.5,1974
|
| 152 |
+
151,26,4,97,78,2300,14.5,1974
|
| 153 |
+
152,31,4,76,52,1649,16.5,1974
|
| 154 |
+
153,32,4,83,61,2003,19,1974
|
| 155 |
+
154,28,4,90,75,2125,14.5,1974
|
| 156 |
+
155,24,4,90,75,2108,15.5,1974
|
| 157 |
+
156,26,4,116,75,2246,14,1974
|
| 158 |
+
157,24,4,120,97,2489,15,1974
|
| 159 |
+
158,26,4,108,93,2391,15.5,1974
|
| 160 |
+
159,31,4,79,67,2000,16,1974
|
| 161 |
+
160,19,6,225,95,3264,16,1975
|
| 162 |
+
161,18,6,250,105,3459,16,1975
|
| 163 |
+
162,15,6,250,72,3432,21,1975
|
| 164 |
+
163,15,6,250,72,3158,19.5,1975
|
| 165 |
+
164,16,8,400,170,4668,11.5,1975
|
| 166 |
+
165,15,8,350,145,4440,14,1975
|
| 167 |
+
166,16,8,318,150,4498,14.5,1975
|
| 168 |
+
167,14,8,351,148,4657,13.5,1975
|
| 169 |
+
168,17,6,231,110,3907,21,1975
|
| 170 |
+
169,16,6,250,105,3897,18.5,1975
|
| 171 |
+
170,15,6,258,110,3730,19,1975
|
| 172 |
+
171,18,6,225,95,3785,19,1975
|
| 173 |
+
172,21,6,231,110,3039,15,1975
|
| 174 |
+
173,20,8,262,110,3221,13.5,1975
|
| 175 |
+
174,13,8,302,129,3169,12,1975
|
| 176 |
+
175,29,4,97,75,2171,16,1975
|
| 177 |
+
176,23,4,140,83,2639,17,1975
|
| 178 |
+
177,20,6,232,100,2914,16,1975
|
| 179 |
+
178,23,4,140,78,2592,18.5,1975
|
| 180 |
+
179,24,4,134,96,2702,13.5,1975
|
| 181 |
+
180,25,4,90,71,2223,16.5,1975
|
| 182 |
+
181,24,4,119,97,2545,17,1975
|
| 183 |
+
182,18,6,171,97,2984,14.5,1975
|
| 184 |
+
183,29,4,90,70,1937,14,1975
|
| 185 |
+
184,19,6,232,90,3211,17,1975
|
| 186 |
+
185,23,4,115,95,2694,15,1975
|
| 187 |
+
186,23,4,120,88,2957,17,1975
|
| 188 |
+
187,22,4,121,98,2945,14.5,1975
|
| 189 |
+
188,25,4,121,115,2671,13.5,1975
|
| 190 |
+
189,33,4,91,53,1795,17.5,1975
|
| 191 |
+
190,28,4,107,86,2464,15.5,1976
|
| 192 |
+
191,25,4,116,81,2220,16.9,1976
|
| 193 |
+
192,25,4,140,92,2572,14.9,1976
|
| 194 |
+
193,26,4,98,79,2255,17.7,1976
|
| 195 |
+
194,27,4,101,83,2202,15.3,1976
|
| 196 |
+
195,17.5,8,305,140,4215,13,1976
|
| 197 |
+
196,16,8,318,150,4190,13,1976
|
| 198 |
+
197,15.5,8,304,120,3962,13.9,1976
|
| 199 |
+
198,14.5,8,351,152,4215,12.8,1976
|
| 200 |
+
199,22,6,225,100,3233,15.4,1976
|
| 201 |
+
200,22,6,250,105,3353,14.5,1976
|
| 202 |
+
201,24,6,200,81,3012,17.6,1976
|
| 203 |
+
202,22.5,6,232,90,3085,17.6,1976
|
| 204 |
+
203,29,4,85,52,2035,22.2,1976
|
| 205 |
+
204,24.5,4,98,60,2164,22.1,1976
|
| 206 |
+
205,29,4,90,70,1937,14.2,1976
|
| 207 |
+
206,33,4,91,53,1795,17.4,1976
|
| 208 |
+
207,20,6,225,100,3651,17.7,1976
|
| 209 |
+
208,18,6,250,78,3574,21,1976
|
| 210 |
+
209,18.5,6,250,110,3645,16.2,1976
|
| 211 |
+
210,17.5,6,258,95,3193,17.8,1976
|
| 212 |
+
211,29.5,4,97,71,1825,12.2,1976
|
| 213 |
+
212,32,4,85,70,1990,17,1976
|
| 214 |
+
213,28,4,97,75,2155,16.4,1976
|
| 215 |
+
214,26.5,4,140,72,2565,13.6,1976
|
| 216 |
+
215,20,4,130,102,3150,15.7,1976
|
| 217 |
+
216,13,8,318,150,3940,13.2,1976
|
| 218 |
+
217,19,4,120,88,3270,21.9,1976
|
| 219 |
+
218,19,6,156,108,2930,15.5,1976
|
| 220 |
+
219,16.5,6,168,120,3820,16.7,1976
|
| 221 |
+
220,16.5,8,350,180,4380,12.1,1976
|
| 222 |
+
221,13,8,350,145,4055,12,1976
|
| 223 |
+
222,13,8,302,130,3870,15,1976
|
| 224 |
+
223,13,8,318,150,3755,14,1976
|
| 225 |
+
224,31.5,4,98,68,2045,18.5,1977
|
| 226 |
+
225,30,4,111,80,2155,14.8,1977
|
| 227 |
+
226,36,4,79,58,1825,18.6,1977
|
| 228 |
+
227,25.5,4,122,96,2300,15.5,1977
|
| 229 |
+
228,33.5,4,85,70,1945,16.8,1977
|
| 230 |
+
229,17.5,8,305,145,3880,12.5,1977
|
| 231 |
+
230,17,8,260,110,4060,19,1977
|
| 232 |
+
231,15.5,8,318,145,4140,13.7,1977
|
| 233 |
+
232,15,8,302,130,4295,14.9,1977
|
| 234 |
+
233,17.5,6,250,110,3520,16.4,1977
|
| 235 |
+
234,20.5,6,231,105,3425,16.9,1977
|
| 236 |
+
235,19,6,225,100,3630,17.7,1977
|
| 237 |
+
236,18.5,6,250,98,3525,19,1977
|
| 238 |
+
237,16,8,400,180,4220,11.1,1977
|
| 239 |
+
238,15.5,8,350,170,4165,11.4,1977
|
| 240 |
+
239,15.5,8,400,190,4325,12.2,1977
|
| 241 |
+
240,16,8,351,149,4335,14.5,1977
|
| 242 |
+
241,29,4,97,78,1940,14.5,1977
|
| 243 |
+
242,24.5,4,151,88,2740,16,1977
|
| 244 |
+
243,26,4,97,75,2265,18.2,1977
|
| 245 |
+
244,25.5,4,140,89,2755,15.8,1977
|
| 246 |
+
245,30.5,4,98,63,2051,17,1977
|
| 247 |
+
246,33.5,4,98,83,2075,15.9,1977
|
| 248 |
+
247,30,4,97,67,1985,16.4,1977
|
| 249 |
+
248,30.5,4,97,78,2190,14.1,1977
|
| 250 |
+
249,22,6,146,97,2815,14.5,1977
|
| 251 |
+
250,21.5,4,121,110,2600,12.8,1977
|
| 252 |
+
251,21.5,3,80,110,2720,13.5,1977
|
| 253 |
+
252,43.1,4,90,48,1985,21.5,1978
|
| 254 |
+
253,36.1,4,98,66,1800,14.4,1978
|
| 255 |
+
254,32.8,4,78,52,1985,19.4,1978
|
| 256 |
+
255,39.4,4,85,70,2070,18.6,1978
|
| 257 |
+
256,36.1,4,91,60,1800,16.4,1978
|
| 258 |
+
257,19.9,8,260,110,3365,15.5,1978
|
| 259 |
+
258,19.4,8,318,140,3735,13.2,1978
|
| 260 |
+
259,20.2,8,302,139,3570,12.8,1978
|
| 261 |
+
260,19.2,6,231,105,3535,19.2,1978
|
| 262 |
+
261,20.5,6,200,95,3155,18.2,1978
|
| 263 |
+
262,20.2,6,200,85,2965,15.8,1978
|
| 264 |
+
263,25.1,4,140,88,2720,15.4,1978
|
| 265 |
+
264,20.5,6,225,100,3430,17.2,1978
|
| 266 |
+
265,19.4,6,232,90,3210,17.2,1978
|
| 267 |
+
266,20.6,6,231,105,3380,15.8,1978
|
| 268 |
+
267,20.8,6,200,85,3070,16.7,1978
|
| 269 |
+
268,18.6,6,225,110,3620,18.7,1978
|
| 270 |
+
269,18.1,6,258,120,3410,15.1,1978
|
| 271 |
+
270,19.2,8,305,145,3425,13.2,1978
|
| 272 |
+
271,17.7,6,231,165,3445,13.4,1978
|
| 273 |
+
272,18.1,8,302,139,3205,11.2,1978
|
| 274 |
+
273,17.5,8,318,140,4080,13.7,1978
|
| 275 |
+
274,30,4,98,68,2155,16.5,1978
|
| 276 |
+
275,27.5,4,134,95,2560,14.2,1978
|
| 277 |
+
276,27.2,4,119,97,2300,14.7,1978
|
| 278 |
+
277,30.9,4,105,75,2230,14.5,1978
|
| 279 |
+
278,21.1,4,134,95,2515,14.8,1978
|
| 280 |
+
279,23.2,4,156,105,2745,16.7,1978
|
| 281 |
+
280,23.8,4,151,85,2855,17.6,1978
|
| 282 |
+
281,23.9,4,119,97,2405,14.9,1978
|
| 283 |
+
282,20.3,5,131,103,2830,15.9,1978
|
| 284 |
+
283,17,6,163,125,3140,13.6,1978
|
| 285 |
+
284,21.6,4,121,115,2795,15.7,1978
|
| 286 |
+
285,16.2,6,163,133,3410,15.8,1978
|
| 287 |
+
286,31.5,4,89,71,1990,14.9,1978
|
| 288 |
+
287,29.5,4,98,68,2135,16.6,1978
|
| 289 |
+
288,21.5,6,231,115,3245,15.4,1979
|
| 290 |
+
289,19.8,6,200,85,2990,18.2,1979
|
| 291 |
+
290,22.3,4,140,88,2890,17.3,1979
|
| 292 |
+
291,20.2,6,232,90,3265,18.2,1979
|
| 293 |
+
292,20.6,6,225,110,3360,16.6,1979
|
| 294 |
+
293,17,8,305,130,3840,15.4,1979
|
| 295 |
+
294,17.6,8,302,129,3725,13.4,1979
|
| 296 |
+
295,16.5,8,351,138,3955,13.2,1979
|
| 297 |
+
296,18.2,8,318,135,3830,15.2,1979
|
| 298 |
+
297,16.9,8,350,155,4360,14.9,1979
|
| 299 |
+
298,15.5,8,351,142,4054,14.3,1979
|
| 300 |
+
299,19.2,8,267,125,3605,15,1979
|
| 301 |
+
300,18.5,8,360,150,3940,13,1979
|
| 302 |
+
301,31.9,4,89,71,1925,14,1979
|
| 303 |
+
302,34.1,4,86,65,1975,15.2,1979
|
| 304 |
+
303,35.7,4,98,80,1915,14.4,1979
|
| 305 |
+
304,27.4,4,121,80,2670,15,1979
|
| 306 |
+
305,25.4,5,183,77,3530,20.1,1979
|
| 307 |
+
306,23,8,350,125,3900,17.4,1979
|
| 308 |
+
307,27.2,4,141,71,3190,24.8,1979
|
| 309 |
+
308,23.9,8,260,90,3420,22.2,1979
|
| 310 |
+
309,34.2,4,105,70,2200,13.2,1979
|
| 311 |
+
310,34.5,4,105,70,2150,14.9,1979
|
| 312 |
+
311,31.8,4,85,65,2020,19.2,1979
|
| 313 |
+
312,37.3,4,91,69,2130,14.7,1979
|
| 314 |
+
313,28.4,4,151,90,2670,16,1979
|
| 315 |
+
314,28.8,6,173,115,2595,11.3,1979
|
| 316 |
+
315,26.8,6,173,115,2700,12.9,1979
|
| 317 |
+
316,33.5,4,151,90,2556,13.2,1979
|
| 318 |
+
317,41.5,4,98,76,2144,14.7,1980
|
| 319 |
+
318,38.1,4,89,60,1968,18.8,1980
|
| 320 |
+
319,32.1,4,98,70,2120,15.5,1980
|
| 321 |
+
320,37.2,4,86,65,2019,16.4,1980
|
| 322 |
+
321,28,4,151,90,2678,16.5,1980
|
| 323 |
+
322,26.4,4,140,88,2870,18.1,1980
|
| 324 |
+
323,24.3,4,151,90,3003,20.1,1980
|
| 325 |
+
324,19.1,6,225,90,3381,18.7,1980
|
| 326 |
+
325,34.3,4,97,78,2188,15.8,1980
|
| 327 |
+
326,29.8,4,134,90,2711,15.5,1980
|
| 328 |
+
327,31.3,4,120,75,2542,17.5,1980
|
| 329 |
+
328,37,4,119,92,2434,15,1980
|
| 330 |
+
329,32.2,4,108,75,2265,15.2,1980
|
| 331 |
+
330,46.6,4,86,65,2110,17.9,1980
|
| 332 |
+
331,27.9,4,156,105,2800,14.4,1980
|
| 333 |
+
332,40.8,4,85,65,2110,19.2,1980
|
| 334 |
+
333,44.3,4,90,48,2085,21.7,1980
|
| 335 |
+
334,43.4,4,90,48,2335,23.7,1980
|
| 336 |
+
335,36.4,5,121,67,2950,19.9,1980
|
| 337 |
+
336,30,4,146,67,3250,21.8,1980
|
| 338 |
+
337,44.6,4,91,67,1850,13.8,1980
|
| 339 |
+
338,40.9,4,85,null,1835,17.3,1980
|
| 340 |
+
339,33.8,4,97,67,2145,18,1980
|
| 341 |
+
340,29.8,4,89,62,1845,15.3,1980
|
| 342 |
+
341,32.7,6,168,132,2910,11.4,1980
|
| 343 |
+
342,23.7,3,70,100,2420,12.5,1980
|
| 344 |
+
343,35,4,122,88,2500,15.1,1980
|
| 345 |
+
344,23.6,4,140,null,2905,14.3,1980
|
| 346 |
+
345,32.4,4,107,72,2290,17,1980
|
| 347 |
+
346,27.2,4,135,84,2490,15.7,1981
|
| 348 |
+
347,26.6,4,151,84,2635,16.4,1981
|
| 349 |
+
348,25.8,4,156,92,2620,14.4,1981
|
| 350 |
+
349,23.5,6,173,110,2725,12.6,1981
|
| 351 |
+
350,30,4,135,84,2385,12.9,1981
|
| 352 |
+
351,39.1,4,79,58,1755,16.9,1981
|
| 353 |
+
352,39,4,86,64,1875,16.4,1981
|
| 354 |
+
353,35.1,4,81,60,1760,16.1,1981
|
| 355 |
+
354,32.3,4,97,67,2065,17.8,1981
|
| 356 |
+
355,37,4,85,65,1975,19.4,1981
|
| 357 |
+
356,37.7,4,89,62,2050,17.3,1981
|
| 358 |
+
357,34.1,4,91,68,1985,16,1981
|
| 359 |
+
358,34.7,4,105,63,2215,14.9,1981
|
| 360 |
+
359,34.4,4,98,65,2045,16.2,1981
|
| 361 |
+
360,29.9,4,98,65,2380,20.7,1981
|
| 362 |
+
361,33,4,105,74,2190,14.2,1981
|
| 363 |
+
362,34.5,4,100,null,2320,15.8,1981
|
| 364 |
+
363,33.7,4,107,75,2210,14.4,1981
|
| 365 |
+
364,32.4,4,108,75,2350,16.8,1981
|
| 366 |
+
365,32.9,4,119,100,2615,14.8,1981
|
| 367 |
+
366,31.6,4,120,74,2635,18.3,1981
|
| 368 |
+
367,28.1,4,141,80,3230,20.4,1981
|
| 369 |
+
368,null,4,121,110,2800,15.4,1981
|
| 370 |
+
369,30.7,6,145,76,3160,19.6,1981
|
| 371 |
+
370,25.4,6,168,116,2900,12.6,1981
|
| 372 |
+
371,24.2,6,146,120,2930,13.8,1981
|
| 373 |
+
372,22.4,6,231,110,3415,15.8,1981
|
| 374 |
+
373,26.6,8,350,105,3725,19,1981
|
| 375 |
+
374,20.2,6,200,88,3060,17.1,1981
|
| 376 |
+
375,17.6,6,225,85,3465,16.6,1981
|
| 377 |
+
376,28,4,112,88,2605,19.6,1982
|
| 378 |
+
377,27,4,112,88,2640,18.6,1982
|
| 379 |
+
378,34,4,112,88,2395,18,1982
|
| 380 |
+
379,31,4,112,85,2575,16.2,1982
|
| 381 |
+
380,29,4,135,84,2525,16,1982
|
| 382 |
+
381,27,4,151,90,2735,18,1982
|
| 383 |
+
382,24,4,140,92,2865,16.4,1982
|
| 384 |
+
383,23,4,151,null,3035,20.5,1982
|
| 385 |
+
384,36,4,105,74,1980,15.3,1982
|
| 386 |
+
385,37,4,91,68,2025,18.2,1982
|
| 387 |
+
386,31,4,91,68,1970,17.6,1982
|
| 388 |
+
387,38,4,105,63,2125,14.7,1982
|
| 389 |
+
388,36,4,98,70,2125,17.3,1982
|
| 390 |
+
389,36,4,120,88,2160,14.5,1982
|
| 391 |
+
390,36,4,107,75,2205,14.5,1982
|
| 392 |
+
391,34,4,108,70,2245,16.9,1982
|
| 393 |
+
392,38,4,91,67,1965,15,1982
|
| 394 |
+
393,32,4,91,67,1965,15.7,1982
|
| 395 |
+
394,38,4,91,67,1995,16.2,1982
|
| 396 |
+
395,25,6,181,110,2945,16.4,1982
|
| 397 |
+
396,38,6,262,85,3015,17,1982
|
| 398 |
+
397,26,4,156,92,2585,14.5,1982
|
| 399 |
+
398,22,6,232,112,2835,14.7,1982
|
| 400 |
+
399,32,4,144,96,2665,13.9,1982
|
| 401 |
+
400,36,4,135,84,2370,13,1982
|
| 402 |
+
401,27,4,151,90,2950,17.3,1982
|
| 403 |
+
402,27,4,140,86,2790,15.6,1982
|
| 404 |
+
403,44,4,97,52,2130,24.6,1982
|
| 405 |
+
404,32,4,135,84,2295,11.6,1982
|
| 406 |
+
405,28,4,120,79,2625,18.6,1982
|
| 407 |
+
406,31,4,119,82,2720,19.4,1982
|
test_database/car_1/data_csv/continents.csv
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ContId,Continent
|
| 2 |
+
1,'america'
|
| 3 |
+
2,'europe'
|
| 4 |
+
3,'asia'
|
| 5 |
+
4,'africa'
|
| 6 |
+
5,'australia'
|
test_database/car_1/data_csv/countries.csv
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CountryId,CountryName,Continent
|
| 2 |
+
1,'usa',1
|
| 3 |
+
2,'germany',2
|
| 4 |
+
3,'france',2
|
| 5 |
+
4,'japan',3
|
| 6 |
+
5,'italy',2
|
| 7 |
+
6,'sweden',2
|
| 8 |
+
7,'uk',2
|
| 9 |
+
8,'korea',3
|
| 10 |
+
9,'russia',2
|
| 11 |
+
10,'nigeria',4
|
| 12 |
+
11,'australia',5
|
| 13 |
+
12,'new zealand',5
|
| 14 |
+
13,'egypt',4
|
| 15 |
+
14,'mexico',1
|
| 16 |
+
15,'brazil',1
|
test_database/country_language/country_language.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
test_database/country_language/schema.sql
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "languages" (
|
| 4 |
+
"id" integer,
|
| 5 |
+
"name" text,
|
| 6 |
+
PRIMARY KEY ("id")
|
| 7 |
+
);
|
| 8 |
+
|
| 9 |
+
INSERT INTO "languages" VALUES ("1","Icelandic");
|
| 10 |
+
INSERT INTO "languages" VALUES ("2","Swedish");
|
| 11 |
+
INSERT INTO "languages" VALUES ("3","English");
|
| 12 |
+
INSERT INTO "languages" VALUES ("4","Danish");
|
| 13 |
+
INSERT INTO "languages" VALUES ("5","Finnish");
|
| 14 |
+
INSERT INTO "languages" VALUES ("6","German");
|
| 15 |
+
INSERT INTO "languages" VALUES ("7","French");
|
| 16 |
+
INSERT INTO "languages" VALUES ("8","Norwegian");
|
| 17 |
+
INSERT INTO "languages" VALUES ("9","Italian");
|
| 18 |
+
INSERT INTO "languages" VALUES ("10","Romansh");
|
| 19 |
+
|
| 20 |
+
CREATE TABLE "countries" (
|
| 21 |
+
"id" integer,
|
| 22 |
+
"name" text,
|
| 23 |
+
"overall_score" real,
|
| 24 |
+
"justice_score" real,
|
| 25 |
+
"health_score" real,
|
| 26 |
+
"education_score" real,
|
| 27 |
+
"economics_score" real,
|
| 28 |
+
"politics_score" real,
|
| 29 |
+
PRIMARY KEY ("id")
|
| 30 |
+
);
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
INSERT INTO "countries" VALUES ("1","Iceland","100.0","100.0","90.5","96.7","88.0","92.8");
|
| 36 |
+
INSERT INTO "countries" VALUES ("2","Sweden","99.2","90.8","94.8","95.5","90.3","93.1");
|
| 37 |
+
INSERT INTO "countries" VALUES ("3","Canada","96.6","100.0","92.7","92.0","91.0","66.9");
|
| 38 |
+
INSERT INTO "countries" VALUES ("4","Denmark","95.3","86.1","94.9","97.6","88.5","78.4");
|
| 39 |
+
INSERT INTO "countries" VALUES ("5","Finland","92.8","80.2","91.4","91.3","86.8","100.0");
|
| 40 |
+
INSERT INTO "countries" VALUES ("6","Switzerland","91.9","87.9","94.4","97.3","82.6","74.6");
|
| 41 |
+
INSERT INTO "countries" VALUES ("7","Norway","91.3","79.3","100.0","74.0","93.5","93.9");
|
| 42 |
+
INSERT INTO "countries" VALUES ("8","United States","89.8","82.9","92.8","97.3","83.9","68.6");
|
| 43 |
+
INSERT INTO "countries" VALUES ("9","Australia","88.2","80.7","93.3","93.9","85.3","65.1");
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
CREATE TABLE "official_languages" (
|
| 47 |
+
"language_id" integer,
|
| 48 |
+
"country_id" integer,
|
| 49 |
+
PRIMARY KEY ("language_id", "country_id"),
|
| 50 |
+
FOREIGN KEY ("language_id") REFERENCES "languages"("id"),
|
| 51 |
+
FOREIGN KEY ("country_id") REFERENCES "countries"("id")
|
| 52 |
+
);
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
INSERT INTO "official_languages" VALUES (1,1);
|
| 57 |
+
INSERT INTO "official_languages" VALUES (2,2);
|
| 58 |
+
INSERT INTO "official_languages" VALUES (3,3);
|
| 59 |
+
INSERT INTO "official_languages" VALUES (4,4);
|
| 60 |
+
INSERT INTO "official_languages" VALUES (5,5);
|
| 61 |
+
INSERT INTO "official_languages" VALUES (6,6);
|
| 62 |
+
INSERT INTO "official_languages" VALUES (7,6);
|
| 63 |
+
INSERT INTO "official_languages" VALUES (9,6);
|
| 64 |
+
INSERT INTO "official_languages" VALUES (10,6);
|
| 65 |
+
INSERT INTO "official_languages" VALUES (8,7);
|
| 66 |
+
INSERT INTO "official_languages" VALUES (3,8);
|
| 67 |
+
INSERT INTO "official_languages" VALUES (3,9);
|
| 68 |
+
|