Add files using upload-large-folder tool
Browse files- database/car_1/annotation.json +62 -0
- database/car_1/q.txt +27 -0
- database/college_2/link.txt +1 -0
- database/csu_1/schema.sql +54 -0
- database/customers_card_transactions/customers_card_transactions.sqlite +0 -0
- database/flight_2/data_csv/README.AIRLINES.txt +96 -0
- database/geo/geo.sqlite +0 -0
- database/hr_1/schema.sql +392 -0
- database/icfp_1/link.txt +1 -0
- database/loan_1/schema.sql +41 -0
- database/movie_1/movie_1.sqlite +0 -0
- database/movie_1/schema.sql +60 -0
- database/musical/schema.sql +42 -0
- database/performance_attendance/performance_attendance.sqlite +0 -0
- database/pets_1/schema.sql +68 -0
- database/railway/schema.sql +86 -0
- database/shop_membership/shop_membership.sqlite +0 -0
- database/wedding/wedding.sqlite +0 -0
- database/wta_1/wta_1.sql +110 -0
- database/yelp/yelp.sqlite +0 -0
database/car_1/annotation.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label_id": null,
|
| 3 |
+
"data": [
|
| 4 |
+
{
|
| 5 |
+
"nl": "Find all Reanults (\u2019renault\u2019) in the database. For each, report the name and the year.\n",
|
| 6 |
+
"id": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"nl": "Find all cars produced by Volvo between 1977 and 1981 (inclusive). Report the name of the car and the year it was produced.\n",
|
| 10 |
+
"id": 1
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"nl": "Report all Asian automakers. Output the full name of the automaker and the country of origin\n",
|
| 14 |
+
"id": 2
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"nl": "Find all non-four cylinder cars produced in 1980 that have a better fuel economy better than 20 MPG and that accelerate to 60 mph faster than in 15 seconds. Report the name of the car and the name of the automaker.\n",
|
| 18 |
+
"id": 3
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"nl": "For each saab released after 1978, compute the ratio between the weight of the car and its number of horsepowers. Report the full name of the car, the year it was produced and the ratio.\n",
|
| 22 |
+
"id": 4
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"nl": "Find the average, maximum and minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.\n",
|
| 26 |
+
"id": 5
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"nl": "Find how many different car manufacturers produced a vehicle heavier than 4000 lbs.\n",
|
| 30 |
+
"id": 6
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"nl": "Find the minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.\n",
|
| 34 |
+
"id": 7
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"nl": "For each year when US-manufactured cars averaged less than 100 horsepowers, report the highest and the lowest engine displacement number.\n",
|
| 38 |
+
"id": 8
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"nl": "For each year in which honda produced more than 2 models, report the best, the worst and the average gas milage of a toyota vehicle.\n",
|
| 42 |
+
"id": 9
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"nl": "Report all vehicles with the best gas mileage. For each vehicle, report its full name and the year of production.\n",
|
| 46 |
+
"id": 10
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"nl": "Among the vehicles with the gas mileage, report the one with the best acceleration. Report full name and the year of production.\n",
|
| 50 |
+
"id": 11
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"nl": "For each country report the automaker with the largest number of cars in the database. Report the name of the country.\n",
|
| 54 |
+
"id": 12
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"nl": "Find the difference in gas milage between the most fuel-efficient 8-cylinder model and the least fuel-efficient 4-cylinder model. Report just the number.\n",
|
| 58 |
+
"id": 13
|
| 59 |
+
}
|
| 60 |
+
],
|
| 61 |
+
"review_id": null
|
| 62 |
+
}
|
database/car_1/q.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Find all Reanults (’renault’) in the database. For each, report the name and the year.
|
| 2 |
+
|
| 3 |
+
Find all cars produced by Volvo between 1977 and 1981 (inclusive). Report the name of the car and the year it was produced.
|
| 4 |
+
|
| 5 |
+
Report all Asian automakers. Output the full name of the automaker and the country of origin
|
| 6 |
+
|
| 7 |
+
Find all non-four cylinder cars produced in 1980 that have a better fuel economy better than 20 MPG and that accelerate to 60 mph faster than in 15 seconds. Report the name of the car and the name of the automaker.
|
| 8 |
+
|
| 9 |
+
For each saab released after 1978, compute the ratio between the weight of the car and its number of horsepowers. Report the full name of the car, the year it was produced and the ratio.
|
| 10 |
+
|
| 11 |
+
Find the average, maximum and minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.
|
| 12 |
+
|
| 13 |
+
Find how many different car manufacturers produced a vehicle heavier than 4000 lbs.
|
| 14 |
+
|
| 15 |
+
Find the minimum horsepower for 4-cylinder vehicles manufactured by renault between 1971 and 1976 inclusively.
|
| 16 |
+
|
| 17 |
+
For each year when US-manufactured cars averaged less than 100 horsepowers, report the highest and the lowest engine displacement number.
|
| 18 |
+
|
| 19 |
+
For each year in which honda produced more than 2 models, report the best, the worst and the average gas milage of a toyota vehicle.
|
| 20 |
+
|
| 21 |
+
Report all vehicles with the best gas mileage. For each vehicle, report its full name and the year of production.
|
| 22 |
+
|
| 23 |
+
Among the vehicles with the gas mileage, report the one with the best acceleration. Report full name and the year of production.
|
| 24 |
+
|
| 25 |
+
For each country report the automaker with the largest number of cars in the database. Report the name of the country.
|
| 26 |
+
|
| 27 |
+
Find the difference in gas milage between the most fuel-efficient 8-cylinder model and the least fuel-efficient 4-cylinder model. Report just the number.
|
database/college_2/link.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
http://www.cs.dartmouth.edu/~cs61/Examples/
|
database/csu_1/schema.sql
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CREATE TABLE "Campuses" (
|
| 2 |
+
"Id" INTEGER PRIMARY KEY,
|
| 3 |
+
"Campus" TEXT,
|
| 4 |
+
"Location" TEXT,
|
| 5 |
+
"County" TEXT,
|
| 6 |
+
"Year" INTEGER
|
| 7 |
+
);
|
| 8 |
+
|
| 9 |
+
CREATE TABLE "csu_fees" (
|
| 10 |
+
"Campus" INTEGER PRIMARY KEY,
|
| 11 |
+
"Year" INTEGER,
|
| 12 |
+
"CampusFee" INTEGER,
|
| 13 |
+
FOREIGN KEY (Campus) REFERENCES Campuses(Id)
|
| 14 |
+
);
|
| 15 |
+
|
| 16 |
+
CREATE TABLE "degrees" (
|
| 17 |
+
"Year" INTEGER,
|
| 18 |
+
"Campus" INTEGER,
|
| 19 |
+
"Degrees" INTEGER,
|
| 20 |
+
PRIMARY KEY (Year, Campus),
|
| 21 |
+
FOREIGN KEY (Campus) REFERENCES Campuses(Id)
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
CREATE TABLE "discipline_enrollments" (
|
| 27 |
+
"Campus" INTEGER,
|
| 28 |
+
"Discipline" INTEGER,
|
| 29 |
+
"Year" INTEGER,
|
| 30 |
+
"Undergraduate" INTEGER,
|
| 31 |
+
"Graduate" INTEGER,
|
| 32 |
+
PRIMARY KEY (Campus, Discipline),
|
| 33 |
+
FOREIGN KEY (Campus) REFERENCES Campuses(Id)
|
| 34 |
+
);
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
CREATE TABLE "enrollments" (
|
| 39 |
+
"Campus" INTEGER,
|
| 40 |
+
"Year" INTEGER,
|
| 41 |
+
"TotalEnrollment_AY" INTEGER,
|
| 42 |
+
"FTE_AY" INTEGER,
|
| 43 |
+
PRIMARY KEY(Campus, Year),
|
| 44 |
+
FOREIGN KEY (Campus) REFERENCES Campuses(Id)
|
| 45 |
+
);
|
| 46 |
+
|
| 47 |
+
CREATE TABLE "faculty" (
|
| 48 |
+
"Campus" INTEGER,
|
| 49 |
+
"Year" INTEGER,
|
| 50 |
+
"Faculty" REAL,
|
| 51 |
+
FOREIGN KEY (Campus) REFERENCES Campuses(Id)
|
| 52 |
+
);
|
| 53 |
+
|
| 54 |
+
|
database/customers_card_transactions/customers_card_transactions.sqlite
ADDED
|
Binary file (20.5 kB). View file
|
|
|
database/flight_2/data_csv/README.AIRLINES.txt
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*****************************************************
|
| 2 |
+
CPE 365 Alex Dekhtyar
|
| 3 |
+
Cal Poly Computer Science Department
|
| 4 |
+
San Luis Obispo College of Engineering
|
| 5 |
+
California dekhtyar@csc.calpoly.edu
|
| 6 |
+
*****************************************************
|
| 7 |
+
AIRLINES DATASET
|
| 8 |
+
Version 1.0
|
| 9 |
+
November 19, 2007
|
| 10 |
+
*****************************************************
|
| 11 |
+
Sources: the list of US airports is from
|
| 12 |
+
http://www.world-airport-codes.com/
|
| 13 |
+
|
| 14 |
+
the list of airlines is from http://www.wikipedia.org
|
| 15 |
+
|
| 16 |
+
the list of flights is synthesized.
|
| 17 |
+
|
| 18 |
+
******************************************************
|
| 19 |
+
|
| 20 |
+
This file describes the contents of the AIRLINES dataset
|
| 21 |
+
developed for the CPE 365, Introduction to Databases,
|
| 22 |
+
course at Cal Poly.
|
| 23 |
+
|
| 24 |
+
The dataset contains information about some US airlines and
|
| 25 |
+
airports, and routes flown by the airlines between these airports.
|
| 26 |
+
|
| 27 |
+
General Conventions.
|
| 28 |
+
|
| 29 |
+
1. All files in the dataset are CSV (comma-separated values) files.
|
| 30 |
+
2. First line of each file provides the names of
|
| 31 |
+
columns. Second line may be empty, or may contain
|
| 32 |
+
the first row of the data.
|
| 33 |
+
3. All string values are enclosed in single quotes (')
|
| 34 |
+
4. All string values in the airports.csv and flights.csv files
|
| 35 |
+
have a trailing space.This is important to note, because
|
| 36 |
+
one of the string columns, airport code is the unique identifier
|
| 37 |
+
of the airport. This issue needs to be dealt with programmatically.
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
The dataset consists of the following files:
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
- airlines.csv : list of airlines
|
| 44 |
+
- airports100.csv : list of airports
|
| 45 |
+
- flights.csv : list of flights
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
Individual files have the following formats.
|
| 49 |
+
|
| 50 |
+
**************************************************************************
|
| 51 |
+
|
| 52 |
+
airlines.csv
|
| 53 |
+
|
| 54 |
+
Id : unique identifier of the airline
|
| 55 |
+
Airline : full name of the airline
|
| 56 |
+
Abbreviation : abbreviated name of the airline
|
| 57 |
+
Country : country of the airline
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
**************************************************************************
|
| 62 |
+
|
| 63 |
+
airports100.csv
|
| 64 |
+
|
| 65 |
+
City : location of the airport
|
| 66 |
+
AirportCode : unique three-letter airport code
|
| 67 |
+
AirportName : name of the airport
|
| 68 |
+
Country : country of the airport
|
| 69 |
+
CountryAbbrev : abbreviation of the country
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
**************************************************************************
|
| 74 |
+
|
| 75 |
+
flights.csv
|
| 76 |
+
|
| 77 |
+
Airline : airline that manages the flight
|
| 78 |
+
FlightNo : flight number (unique for each airline, may repeat
|
| 79 |
+
for different airlines)
|
| 80 |
+
SourceAirport : Code for the airport from which the flight originates
|
| 81 |
+
(see airports100.AirportCode)
|
| 82 |
+
DestAirport : Code for the airport at which the flight terminates
|
| 83 |
+
|
| 84 |
+
**************************************************************************
|
| 85 |
+
**************************************************************************
|
| 86 |
+
|
| 87 |
+
Permission granted to use and distribute this dataset in its current form,
|
| 88 |
+
provided this file is kept unchanged and is distributed together with the
|
| 89 |
+
data.
|
| 90 |
+
|
| 91 |
+
Permission granted to modify and expand this dataset, provided this
|
| 92 |
+
file is updated accordingly with new information.
|
| 93 |
+
|
| 94 |
+
**************************************************************************
|
| 95 |
+
**************************************************************************
|
| 96 |
+
|
database/geo/geo.sqlite
ADDED
|
Binary file (57.3 kB). View file
|
|
|
database/hr_1/schema.sql
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- phpMyAdmin SQL Dump
|
| 2 |
+
-- version 4.0.10.7
|
| 3 |
+
-- http://www.phpmyadmin.net
|
| 4 |
+
--
|
| 5 |
+
-- Host: localhost
|
| 6 |
+
-- Generation Time: Mar 20, 2015 at 01:43 AM
|
| 7 |
+
-- Server version: 5.5.34-cll-lve
|
| 8 |
+
-- PHP Version: 5.4.23
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
| 13 |
+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
| 14 |
+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
| 15 |
+
/*!40101 SET NAMES utf8 */;
|
| 16 |
+
CREATE TABLE IF NOT EXISTS `regions` (
|
| 17 |
+
`REGION_ID` decimal(5,0) NOT NULL,
|
| 18 |
+
`REGION_NAME` varchar(25) DEFAULT NULL,
|
| 19 |
+
PRIMARY KEY (`REGION_ID`)
|
| 20 |
+
);
|
| 21 |
+
|
| 22 |
+
--
|
| 23 |
+
-- Dumping data for table `regions`
|
| 24 |
+
--
|
| 25 |
+
|
| 26 |
+
INSERT INTO `regions` (`REGION_ID`, `REGION_NAME`) VALUES
|
| 27 |
+
('1', 'Europe\r'),
|
| 28 |
+
('2', 'Americas\r'),
|
| 29 |
+
('3', 'Asia\r'),
|
| 30 |
+
('4', 'Middle East and Africa\r');
|
| 31 |
+
--
|
| 32 |
+
-- Database: `wrpracti_bookinfo`
|
| 33 |
+
--
|
| 34 |
+
|
| 35 |
+
-- --------------------------------------------------------
|
| 36 |
+
|
| 37 |
+
--
|
| 38 |
+
-- Table structure for table `countries`
|
| 39 |
+
--
|
| 40 |
+
|
| 41 |
+
CREATE TABLE IF NOT EXISTS `countries` (
|
| 42 |
+
`COUNTRY_ID` varchar(2) NOT NULL,
|
| 43 |
+
`COUNTRY_NAME` varchar(40) DEFAULT NULL,
|
| 44 |
+
`REGION_ID` decimal(10,0) DEFAULT NULL,
|
| 45 |
+
PRIMARY KEY (`COUNTRY_ID`),
|
| 46 |
+
FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)
|
| 47 |
+
);
|
| 48 |
+
|
| 49 |
+
--
|
| 50 |
+
-- Dumping data for table `countries`
|
| 51 |
+
--
|
| 52 |
+
|
| 53 |
+
INSERT INTO `countries` (`COUNTRY_ID`, `COUNTRY_NAME`, `REGION_ID`) VALUES
|
| 54 |
+
('AR', 'Argentina', '2'),
|
| 55 |
+
('AU', 'Australia', '3'),
|
| 56 |
+
('BE', 'Belgium', '1'),
|
| 57 |
+
('BR', 'Brazil', '2'),
|
| 58 |
+
('CA', 'Canada', '2'),
|
| 59 |
+
('CH', 'Switzerland', '1'),
|
| 60 |
+
('CN', 'China', '3'),
|
| 61 |
+
('DE', 'Germany', '1'),
|
| 62 |
+
('DK', 'Denmark', '1'),
|
| 63 |
+
('EG', 'Egypt', '4'),
|
| 64 |
+
('FR', 'France', '1'),
|
| 65 |
+
('HK', 'HongKong', '3'),
|
| 66 |
+
('IL', 'Israel', '4'),
|
| 67 |
+
('IN', 'India', '3'),
|
| 68 |
+
('IT', 'Italy', '1'),
|
| 69 |
+
('JP', 'Japan', '3'),
|
| 70 |
+
('KW', 'Kuwait', '4'),
|
| 71 |
+
('MX', 'Mexico', '2'),
|
| 72 |
+
('NG', 'Nigeria', '4'),
|
| 73 |
+
('NL', 'Netherlands', '1'),
|
| 74 |
+
('SG', 'Singapore', '3'),
|
| 75 |
+
('UK', 'United Kingdom', '1'),
|
| 76 |
+
('US', 'United States of America', '2'),
|
| 77 |
+
('ZM', 'Zambia', '4'),
|
| 78 |
+
('ZW', 'Zimbabwe', '4');
|
| 79 |
+
|
| 80 |
+
-- --------------------------------------------------------
|
| 81 |
+
|
| 82 |
+
--
|
| 83 |
+
-- Table structure for table `departments`
|
| 84 |
+
--
|
| 85 |
+
|
| 86 |
+
CREATE TABLE IF NOT EXISTS `departments` (
|
| 87 |
+
`DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',
|
| 88 |
+
`DEPARTMENT_NAME` varchar(30) NOT NULL,
|
| 89 |
+
`MANAGER_ID` decimal(6,0) DEFAULT NULL,
|
| 90 |
+
`LOCATION_ID` decimal(4,0) DEFAULT NULL,
|
| 91 |
+
PRIMARY KEY (`DEPARTMENT_ID`)
|
| 92 |
+
);
|
| 93 |
+
|
| 94 |
+
--
|
| 95 |
+
-- Dumping data for table `departments`
|
| 96 |
+
--
|
| 97 |
+
|
| 98 |
+
INSERT INTO `departments` (`DEPARTMENT_ID`, `DEPARTMENT_NAME`, `MANAGER_ID`, `LOCATION_ID`) VALUES
|
| 99 |
+
('10', 'Administration', '200', '1700'),
|
| 100 |
+
('20', 'Marketing', '201', '1800'),
|
| 101 |
+
('30', 'Purchasing', '114', '1700'),
|
| 102 |
+
('40', 'Human Resources', '203', '2400'),
|
| 103 |
+
('50', 'Shipping', '121', '1500'),
|
| 104 |
+
('60', 'IT', '103', '1400'),
|
| 105 |
+
('70', 'Public Relations', '204', '2700'),
|
| 106 |
+
('80', 'Sales', '145', '2500'),
|
| 107 |
+
('90', 'Executive', '100', '1700'),
|
| 108 |
+
('100', 'Finance', '108', '1700'),
|
| 109 |
+
('110', 'Accounting', '205', '1700'),
|
| 110 |
+
('120', 'Treasury', '0', '1700'),
|
| 111 |
+
('130', 'Corporate Tax', '0', '1700'),
|
| 112 |
+
('140', 'Control And Credit', '0', '1700'),
|
| 113 |
+
('150', 'Shareholder Services', '0', '1700'),
|
| 114 |
+
('160', 'Benefits', '0', '1700'),
|
| 115 |
+
('170', 'Manufacturing', '0', '1700'),
|
| 116 |
+
('180', 'Construction', '0', '1700'),
|
| 117 |
+
('190', 'Contracting', '0', '1700'),
|
| 118 |
+
('200', 'Operations', '0', '1700'),
|
| 119 |
+
('210', 'IT Support', '0', '1700'),
|
| 120 |
+
('220', 'NOC', '0', '1700'),
|
| 121 |
+
('230', 'IT Helpdesk', '0', '1700'),
|
| 122 |
+
('240', 'Government Sales', '0', '1700'),
|
| 123 |
+
('250', 'Retail Sales', '0', '1700'),
|
| 124 |
+
('260', 'Recruiting', '0', '1700'),
|
| 125 |
+
('270', 'Payroll', '0', '1700');
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
CREATE TABLE IF NOT EXISTS `jobs` (
|
| 129 |
+
`JOB_ID` varchar(10) NOT NULL DEFAULT '',
|
| 130 |
+
`JOB_TITLE` varchar(35) NOT NULL,
|
| 131 |
+
`MIN_SALARY` decimal(6,0) DEFAULT NULL,
|
| 132 |
+
`MAX_SALARY` decimal(6,0) DEFAULT NULL,
|
| 133 |
+
PRIMARY KEY (`JOB_ID`)
|
| 134 |
+
);
|
| 135 |
+
|
| 136 |
+
--
|
| 137 |
+
-- Dumping data for table `jobs`
|
| 138 |
+
--
|
| 139 |
+
|
| 140 |
+
INSERT INTO `jobs` (`JOB_ID`, `JOB_TITLE`, `MIN_SALARY`, `MAX_SALARY`) VALUES
|
| 141 |
+
('AD_PRES', 'President', '20000', '40000'),
|
| 142 |
+
('AD_VP', 'Administration Vice President', '15000', '30000'),
|
| 143 |
+
('AD_ASST', 'Administration Assistant', '3000', '6000'),
|
| 144 |
+
('FI_MGR', 'Finance Manager', '8200', '16000'),
|
| 145 |
+
('FI_ACCOUNT', 'Accountant', '4200', '9000'),
|
| 146 |
+
('AC_MGR', 'Accounting Manager', '8200', '16000'),
|
| 147 |
+
('AC_ACCOUNT', 'Public Accountant', '4200', '9000'),
|
| 148 |
+
('SA_MAN', 'Sales Manager', '10000', '20000'),
|
| 149 |
+
('SA_REP', 'Sales Representative', '6000', '12000'),
|
| 150 |
+
('PU_MAN', 'Purchasing Manager', '8000', '15000'),
|
| 151 |
+
('PU_CLERK', 'Purchasing Clerk', '2500', '5500'),
|
| 152 |
+
('ST_MAN', 'Stock Manager', '5500', '8500'),
|
| 153 |
+
('ST_CLERK', 'Stock Clerk', '2000', '5000'),
|
| 154 |
+
('SH_CLERK', 'Shipping Clerk', '2500', '5500'),
|
| 155 |
+
('IT_PROG', 'Programmer', '4000', '10000'),
|
| 156 |
+
('MK_MAN', 'Marketing Manager', '9000', '15000'),
|
| 157 |
+
('MK_REP', 'Marketing Representative', '4000', '9000'),
|
| 158 |
+
('HR_REP', 'Human Resources Representative', '4000', '9000'),
|
| 159 |
+
('PR_REP', 'Public Relations Representative', '4500', '10500');
|
| 160 |
+
|
| 161 |
+
-- --------------------------------------------------------
|
| 162 |
+
|
| 163 |
+
--
|
| 164 |
+
-- Table structure for table `employees`
|
| 165 |
+
--
|
| 166 |
+
|
| 167 |
+
CREATE TABLE IF NOT EXISTS `employees` (
|
| 168 |
+
`EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',
|
| 169 |
+
`FIRST_NAME` varchar(20) DEFAULT NULL,
|
| 170 |
+
`LAST_NAME` varchar(25) NOT NULL,
|
| 171 |
+
`EMAIL` varchar(25) NOT NULL,
|
| 172 |
+
`PHONE_NUMBER` varchar(20) DEFAULT NULL,
|
| 173 |
+
`HIRE_DATE` date NOT NULL,
|
| 174 |
+
`JOB_ID` varchar(10) NOT NULL,
|
| 175 |
+
`SALARY` decimal(8,2) DEFAULT NULL,
|
| 176 |
+
`COMMISSION_PCT` decimal(2,2) DEFAULT NULL,
|
| 177 |
+
`MANAGER_ID` decimal(6,0) DEFAULT NULL,
|
| 178 |
+
`DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,
|
| 179 |
+
PRIMARY KEY (`EMPLOYEE_ID`),
|
| 180 |
+
FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),
|
| 181 |
+
FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)
|
| 182 |
+
);
|
| 183 |
+
|
| 184 |
+
--
|
| 185 |
+
-- Dumping data for table `employees`
|
| 186 |
+
--
|
| 187 |
+
|
| 188 |
+
INSERT INTO `employees` (`EMPLOYEE_ID`, `FIRST_NAME`, `LAST_NAME`, `EMAIL`, `PHONE_NUMBER`, `HIRE_DATE`, `JOB_ID`, `SALARY`, `COMMISSION_PCT`, `MANAGER_ID`, `DEPARTMENT_ID`) VALUES
|
| 189 |
+
('100', 'Steven', 'King', 'SKING', '515.123.4567', '1987-06-17', 'AD_PRES', '24000.00', '0.00', '0', '90'),
|
| 190 |
+
('101', 'Neena', 'Kochhar', 'NKOCHHAR', '515.123.4568', '1987-06-18', 'AD_VP', '17000.00', '0.00', '100', '90'),
|
| 191 |
+
('102', 'Lex', 'De Haan', 'LDEHAAN', '515.123.4569', '1987-06-19', 'AD_VP', '17000.00', '0.00', '100', '90'),
|
| 192 |
+
('103', 'Alexander', 'Hunold', 'AHUNOLD', '590.423.4567', '1987-06-20', 'IT_PROG', '9000.00', '0.00', '102', '60'),
|
| 193 |
+
('104', 'Bruce', 'Ernst', 'BERNST', '590.423.4568', '1987-06-21', 'IT_PROG', '6000.00', '0.00', '103', '60'),
|
| 194 |
+
('105', 'David', 'Austin', 'DAUSTIN', '590.423.4569', '1987-06-22', 'IT_PROG', '4800.00', '0.00', '103', '60'),
|
| 195 |
+
('106', 'Valli', 'Pataballa', 'VPATABAL', '590.423.4560', '1987-06-23', 'IT_PROG', '4800.00', '0.00', '103', '60'),
|
| 196 |
+
('107', 'Diana', 'Lorentz', 'DLORENTZ', '590.423.5567', '1987-06-24', 'IT_PROG', '4200.00', '0.00', '103', '60'),
|
| 197 |
+
('108', 'Nancy', 'Greenberg', 'NGREENBE', '515.124.4569', '1987-06-25', 'FI_MGR', '12000.00', '0.00', '101', '100'),
|
| 198 |
+
('109', 'Daniel', 'Faviet', 'DFAVIET', '515.124.4169', '1987-06-26', 'FI_ACCOUNT', '9000.00', '0.00', '108', '100'),
|
| 199 |
+
('110', 'John', 'Chen', 'JCHEN', '515.124.4269', '1987-06-27', 'FI_ACCOUNT', '8200.00', '0.00', '108', '100'),
|
| 200 |
+
('111', 'Ismael', 'Sciarra', 'ISCIARRA', '515.124.4369', '1987-06-28', 'FI_ACCOUNT', '7700.00', '0.00', '108', '100'),
|
| 201 |
+
('112', 'Jose Manuel', 'Urman', 'JMURMAN', '515.124.4469', '1987-06-29', 'FI_ACCOUNT', '7800.00', '0.00', '108', '100'),
|
| 202 |
+
('113', 'Luis', 'Popp', 'LPOPP', '515.124.4567', '1987-06-30', 'FI_ACCOUNT', '6900.00', '0.00', '108', '100'),
|
| 203 |
+
('114', 'Den', 'Raphaely', 'DRAPHEAL', '515.127.4561', '1987-07-01', 'PU_MAN', '11000.00', '0.00', '100', '30'),
|
| 204 |
+
('115', 'Alexander', 'Khoo', 'AKHOO', '515.127.4562', '1987-07-02', 'PU_CLERK', '3100.00', '0.00', '114', '30'),
|
| 205 |
+
('116', 'Shelli', 'Baida', 'SBAIDA', '515.127.4563', '1987-07-03', 'PU_CLERK', '2900.00', '0.00', '114', '30'),
|
| 206 |
+
('117', 'Sigal', 'Tobias', 'STOBIAS', '515.127.4564', '1987-07-04', 'PU_CLERK', '2800.00', '0.00', '114', '30'),
|
| 207 |
+
('118', 'Guy', 'Himuro', 'GHIMURO', '515.127.4565', '1987-07-05', 'PU_CLERK', '2600.00', '0.00', '114', '30'),
|
| 208 |
+
('119', 'Karen', 'Colmenares', 'KCOLMENA', '515.127.4566', '1987-07-06', 'PU_CLERK', '2500.00', '0.00', '114', '30'),
|
| 209 |
+
('120', 'Matthew', 'Weiss', 'MWEISS', '650.123.1234', '1987-07-07', 'ST_MAN', '8000.00', '0.00', '100', '50'),
|
| 210 |
+
('121', 'Adam', 'Fripp', 'AFRIPP', '650.123.2234', '1987-07-08', 'ST_MAN', '8200.00', '0.00', '100', '50'),
|
| 211 |
+
('122', 'Payam', 'Kaufling', 'PKAUFLIN', '650.123.3234', '1987-07-09', 'ST_MAN', '7900.00', '0.00', '100', '50'),
|
| 212 |
+
('123', 'Shanta', 'Vollman', 'SVOLLMAN', '650.123.4234', '1987-07-10', 'ST_MAN', '6500.00', '0.00', '100', '50'),
|
| 213 |
+
('124', 'Kevin', 'Mourgos', 'KMOURGOS', '650.123.5234', '1987-07-11', 'ST_MAN', '5800.00', '0.00', '100', '50'),
|
| 214 |
+
('125', 'Julia', 'Nayer', 'JNAYER', '650.124.1214', '1987-07-12', 'ST_CLERK', '3200.00', '0.00', '120', '50'),
|
| 215 |
+
('126', 'Irene', 'Mikkilineni', 'IMIKKILI', '650.124.1224', '1987-07-13', 'ST_CLERK', '2700.00', '0.00', '120', '50'),
|
| 216 |
+
('127', 'James', 'Landry', 'JLANDRY', '650.124.1334', '1987-07-14', 'ST_CLERK', '2400.00', '0.00', '120', '50'),
|
| 217 |
+
('128', 'Steven', 'Markle', 'SMARKLE', '650.124.1434', '1987-07-15', 'ST_CLERK', '2200.00', '0.00', '120', '50'),
|
| 218 |
+
('129', 'Laura', 'Bissot', 'LBISSOT', '650.124.5234', '1987-07-16', 'ST_CLERK', '3300.00', '0.00', '121', '50'),
|
| 219 |
+
('130', 'Mozhe', 'Atkinson', 'MATKINSO', '650.124.6234', '1987-07-17', 'ST_CLERK', '2800.00', '0.00', '121', '50'),
|
| 220 |
+
('131', 'James', 'Marlow', 'JAMRLOW', '650.124.7234', '1987-07-18', 'ST_CLERK', '2500.00', '0.00', '121', '50'),
|
| 221 |
+
('132', 'TJ', 'Olson', 'TJOLSON', '650.124.8234', '1987-07-19', 'ST_CLERK', '2100.00', '0.00', '121', '50'),
|
| 222 |
+
('133', 'Jason', 'Mallin', 'JMALLIN', '650.127.1934', '1987-07-20', 'ST_CLERK', '3300.00', '0.00', '122', '50'),
|
| 223 |
+
('134', 'Michael', 'Rogers', 'MROGERS', '650.127.1834', '1987-07-21', 'ST_CLERK', '2900.00', '0.00', '122', '50'),
|
| 224 |
+
('135', 'Ki', 'Gee', 'KGEE', '650.127.1734', '1987-07-22', 'ST_CLERK', '2400.00', '0.00', '122', '50'),
|
| 225 |
+
('136', 'Hazel', 'Philtanker', 'HPHILTAN', '650.127.1634', '1987-07-23', 'ST_CLERK', '2200.00', '0.00', '122', '50'),
|
| 226 |
+
('137', 'Renske', 'Ladwig', 'RLADWIG', '650.121.1234', '1987-07-24', 'ST_CLERK', '3600.00', '0.00', '123', '50'),
|
| 227 |
+
('138', 'Stephen', 'Stiles', 'SSTILES', '650.121.2034', '1987-07-25', 'ST_CLERK', '3200.00', '0.00', '123', '50'),
|
| 228 |
+
('139', 'John', 'Seo', 'JSEO', '650.121.2019', '1987-07-26', 'ST_CLERK', '2700.00', '0.00', '123', '50'),
|
| 229 |
+
('140', 'Joshua', 'Patel', 'JPATEL', '650.121.1834', '1987-07-27', 'ST_CLERK', '2500.00', '0.00', '123', '50'),
|
| 230 |
+
('141', 'Trenna', 'Rajs', 'TRAJS', '650.121.8009', '1987-07-28', 'ST_CLERK', '3500.00', '0.00', '124', '50'),
|
| 231 |
+
('142', 'Curtis', 'Davies', 'CDAVIES', '650.121.2994', '1987-07-29', 'ST_CLERK', '3100.00', '0.00', '124', '50'),
|
| 232 |
+
('143', 'Randall', 'Matos', 'RMATOS', '650.121.2874', '1987-07-30', 'ST_CLERK', '2600.00', '0.00', '124', '50'),
|
| 233 |
+
('144', 'Peter', 'Vargas', 'PVARGAS', '650.121.2004', '1987-07-31', 'ST_CLERK', '2500.00', '0.00', '124', '50'),
|
| 234 |
+
('145', 'John', 'Russell', 'JRUSSEL', '011.44.1344.429268', '1987-08-01', 'SA_MAN', '14000.00', '0.40', '100', '80'),
|
| 235 |
+
('146', 'Karen', 'Partners', 'KPARTNER', '011.44.1344.467268', '1987-08-02', 'SA_MAN', '13500.00', '0.30', '100', '80'),
|
| 236 |
+
('147', 'Alberto', 'Errazuriz', 'AERRAZUR', '011.44.1344.429278', '1987-08-03', 'SA_MAN', '12000.00', '0.30', '100', '80'),
|
| 237 |
+
('148', 'Gerald', 'Cambrault', 'GCAMBRAU', '011.44.1344.619268', '1987-08-04', 'SA_MAN', '11000.00', '0.30', '100', '80'),
|
| 238 |
+
('149', 'Eleni', 'Zlotkey', 'EZLOTKEY', '011.44.1344.429018', '1987-08-05', 'SA_MAN', '10500.00', '0.20', '100', '80'),
|
| 239 |
+
('150', 'Peter', 'Tucker', 'PTUCKER', '011.44.1344.129268', '1987-08-06', 'SA_REP', '10000.00', '0.30', '145', '80'),
|
| 240 |
+
('151', 'David', 'Bernstein', 'DBERNSTE', '011.44.1344.345268', '1987-08-07', 'SA_REP', '9500.00', '0.25', '145', '80'),
|
| 241 |
+
('152', 'Peter', 'Hall', 'PHALL', '011.44.1344.478968', '1987-08-08', 'SA_REP', '9000.00', '0.25', '145', '80'),
|
| 242 |
+
('153', 'Christopher', 'Olsen', 'COLSEN', '011.44.1344.498718', '1987-08-09', 'SA_REP', '8000.00', '0.20', '145', '80'),
|
| 243 |
+
('154', 'Nanette', 'Cambrault', 'NCAMBRAU', '011.44.1344.987668', '1987-08-10', 'SA_REP', '7500.00', '0.20', '145', '80'),
|
| 244 |
+
('155', 'Oliver', 'Tuvault', 'OTUVAULT', '011.44.1344.486508', '1987-08-11', 'SA_REP', '7000.00', '0.15', '145', '80'),
|
| 245 |
+
('156', 'Janette', 'King', 'JKING', '011.44.1345.429268', '1987-08-12', 'SA_REP', '10000.00', '0.35', '146', '80'),
|
| 246 |
+
('157', 'Patrick', 'Sully', 'PSULLY', '011.44.1345.929268', '1987-08-13', 'SA_REP', '9500.00', '0.35', '146', '80'),
|
| 247 |
+
('158', 'Allan', 'McEwen', 'AMCEWEN', '011.44.1345.829268', '1987-08-14', 'SA_REP', '9000.00', '0.35', '146', '80'),
|
| 248 |
+
('159', 'Lindsey', 'Smith', 'LSMITH', '011.44.1345.729268', '1987-08-15', 'SA_REP', '8000.00', '0.30', '146', '80'),
|
| 249 |
+
('160', 'Louise', 'Doran', 'LDORAN', '011.44.1345.629268', '1987-08-16', 'SA_REP', '7500.00', '0.30', '146', '80'),
|
| 250 |
+
('161', 'Sarath', 'Sewall', 'SSEWALL', '011.44.1345.529268', '1987-08-17', 'SA_REP', '7000.00', '0.25', '146', '80'),
|
| 251 |
+
('162', 'Clara', 'Vishney', 'CVISHNEY', '011.44.1346.129268', '1987-08-18', 'SA_REP', '10500.00', '0.25', '147', '80'),
|
| 252 |
+
('163', 'Danielle', 'Greene', 'DGREENE', '011.44.1346.229268', '1987-08-19', 'SA_REP', '9500.00', '0.15', '147', '80'),
|
| 253 |
+
('164', 'Mattea', 'Marvins', 'MMARVINS', '011.44.1346.329268', '1987-08-20', 'SA_REP', '7200.00', '0.10', '147', '80'),
|
| 254 |
+
('165', 'David', 'Lee', 'DLEE', '011.44.1346.529268', '1987-08-21', 'SA_REP', '6800.00', '0.10', '147', '80'),
|
| 255 |
+
('166', 'Sundar', 'Ande', 'SANDE', '011.44.1346.629268', '1987-08-22', 'SA_REP', '6400.00', '0.10', '147', '80'),
|
| 256 |
+
('167', 'Amit', 'Banda', 'ABANDA', '011.44.1346.729268', '1987-08-23', 'SA_REP', '6200.00', '0.10', '147', '80'),
|
| 257 |
+
('168', 'Lisa', 'Ozer', 'LOZER', '011.44.1343.929268', '1987-08-24', 'SA_REP', '11500.00', '0.25', '148', '80'),
|
| 258 |
+
('169', 'Harrison', 'Bloom', 'HBLOOM', '011.44.1343.829268', '1987-08-25', 'SA_REP', '10000.00', '0.20', '148', '80'),
|
| 259 |
+
('170', 'Tayler', 'Fox', 'TFOX', '011.44.1343.729268', '1987-08-26', 'SA_REP', '9600.00', '0.20', '148', '80'),
|
| 260 |
+
('171', 'William', 'Smith', 'WSMITH', '011.44.1343.629268', '1987-08-27', 'SA_REP', '7400.00', '0.15', '148', '80'),
|
| 261 |
+
('172', 'Elizabeth', 'Bates', 'EBATES', '011.44.1343.529268', '1987-08-28', 'SA_REP', '7300.00', '0.15', '148', '80'),
|
| 262 |
+
('173', 'Sundita', 'Kumar', 'SKUMAR', '011.44.1343.329268', '1987-08-29', 'SA_REP', '6100.00', '0.10', '148', '80'),
|
| 263 |
+
('174', 'Ellen', 'Abel', 'EABEL', '011.44.1644.429267', '1987-08-30', 'SA_REP', '11000.00', '0.30', '149', '80'),
|
| 264 |
+
('175', 'Alyssa', 'Hutton', 'AHUTTON', '011.44.1644.429266', '1987-08-31', 'SA_REP', '8800.00', '0.25', '149', '80'),
|
| 265 |
+
('176', 'Jonathon', 'Taylor', 'JTAYLOR', '011.44.1644.429265', '1987-09-01', 'SA_REP', '8600.00', '0.20', '149', '80'),
|
| 266 |
+
('177', 'Jack', 'Livingston', 'JLIVINGS', '011.44.1644.429264', '1987-09-02', 'SA_REP', '8400.00', '0.20', '149', '80'),
|
| 267 |
+
('178', 'Kimberely', 'Grant', 'KGRANT', '011.44.1644.429263', '1987-09-03', 'SA_REP', '7000.00', '0.15', '149', '0'),
|
| 268 |
+
('179', 'Charles', 'Johnson', 'CJOHNSON', '011.44.1644.429262', '1987-09-04', 'SA_REP', '6200.00', '0.10', '149', '80'),
|
| 269 |
+
('180', 'Winston', 'Taylor', 'WTAYLOR', '650.507.9876', '1987-09-05', 'SH_CLERK', '3200.00', '0.00', '120', '50'),
|
| 270 |
+
('181', 'Jean', 'Fleaur', 'JFLEAUR', '650.507.9877', '1987-09-06', 'SH_CLERK', '3100.00', '0.00', '120', '50'),
|
| 271 |
+
('182', 'Martha', 'Sullivan', 'MSULLIVA', '650.507.9878', '1987-09-07', 'SH_CLERK', '2500.00', '0.00', '120', '50'),
|
| 272 |
+
('183', 'Girard', 'Geoni', 'GGEONI', '650.507.9879', '1987-09-08', 'SH_CLERK', '2800.00', '0.00', '120', '50'),
|
| 273 |
+
('184', 'Nandita', 'Sarchand', 'NSARCHAN', '650.509.1876', '1987-09-09', 'SH_CLERK', '4200.00', '0.00', '121', '50'),
|
| 274 |
+
('185', 'Alexis', 'Bull', 'ABULL', '650.509.2876', '1987-09-10', 'SH_CLERK', '4100.00', '0.00', '121', '50'),
|
| 275 |
+
('186', 'Julia', 'Dellinger', 'JDELLING', '650.509.3876', '1987-09-11', 'SH_CLERK', '3400.00', '0.00', '121', '50'),
|
| 276 |
+
('187', 'Anthony', 'Cabrio', 'ACABRIO', '650.509.4876', '1987-09-12', 'SH_CLERK', '3000.00', '0.00', '121', '50'),
|
| 277 |
+
('188', 'Kelly', 'Chung', 'KCHUNG', '650.505.1876', '1987-09-13', 'SH_CLERK', '3800.00', '0.00', '122', '50'),
|
| 278 |
+
('189', 'Jennifer', 'Dilly', 'JDILLY', '650.505.2876', '1987-09-14', 'SH_CLERK', '3600.00', '0.00', '122', '50'),
|
| 279 |
+
('190', 'Timothy', 'Gates', 'TGATES', '650.505.3876', '1987-09-15', 'SH_CLERK', '2900.00', '0.00', '122', '50'),
|
| 280 |
+
('191', 'Randall', 'Perkins', 'RPERKINS', '650.505.4876', '1987-09-16', 'SH_CLERK', '2500.00', '0.00', '122', '50'),
|
| 281 |
+
('192', 'Sarah', 'Bell', 'SBELL', '650.501.1876', '1987-09-17', 'SH_CLERK', '4000.00', '0.00', '123', '50'),
|
| 282 |
+
('193', 'Britney', 'Everett', 'BEVERETT', '650.501.2876', '1987-09-18', 'SH_CLERK', '3900.00', '0.00', '123', '50'),
|
| 283 |
+
('194', 'Samuel', 'McCain', 'SMCCAIN', '650.501.3876', '1987-09-19', 'SH_CLERK', '3200.00', '0.00', '123', '50'),
|
| 284 |
+
('195', 'Vance', 'Jones', 'VJONES', '650.501.4876', '1987-09-20', 'SH_CLERK', '2800.00', '0.00', '123', '50'),
|
| 285 |
+
('196', 'Alana', 'Walsh', 'AWALSH', '650.507.9811', '1987-09-21', 'SH_CLERK', '3100.00', '0.00', '124', '50'),
|
| 286 |
+
('197', 'Kevin', 'Feeney', 'KFEENEY', '650.507.9822', '1987-09-22', 'SH_CLERK', '3000.00', '0.00', '124', '50'),
|
| 287 |
+
('198', 'Donald', 'OConnell', 'DOCONNEL', '650.507.9833', '1987-09-23', 'SH_CLERK', '2600.00', '0.00', '124', '50'),
|
| 288 |
+
('199', 'Douglas', 'Grant', 'DGRANT', '650.507.9844', '1987-09-24', 'SH_CLERK', '2600.00', '0.00', '124', '50'),
|
| 289 |
+
('200', 'Jennifer', 'Whalen', 'JWHALEN', '515.123.4444', '1987-09-25', 'AD_ASST', '4400.00', '0.00', '101', '10'),
|
| 290 |
+
('201', 'Michael', 'Hartstein', 'MHARTSTE', '515.123.5555', '1987-09-26', 'MK_MAN', '13000.00', '0.00', '100', '20'),
|
| 291 |
+
('202', 'Pat', 'Fay', 'PFAY', '603.123.6666', '1987-09-27', 'MK_REP', '6000.00', '0.00', '201', '20'),
|
| 292 |
+
('203', 'Susan', 'Mavris', 'SMAVRIS', '515.123.7777', '1987-09-28', 'HR_REP', '6500.00', '0.00', '101', '40'),
|
| 293 |
+
('204', 'Hermann', 'Baer', 'HBAER', '515.123.8888', '1987-09-29', 'PR_REP', '10000.00', '0.00', '101', '70'),
|
| 294 |
+
('205', 'Shelley', 'Higgins', 'SHIGGINS', '515.123.8080', '1987-09-30', 'AC_MGR', '12000.00', '0.00', '101', '110'),
|
| 295 |
+
('206', 'William', 'Gietz', 'WGIETZ', '515.123.8181', '1987-10-01', 'AC_ACCOUNT', '8300.00', '0.00', '205', '110');
|
| 296 |
+
|
| 297 |
+
-- --------------------------------------------------------
|
| 298 |
+
|
| 299 |
+
--
|
| 300 |
+
-- Table structure for table `job_history`
|
| 301 |
+
--
|
| 302 |
+
|
| 303 |
+
CREATE TABLE IF NOT EXISTS `job_history` (
|
| 304 |
+
`EMPLOYEE_ID` decimal(6,0) NOT NULL,
|
| 305 |
+
`START_DATE` date NOT NULL,
|
| 306 |
+
`END_DATE` date NOT NULL,
|
| 307 |
+
`JOB_ID` varchar(10) NOT NULL,
|
| 308 |
+
`DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,
|
| 309 |
+
PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),
|
| 310 |
+
FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),
|
| 311 |
+
FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),
|
| 312 |
+
FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)
|
| 313 |
+
);
|
| 314 |
+
|
| 315 |
+
--
|
| 316 |
+
-- Dumping data for table `job_history`
|
| 317 |
+
--
|
| 318 |
+
|
| 319 |
+
INSERT INTO `job_history` (`EMPLOYEE_ID`, `START_DATE`, `END_DATE`, `JOB_ID`, `DEPARTMENT_ID`) VALUES
|
| 320 |
+
('102', '1993-01-13', '1998-07-24', 'IT_PROG', '60'),
|
| 321 |
+
('101', '1989-09-21', '1993-10-27', 'AC_ACCOUNT', '110'),
|
| 322 |
+
('101', '1993-10-28', '1997-03-15', 'AC_MGR', '110'),
|
| 323 |
+
('201', '1996-02-17', '1999-12-19', 'MK_REP', '20'),
|
| 324 |
+
('114', '1998-03-24', '1999-12-31', 'ST_CLERK', '50'),
|
| 325 |
+
('122', '1999-01-01', '1999-12-31', 'ST_CLERK', '50'),
|
| 326 |
+
('200', '1987-09-17', '1993-06-17', 'AD_ASST', '90'),
|
| 327 |
+
('176', '1998-03-24', '1998-12-31', 'SA_REP', '80'),
|
| 328 |
+
('176', '1999-01-01', '1999-12-31', 'SA_MAN', '80'),
|
| 329 |
+
('200', '1994-07-01', '1998-12-31', 'AC_ACCOUNT', '90'),
|
| 330 |
+
('0', '0000-00-00', '0000-00-00', '', '0');
|
| 331 |
+
|
| 332 |
+
-- --------------------------------------------------------
|
| 333 |
+
|
| 334 |
+
--
|
| 335 |
+
-- Table structure for table `jobs`
|
| 336 |
+
--
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
--
|
| 340 |
+
-- Table structure for table `locations`
|
| 341 |
+
--
|
| 342 |
+
|
| 343 |
+
CREATE TABLE IF NOT EXISTS `locations` (
|
| 344 |
+
`LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',
|
| 345 |
+
`STREET_ADDRESS` varchar(40) DEFAULT NULL,
|
| 346 |
+
`POSTAL_CODE` varchar(12) DEFAULT NULL,
|
| 347 |
+
`CITY` varchar(30) NOT NULL,
|
| 348 |
+
`STATE_PROVINCE` varchar(25) DEFAULT NULL,
|
| 349 |
+
`COUNTRY_ID` varchar(2) DEFAULT NULL,
|
| 350 |
+
PRIMARY KEY (`LOCATION_ID`),
|
| 351 |
+
FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)
|
| 352 |
+
);
|
| 353 |
+
|
| 354 |
+
--
|
| 355 |
+
-- Dumping data for table `locations`
|
| 356 |
+
--
|
| 357 |
+
|
| 358 |
+
INSERT INTO `locations` (`LOCATION_ID`, `STREET_ADDRESS`, `POSTAL_CODE`, `CITY`, `STATE_PROVINCE`, `COUNTRY_ID`) VALUES
|
| 359 |
+
('1000', '1297 Via Cola di Rie', '989', 'Roma', '', 'IT'),
|
| 360 |
+
('1100', '93091 Calle della Testa', '10934', 'Venice', '', 'IT'),
|
| 361 |
+
('1200', '2017 Shinjuku-ku', '1689', 'Tokyo', 'Tokyo Prefecture', 'JP'),
|
| 362 |
+
('1300', '9450 Kamiya-cho', '6823', 'Hiroshima', '', 'JP'),
|
| 363 |
+
('1400', '2014 Jabberwocky Rd', '26192', 'Southlake', 'Texas', 'US'),
|
| 364 |
+
('1500', '2011 Interiors Blvd', '99236', 'South San Francisco', 'California', 'US'),
|
| 365 |
+
('1600', '2007 Zagora St', '50090', 'South Brunswick', 'New Jersey', 'US'),
|
| 366 |
+
('1700', '2004 Charade Rd', '98199', 'Seattle', 'Washington', 'US'),
|
| 367 |
+
('1800', '147 Spadina Ave', 'M5V 2L7', 'Toronto', 'Ontario', 'CA'),
|
| 368 |
+
('1900', '6092 Boxwood St', 'YSW 9T2', 'Whitehorse', 'Yukon', 'CA'),
|
| 369 |
+
('2000', '40-5-12 Laogianggen', '190518', 'Beijing', '', 'CN'),
|
| 370 |
+
('2100', '1298 Vileparle (E)', '490231', 'Bombay', 'Maharashtra', 'IN'),
|
| 371 |
+
('2200', '12-98 Victoria Street', '2901', 'Sydney', 'New South Wales', 'AU'),
|
| 372 |
+
('2300', '198 Clementi North', '540198', 'Singapore', '', 'SG'),
|
| 373 |
+
('2400', '8204 Arthur St', '', 'London', '', 'UK'),
|
| 374 |
+
('2500', '"Magdalen Centre', ' The Oxford ', 'OX9 9ZB', 'Oxford', 'Ox'),
|
| 375 |
+
('2600', '9702 Chester Road', '9629850293', 'Stretford', 'Manchester', 'UK'),
|
| 376 |
+
('2700', 'Schwanthalerstr. 7031', '80925', 'Munich', 'Bavaria', 'DE'),
|
| 377 |
+
('2800', 'Rua Frei Caneca 1360', '01307-002', 'Sao Paulo', 'Sao Paulo', 'BR'),
|
| 378 |
+
('2900', '20 Rue des Corps-Saints', '1730', 'Geneva', 'Geneve', 'CH'),
|
| 379 |
+
('3000', 'Murtenstrasse 921', '3095', 'Bern', 'BE', 'CH'),
|
| 380 |
+
('3100', 'Pieter Breughelstraat 837', '3029SK', 'Utrecht', 'Utrecht', 'NL'),
|
| 381 |
+
('3200', 'Mariano Escobedo 9991', '11932', 'Mexico City', '"Distrito Federal', '"');
|
| 382 |
+
|
| 383 |
+
-- --------------------------------------------------------
|
| 384 |
+
|
| 385 |
+
--
|
| 386 |
+
-- Table structure for table `regions`
|
| 387 |
+
--
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
| 391 |
+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
| 392 |
+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
database/icfp_1/link.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://www.classes.cs.uchicago.edu/archive/2015/spring/23500-1/hw3.html
|
database/loan_1/schema.sql
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CREATE TABLE bank (
|
| 2 |
+
branch_ID int PRIMARY KEY,
|
| 3 |
+
bname varchar(20),
|
| 4 |
+
no_of_customers int,
|
| 5 |
+
city varchar(10),
|
| 6 |
+
state varchar(20));
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
CREATE TABLE customer (
|
| 10 |
+
cust_ID varchar(3) PRIMARY KEY,
|
| 11 |
+
cust_name varchar(20),
|
| 12 |
+
acc_type char(1),
|
| 13 |
+
acc_bal int,
|
| 14 |
+
no_of_loans int,
|
| 15 |
+
credit_score int,
|
| 16 |
+
branch_ID int,
|
| 17 |
+
state varchar(20),
|
| 18 |
+
FOREIGN KEY(branch_ID) REFERENCES bank(branch_ID));
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
CREATE TABLE loan (
|
| 22 |
+
loan_ID varchar(3) PRIMARY KEY,
|
| 23 |
+
loan_type varchar(15),
|
| 24 |
+
cust_ID varchar(3),
|
| 25 |
+
branch_ID varchar(3),
|
| 26 |
+
amount int,
|
| 27 |
+
FOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),
|
| 28 |
+
FOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID));
|
| 29 |
+
|
| 30 |
+
insert into bank values (1, 'morningside', 203, 'New York City', 'New York');
|
| 31 |
+
insert into bank values (2, 'downtown', 123, 'Salt Lake City', 'Utah');
|
| 32 |
+
insert into bank values (3, 'broadway', 453, 'New York City', 'New York');
|
| 33 |
+
insert into bank values (4, 'high', 367, 'Austin', 'Texas');
|
| 34 |
+
|
| 35 |
+
insert into customer values (1, 'Mary', 'saving', 2000, 2, 30, 2, 'Utah');
|
| 36 |
+
insert into customer values (2, 'Jack', 'checking', 1000, 1, 20, 1, 'Texas');
|
| 37 |
+
insert into customer values (3, 'Owen', 'saving', 800000, 0, 210, 3, 'New York');
|
| 38 |
+
|
| 39 |
+
insert into loan values (1, 'Mortgages', 1, 1, 2050);
|
| 40 |
+
insert into loan values (2, 'Auto', 1, 2, 3000);
|
| 41 |
+
insert into loan values (3, 'Business', 3, 3, 5000);
|
database/movie_1/movie_1.sqlite
ADDED
|
Binary file (24.6 kB). View file
|
|
|
database/movie_1/schema.sql
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- dbext:type=SQLITE:dbname=movie_rating.db
|
| 2 |
+
|
| 3 |
+
/* Delete the tables if they already exist */
|
| 4 |
+
drop table if exists Movie;
|
| 5 |
+
drop table if exists Reviewer;
|
| 6 |
+
drop table if exists Rating;
|
| 7 |
+
|
| 8 |
+
/* Create the schema for our tables */
|
| 9 |
+
create table Movie(
|
| 10 |
+
mID int primary key,
|
| 11 |
+
title text,
|
| 12 |
+
year int,
|
| 13 |
+
director text
|
| 14 |
+
);
|
| 15 |
+
create table Reviewer(
|
| 16 |
+
rID int primary key,
|
| 17 |
+
name text);
|
| 18 |
+
|
| 19 |
+
create table Rating(
|
| 20 |
+
rID int,
|
| 21 |
+
mID int,
|
| 22 |
+
stars int,
|
| 23 |
+
ratingDate date,
|
| 24 |
+
FOREIGN KEY (mID) references Movie(mID),
|
| 25 |
+
FOREIGN KEY (rID) references Reviewer(rID)
|
| 26 |
+
);
|
| 27 |
+
|
| 28 |
+
/* Populate the tables with our data */
|
| 29 |
+
insert into Movie values(101, 'Gone with the Wind', 1939, 'Victor Fleming');
|
| 30 |
+
insert into Movie values(102, 'Star Wars', 1977, 'George Lucas');
|
| 31 |
+
insert into Movie values(103, 'The Sound of Music', 1965, 'Robert Wise');
|
| 32 |
+
insert into Movie values(104, 'E.T.', 1982, 'Steven Spielberg');
|
| 33 |
+
insert into Movie values(105, 'Titanic', 1997, 'James Cameron');
|
| 34 |
+
insert into Movie values(106, 'Snow White', 1937, null);
|
| 35 |
+
insert into Movie values(107, 'Avatar', 2009, 'James Cameron');
|
| 36 |
+
insert into Movie values(108, 'Raiders of the Lost Ark', 1981, 'Steven Spielberg');
|
| 37 |
+
|
| 38 |
+
insert into Reviewer values(201, 'Sarah Martinez');
|
| 39 |
+
insert into Reviewer values(202, 'Daniel Lewis');
|
| 40 |
+
insert into Reviewer values(203, 'Brittany Harris');
|
| 41 |
+
insert into Reviewer values(204, 'Mike Anderson');
|
| 42 |
+
insert into Reviewer values(205, 'Chris Jackson');
|
| 43 |
+
insert into Reviewer values(206, 'Elizabeth Thomas');
|
| 44 |
+
insert into Reviewer values(207, 'James Cameron');
|
| 45 |
+
insert into Reviewer values(208, 'Ashley White');
|
| 46 |
+
|
| 47 |
+
insert into Rating values(201, 101, 2, '2011-01-22');
|
| 48 |
+
insert into Rating values(201, 101, 4, '2011-01-27');
|
| 49 |
+
insert into Rating values(202, 106, 4, null);
|
| 50 |
+
insert into Rating values(203, 103, 2, '2011-01-20');
|
| 51 |
+
insert into Rating values(203, 108, 4, '2011-01-12');
|
| 52 |
+
insert into Rating values(203, 108, 2, '2011-01-30');
|
| 53 |
+
insert into Rating values(204, 101, 3, '2011-01-09');
|
| 54 |
+
insert into Rating values(205, 103, 3, '2011-01-27');
|
| 55 |
+
insert into Rating values(205, 104, 2, '2011-01-22');
|
| 56 |
+
insert into Rating values(205, 108, 4, null);
|
| 57 |
+
insert into Rating values(206, 107, 3, '2011-01-15');
|
| 58 |
+
insert into Rating values(206, 106, 5, '2011-01-19');
|
| 59 |
+
insert into Rating values(207, 107, 5, '2011-01-20');
|
| 60 |
+
insert into Rating values(208, 104, 3, '2011-01-02');
|
database/musical/schema.sql
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PRAGMA foreign_keys = ON;
|
| 2 |
+
|
| 3 |
+
CREATE TABLE "musical" (
|
| 4 |
+
"Musical_ID" int,
|
| 5 |
+
"Name" text,
|
| 6 |
+
"Year" int,
|
| 7 |
+
"Award" text,
|
| 8 |
+
"Category" text,
|
| 9 |
+
"Nominee" text,
|
| 10 |
+
"Result" text,
|
| 11 |
+
PRIMARY KEY ("Musical_ID")
|
| 12 |
+
);
|
| 13 |
+
|
| 14 |
+
CREATE TABLE "actor" (
|
| 15 |
+
"Actor_ID" int,
|
| 16 |
+
"Name" text,
|
| 17 |
+
"Musical_ID" int,
|
| 18 |
+
"Character" text,
|
| 19 |
+
"Duration" text,
|
| 20 |
+
"age" int,
|
| 21 |
+
PRIMARY KEY ("Actor_ID"),
|
| 22 |
+
FOREIGN KEY ("Musical_ID") REFERENCES "actor"("Actor_ID")
|
| 23 |
+
);
|
| 24 |
+
|
| 25 |
+
INSERT INTO "musical" VALUES (1,"The Phantom of the Opera","1986","Tony Award","Best Book of a Musical","Bob Fosse","Nominated");
|
| 26 |
+
INSERT INTO "musical" VALUES (2,"Les Misérables","1986","Tony Award","Best Performance by a Leading Actor in a Musical","Cleavant Derricks","Nominated");
|
| 27 |
+
INSERT INTO "musical" VALUES (3,"Wicked","1986","Tony Award","Best Direction of a Musical","Bob Fosse","Nominated");
|
| 28 |
+
INSERT INTO "musical" VALUES (4,"West Side Story","1986","Tony Award","Best Choreography","Bob Fosse","Won");
|
| 29 |
+
INSERT INTO "musical" VALUES (5,"Rent","1986","Drama Desk Award","Outstanding Actor in a Musical","Cleavant Derricks","Nominated");
|
| 30 |
+
INSERT INTO "musical" VALUES (6,"The Book of Mormon","1986","Drama Desk Award","Outstanding Director of a Musical","Bob Fosse","Nominated");
|
| 31 |
+
INSERT INTO "musical" VALUES (7,"Chicago","1986","Drama Desk Award","Outstanding Choreography","Bob Fosse","Won");
|
| 32 |
+
|
| 33 |
+
INSERT INTO "actor" VALUES (1,"Ray Meagher",1,"Alf Stewart","1988—","26");
|
| 34 |
+
INSERT INTO "actor" VALUES (2,"Tom Oliver",1,"Lou Carpenter","1988, 1992—","22");
|
| 35 |
+
INSERT INTO "actor" VALUES (3,"Lynne McGranger",2,"Irene Roberts","1993—","21");
|
| 36 |
+
INSERT INTO "actor" VALUES (4,"Kate Ritchie",2,"Sally Fletcher","1988–2008, 2013","20");
|
| 37 |
+
INSERT INTO "actor" VALUES (5,"Alan Fletcher",4,"Karl Kennedy","1994—","20");
|
| 38 |
+
INSERT INTO "actor" VALUES (6,"Jackie Woodburne",6,"Susan Kennedy","1994—","20");
|
| 39 |
+
INSERT INTO "actor" VALUES (7,"Ryan Moloney",6,"Toadfish Rebecchi","1995, 1996—","18");
|
| 40 |
+
INSERT INTO "actor" VALUES (8,"Ian Smith",6,"Harold Bishop","1987–1991, 1996–2009, 2011","17");
|
| 41 |
+
INSERT INTO "actor" VALUES (9,"Stefan Dennis",6,"Paul Robinson","1985–1992, 1993, 2004—","17");
|
| 42 |
+
|
database/performance_attendance/performance_attendance.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/pets_1/schema.sql
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 Has_Pet (
|
| 13 |
+
StuID INTEGER,
|
| 14 |
+
PetID INTEGER,
|
| 15 |
+
FOREIGN KEY(PetID) REFERENCES Pets(PetID),
|
| 16 |
+
FOREIGN KEY(StuID) REFERENCES Student(StuID)
|
| 17 |
+
);
|
| 18 |
+
|
| 19 |
+
create table Pets (
|
| 20 |
+
PetID INTEGER PRIMARY KEY,
|
| 21 |
+
PetType VARCHAR(20),
|
| 22 |
+
pet_age INTEGER,
|
| 23 |
+
weight REAL
|
| 24 |
+
);
|
| 25 |
+
|
| 26 |
+
insert into Student values ( 1001, 'Smith', 'Linda', 18, 'F', 600, 1121,'BAL');
|
| 27 |
+
insert into Student values ( 1002, 'Kim', 'Tracy', 19, 'F', 600, 7712,'HKG');
|
| 28 |
+
insert into Student values ( 1003, 'Jones', 'Shiela', 21, 'F', 600, 7792,'WAS');
|
| 29 |
+
insert into Student values ( 1004, 'Kumar', 'Dinesh', 20, 'M', 600, 8423,'CHI');
|
| 30 |
+
insert into Student values ( 1005, 'Gompers', 'Paul', 26, 'M', 600, 1121,'YYZ');
|
| 31 |
+
insert into Student values ( 1006, 'Schultz', 'Andy', 18, 'M', 600, 1148,'BAL');
|
| 32 |
+
insert into Student values ( 1007, 'Apap', 'Lisa', 18, 'F', 600, 8918,'PIT');
|
| 33 |
+
insert into Student values ( 1008, 'Nelson', 'Jandy', 20, 'F', 600, 9172,'BAL');
|
| 34 |
+
insert into Student values ( 1009, 'Tai', 'Eric', 19, 'M', 600, 2192,'YYZ');
|
| 35 |
+
insert into Student values ( 1010, 'Lee', 'Derek', 17, 'M', 600, 2192,'HOU');
|
| 36 |
+
insert into Student values ( 1011, 'Adams', 'David', 22, 'M', 600, 1148,'PHL');
|
| 37 |
+
insert into Student values ( 1012, 'Davis', 'Steven', 20, 'M', 600, 7723,'PIT');
|
| 38 |
+
insert into Student values ( 1014, 'Norris', 'Charles', 18, 'M', 600, 8741, 'DAL');
|
| 39 |
+
insert into Student values ( 1015, 'Lee', 'Susan', 16, 'F', 600, 8721,'HKG');
|
| 40 |
+
insert into Student values ( 1016, 'Schwartz', 'Mark', 17, 'M', 600, 2192,'DET');
|
| 41 |
+
insert into Student values ( 1017, 'Wilson', 'Bruce', 27, 'M', 600, 1148,'LON');
|
| 42 |
+
insert into Student values ( 1018, 'Leighton', 'Michael', 20, 'M', 600, 1121, 'PIT');
|
| 43 |
+
insert into Student values ( 1019, 'Pang', 'Arthur', 18, 'M', 600, 2192,'WAS');
|
| 44 |
+
insert into Student values ( 1020, 'Thornton', 'Ian', 22, 'M', 520, 7271,'NYC');
|
| 45 |
+
insert into Student values ( 1021, 'Andreou', 'George', 19, 'M', 520, 8722, 'NYC');
|
| 46 |
+
insert into Student values ( 1022, 'Woods', 'Michael', 17, 'M', 540, 8722,'PHL');
|
| 47 |
+
insert into Student values ( 1023, 'Shieber', 'David', 20, 'M', 520, 8722,'NYC');
|
| 48 |
+
insert into Student values ( 1024, 'Prater', 'Stacy', 18, 'F', 540, 7271,'BAL');
|
| 49 |
+
insert into Student values ( 1025, 'Goldman', 'Mark', 18, 'M', 520, 7134,'PIT');
|
| 50 |
+
insert into Student values ( 1026, 'Pang', 'Eric', 19, 'M', 520, 7134,'HKG');
|
| 51 |
+
insert into Student values ( 1027, 'Brody', 'Paul', 18, 'M', 520, 8723,'LOS');
|
| 52 |
+
insert into Student values ( 1028, 'Rugh', 'Eric', 20, 'M', 550, 2311,'ROC');
|
| 53 |
+
insert into Student values ( 1029, 'Han', 'Jun', 17, 'M', 100, 2311,'PEK');
|
| 54 |
+
insert into Student values ( 1030, 'Cheng', 'Lisa', 21, 'F', 550, 2311,'SFO');
|
| 55 |
+
insert into Student values ( 1031, 'Smith', 'Sarah', 20, 'F', 550, 8772,'PHL');
|
| 56 |
+
insert into Student values ( 1032, 'Brown', 'Eric', 20, 'M', 550, 8772,'ATL');
|
| 57 |
+
insert into Student values ( 1033, 'Simms', 'William', 18, 'M', 550, 8772,'NAR');
|
| 58 |
+
insert into Student values ( 1034, 'Epp', 'Eric', 18, 'M', 050, 5718,'BOS');
|
| 59 |
+
insert into Student values ( 1035, 'Schmidt', 'Sarah', 26, 'F', 050, 5718,'WAS');
|
| 60 |
+
|
| 61 |
+
insert into Has_Pet values ( 1001, 2001 );
|
| 62 |
+
insert into Has_Pet values ( 1002, 2002 );
|
| 63 |
+
insert into Has_Pet values ( 1002, 2003 );
|
| 64 |
+
|
| 65 |
+
insert into Pets values ( 2001, 'cat', 3, 12);
|
| 66 |
+
insert into Pets values ( 2002, 'dog', 2, 13.4);
|
| 67 |
+
insert into Pets values ( 2003, 'dog', 1, 9.3);
|
| 68 |
+
|
database/railway/schema.sql
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
PRAGMA foreign_keys = ON;
|
| 3 |
+
|
| 4 |
+
CREATE TABLE "railway" (
|
| 5 |
+
"Railway_ID" int,
|
| 6 |
+
"Railway" text,
|
| 7 |
+
"Builder" text,
|
| 8 |
+
"Built" text,
|
| 9 |
+
"Wheels" text,
|
| 10 |
+
"Location" text,
|
| 11 |
+
"ObjectNumber" text,
|
| 12 |
+
PRIMARY KEY ("Railway_ID")
|
| 13 |
+
);
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
INSERT INTO "railway" VALUES (1,"SECR","SECR Ashford","1901","4-4-0","York","1975-7006");
|
| 18 |
+
INSERT INTO "railway" VALUES (2,"MR","MR Derby","1902 Midland Railway 1000 was rebuilt in 1914.","4-4-0","Bo'ness","1975-7018");
|
| 19 |
+
INSERT INTO "railway" VALUES (3,"GNRD","GNR Doncaster","1902","4-4-2","Barrow Hill","1975-7005");
|
| 20 |
+
INSERT INTO "railway" VALUES (4,"GWRS","GWR Swindon","1903","4-4-0","Toddington","1978-7025");
|
| 21 |
+
INSERT INTO "railway" VALUES (5,"GERSt","GER Stratford","1904","0-6-0T","Bressingham","1975-7003");
|
| 22 |
+
INSERT INTO "railway" VALUES (6,"GERHt","GER Hartford","1905","0-6-0","Barrow Hill","1978-7026");
|
| 23 |
+
INSERT INTO "railway" VALUES (7,"GWRSn","GWR Swindon","1905","2-8-0","Shildon","1976-7001");
|
| 24 |
+
INSERT INTO "railway" VALUES (8,"GWRWk","Swindon Works","1907","4-6-0","Swindon","1978-7027");
|
| 25 |
+
INSERT INTO "railway" VALUES (9,"LTSR","Stephenson","1909","4-4-2T","Bressingham","1978-7028");
|
| 26 |
+
INSERT INTO "railway" VALUES (10,"Longmoor","Avonside","1910","0-6-0ST","Basingstoke","2008-7159");
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
CREATE TABLE "train" (
|
| 31 |
+
"Train_ID" int,
|
| 32 |
+
"Train_Num" text,
|
| 33 |
+
"Name" text,
|
| 34 |
+
"From" text,
|
| 35 |
+
"Arrival" text,
|
| 36 |
+
"Railway_ID" int,
|
| 37 |
+
PRIMARY KEY ("Train_ID"),
|
| 38 |
+
FOREIGN KEY ("Railway_ID") REFERENCES `railway`("Railway_ID")
|
| 39 |
+
);
|
| 40 |
+
|
| 41 |
+
INSERT INTO "train" VALUES (1,"51195","Wardha-Ballarshah Pass","Wardha","08:54",1);
|
| 42 |
+
INSERT INTO "train" VALUES (2,"12139","Sewagram Exp","Mumbai CST","09:08",1);
|
| 43 |
+
INSERT INTO "train" VALUES (3,"12140","Ballarshah-Mumbai Pass","Ballarshah","09:48",2);
|
| 44 |
+
INSERT INTO "train" VALUES (4,"57135","Nagpur-Kazipet Pass","Nagpur","23:44",3);
|
| 45 |
+
INSERT INTO "train" VALUES (5,"57136","Kazipet-Nagpur Pass","Kazipet","05:09",5);
|
| 46 |
+
INSERT INTO "train" VALUES (6,"16094","Lucknow-Chennai Exp","Lucknow","13:04",5);
|
| 47 |
+
INSERT INTO "train" VALUES (7,"16032","Andaman Exp","Jammu Tawi","13:04",7);
|
| 48 |
+
INSERT INTO "train" VALUES (8,"16031","Andaman Exp","Chennai","23:39",9);
|
| 49 |
+
INSERT INTO "train" VALUES (9,"11401","Nandigram Exp","Mumbai CST","13:28",10);
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
CREATE TABLE "manager" (
|
| 54 |
+
"Manager_ID" int,
|
| 55 |
+
"Name" text,
|
| 56 |
+
"Country" text,
|
| 57 |
+
"Working_year_starts" text,
|
| 58 |
+
"Age" int,
|
| 59 |
+
"Level" int,
|
| 60 |
+
PRIMARY KEY ("Manager_ID")
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
INSERT INTO "manager" VALUES (1,"Ben Curtis","United States","2003","45","5");
|
| 64 |
+
INSERT INTO "manager" VALUES (2,"Todd Hamilton","United States","2004","55","5");
|
| 65 |
+
INSERT INTO "manager" VALUES (3,"Tiger Woods","United States","2006","46","5");
|
| 66 |
+
INSERT INTO "manager" VALUES (4,"David Duval","United States","2001","47","7");
|
| 67 |
+
INSERT INTO "manager" VALUES (5,"Sandy Lyle","Scotland","1985","48","8");
|
| 68 |
+
INSERT INTO "manager" VALUES (6,"Nick Faldo","England","1999","51","11");
|
| 69 |
+
INSERT INTO "manager" VALUES (7,"Greg Norman","Australia","1993","52","12");
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
CREATE TABLE "railway_manage" (
|
| 74 |
+
"Railway_ID" int,
|
| 75 |
+
"Manager_ID" int,
|
| 76 |
+
"From_Year" text,
|
| 77 |
+
PRIMARY KEY ("Railway_ID","Manager_ID"),
|
| 78 |
+
FOREIGN KEY ("Manager_ID") REFERENCES "manager"("Manager_ID"),
|
| 79 |
+
FOREIGN KEY ("Railway_ID") REFERENCES "railway"("Railway_ID")
|
| 80 |
+
);
|
| 81 |
+
|
| 82 |
+
INSERT INTO "railway_manage" VALUES (8,1,"2010");
|
| 83 |
+
INSERT INTO "railway_manage" VALUES (9,2,"2011");
|
| 84 |
+
INSERT INTO "railway_manage" VALUES (7,3,"2012");
|
| 85 |
+
INSERT INTO "railway_manage" VALUES (2,4,"2013");
|
| 86 |
+
|
database/shop_membership/shop_membership.sqlite
ADDED
|
Binary file (36.9 kB). View file
|
|
|
database/wedding/wedding.sqlite
ADDED
|
Binary file (28.7 kB). View file
|
|
|
database/wta_1/wta_1.sql
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CRloser_rank_pointsEATE TABLE players(
|
| 2 |
+
"player_id" INT PRIMARY KEY,
|
| 3 |
+
"first_name" TEXT,
|
| 4 |
+
"last_name" TEXT,
|
| 5 |
+
"hand" TEXT,
|
| 6 |
+
"birth_date" DATE,
|
| 7 |
+
"country_code" TEXT
|
| 8 |
+
);
|
| 9 |
+
CREATE TABLE matches(
|
| 10 |
+
"best_of" INT,
|
| 11 |
+
"draw_size" INT,
|
| 12 |
+
"loser_age" FLOAT,
|
| 13 |
+
"loser_entry" TEXT,
|
| 14 |
+
"loser_hand" TEXT,
|
| 15 |
+
"loser_ht" INT,
|
| 16 |
+
"loser_id" INT,
|
| 17 |
+
"loser_ioc" TEXT,
|
| 18 |
+
"loser_name" TEXT,
|
| 19 |
+
"loser_rank" INT,
|
| 20 |
+
"loser_rank_points" INT,
|
| 21 |
+
"loser_seed" INT,
|
| 22 |
+
"match_num" INT,
|
| 23 |
+
"minutes" INT,
|
| 24 |
+
"round" TEXT,
|
| 25 |
+
"score" TEXT,
|
| 26 |
+
"surface" TEXT,
|
| 27 |
+
"tourney_date" DATE,
|
| 28 |
+
"tourney_id" TEXT,
|
| 29 |
+
"tourney_level" TEXT,
|
| 30 |
+
"tourney_name" TEXT,
|
| 31 |
+
"winner_age" FLOAT,
|
| 32 |
+
"winner_entry" TEXT,
|
| 33 |
+
"winner_hand" TEXT,
|
| 34 |
+
"winner_ht" INT,
|
| 35 |
+
"winner_id" INT,
|
| 36 |
+
"winner_ioc" TEXT,
|
| 37 |
+
"winner_name" TEXT,
|
| 38 |
+
"winner_rank" INT,
|
| 39 |
+
"winner_rank_points" INT,
|
| 40 |
+
"winner_seed" INT,
|
| 41 |
+
"year" INT,
|
| 42 |
+
FOREIGN KEY(loser_id) REFERENCES players(player_id),
|
| 43 |
+
FOREIGN KEY(winner_id) REFERENCES players(player_id)
|
| 44 |
+
);
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
CREATE TABLE qualifying_matches(
|
| 49 |
+
"best_of" INT,
|
| 50 |
+
"draw_size" INT,
|
| 51 |
+
"l_1stIn" TEXT,
|
| 52 |
+
"l_1stWon" TEXT,
|
| 53 |
+
"l_2ndWon" TEXT,
|
| 54 |
+
"l_SvGms" TEXT,
|
| 55 |
+
"l_ace" TEXT,
|
| 56 |
+
"l_bpFaced" TEXT,
|
| 57 |
+
"l_bpSaved" TEXT,
|
| 58 |
+
"l_df" TEXT,
|
| 59 |
+
"l_svpt" TEXT,
|
| 60 |
+
"loser_age" FLOAT,
|
| 61 |
+
"loser_entry" TEXT,
|
| 62 |
+
"loser_hand" TEXT,
|
| 63 |
+
"loser_ht" INT,
|
| 64 |
+
"loser_id" INT,
|
| 65 |
+
"loser_ioc" TEXT,
|
| 66 |
+
"loser_name" TEXT,
|
| 67 |
+
"loser_rank" INT,
|
| 68 |
+
"loser_rank_points" INT,
|
| 69 |
+
"loser_seed" INT,
|
| 70 |
+
"match_num" INT,
|
| 71 |
+
"minutes" INT,
|
| 72 |
+
"round" TEXT,
|
| 73 |
+
"score" TEXT,
|
| 74 |
+
"surface" TEXT,
|
| 75 |
+
"tourney_date" DATE,
|
| 76 |
+
"tourney_id" TEXT,
|
| 77 |
+
"tourney_level" TEXT,
|
| 78 |
+
"tourney_name" TEXT,
|
| 79 |
+
"w_1stIn" TEXT,
|
| 80 |
+
"w_1stWon" TEXT,
|
| 81 |
+
"w_2ndWon" TEXT,
|
| 82 |
+
"w_SvGms" TEXT,
|
| 83 |
+
"w_ace" TEXT,
|
| 84 |
+
"w_bpFaced" TEXT,
|
| 85 |
+
"w_bpSaved" TEXT,
|
| 86 |
+
"w_df" TEXT,
|
| 87 |
+
"w_svpt" TEXT,
|
| 88 |
+
"winner_age" FLOAT,
|
| 89 |
+
"winner_entry" TEXT,
|
| 90 |
+
"winner_hand" TEXT,
|
| 91 |
+
"winner_ht" INT,
|
| 92 |
+
"winner_id" INT,
|
| 93 |
+
"winner_ioc" TEXT,
|
| 94 |
+
"winner_name" TEXT,
|
| 95 |
+
"winner_rank" INT,
|
| 96 |
+
"winner_rank_points" INT,
|
| 97 |
+
"winner_seed" INT,
|
| 98 |
+
"year" INT,
|
| 99 |
+
FOREIGN KEY(loser_id) REFERENCES players(player_id),
|
| 100 |
+
FOREIGN KEY(winner_id) REFERENCES players(player_id)
|
| 101 |
+
);
|
| 102 |
+
|
| 103 |
+
CREATE TABLE rankings(
|
| 104 |
+
"ranking_date" DATE,
|
| 105 |
+
"ranking" INT,
|
| 106 |
+
"player_id" INT,
|
| 107 |
+
"ranking_points" INT,
|
| 108 |
+
"tours" INT,
|
| 109 |
+
FOREIGN KEY(player_id) REFERENCES players(player_id)
|
| 110 |
+
);
|
database/yelp/yelp.sqlite
ADDED
|
Binary file (61.4 kB). View file
|
|
|