db_id
stringlengths
4
28
tables
stringlengths
682
40.1k
schema
stringlengths
319
29.3k
description
stringclasses
1 value
language_corpus
{"langs": {"columns": [[0, "lid", "INTEGER", 0, null, 1], [1, "lang", "TEXT", 0, null, 0], [2, "locale", "TEXT", 0, null, 0], [3, "pages", "INTEGER", 0, "0", 0], [4, "words", "INTEGER", 0, "0", 0]], "primary_keys": ["lid"], "foreign_keys": [], "unique_constraints": [[[0, 2, "locale"]], [[0, 1, "lang"]]], "check_constraints": []}, "sqlite_sequence": {"columns": [[0, "name", "", 0, null, 0], [1, "seq", "", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "pages": {"columns": [[0, "pid", "INTEGER", 0, null, 1], [1, "lid", "INTEGER", 0, null, 0], [2, "page", "INTEGER", 0, "NULL", 0], [3, "revision", "INTEGER", 0, "NULL", 0], [4, "title", "TEXT", 0, null, 0], [5, "words", "INTEGER", 0, "0", 0]], "primary_keys": ["pid"], "foreign_keys": [[0, 0, "langs", "lid", "lid", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 1, "lid"], [1, 2, "page"], [2, 4, "title"]]], "check_constraints": []}, "words": {"columns": [[0, "wid", "INTEGER", 0, null, 1], [1, "word", "TEXT", 0, null, 0], [2, "occurrences", "INTEGER", 0, "0", 0]], "primary_keys": ["wid"], "foreign_keys": [], "unique_constraints": [[[0, 1, "word"]]], "check_constraints": []}, "langs_words": {"columns": [[0, "lid", "INTEGER", 1, null, 1], [1, "wid", "INTEGER", 1, null, 2], [2, "occurrences", "INTEGER", 0, null, 0]], "primary_keys": ["lid", "wid"], "foreign_keys": [[0, 0, "words", "wid", "wid", "CASCADE", "CASCADE", "NONE"], [1, 0, "langs", "lid", "lid", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "lid"], [1, 1, "wid"]]], "check_constraints": []}, "pages_words": {"columns": [[0, "pid", "INTEGER", 1, null, 1], [1, "wid", "INTEGER", 1, null, 2], [2, "occurrences", "INTEGER", 0, "0", 0]], "primary_keys": ["pid", "wid"], "foreign_keys": [[0, 0, "words", "wid", "wid", "CASCADE", "CASCADE", "NONE"], [1, 0, "pages", "pid", "pid", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "pid"], [1, 1, "wid"]]], "check_constraints": []}, "biwords": {"columns": [[0, "lid", "INTEGER", 1, null, 1], [1, "w1st", "INTEGER", 1, null, 2], [2, "w2nd", "INTEGER", 1, null, 3], [3, "occurrences", "INTEGER", 0, "0", 0]], "primary_keys": ["lid", "w1st", "w2nd"], "foreign_keys": [[0, 0, "words", "w2nd", "wid", "CASCADE", "CASCADE", "NONE"], [1, 0, "words", "w1st", "wid", "CASCADE", "CASCADE", "NONE"], [2, 0, "langs", "lid", "lid", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "lid"], [1, 1, "w1st"], [2, 2, "w2nd"]]], "check_constraints": []}}
CREATE TABLE langs ( lid INTEGER PRIMARY KEY, lang TEXT, locale TEXT, pages INTEGER DEFAULT 0, words INTEGER DEFAULT 0, UNIQUE (locale), UNIQUE (lang) ); CREATE TABLE sqlite_sequence ( name, seq ); CREATE TABLE pages ( pid INTEGER PRIMARY KEY, lid INTEGER, page INTEGER DEFAULT NULL, revision INTEGER DEFAULT NULL, title TEXT, words INTEGER DEFAULT 0, UNIQUE (lid, page, title), FOREIGN KEY (lid) REFERENCES langs(lid) ); CREATE TABLE words ( wid INTEGER PRIMARY KEY, word TEXT, occurrences INTEGER DEFAULT 0, UNIQUE (word) ); CREATE TABLE langs_words ( lid INTEGER NOT NULL PRIMARY KEY, wid INTEGER NOT NULL PRIMARY KEY, occurrences INTEGER, PRIMARY KEY (lid, wid), UNIQUE (lid, wid), FOREIGN KEY (wid) REFERENCES words(wid), FOREIGN KEY (lid) REFERENCES langs(lid) ); CREATE TABLE pages_words ( pid INTEGER NOT NULL PRIMARY KEY, wid INTEGER NOT NULL PRIMARY KEY, occurrences INTEGER DEFAULT 0, PRIMARY KEY (pid, wid), UNIQUE (pid, wid), FOREIGN KEY (wid) REFERENCES words(wid), FOREIGN KEY (pid) REFERENCES pages(pid) ); CREATE TABLE biwords ( lid INTEGER NOT NULL PRIMARY KEY, w1st INTEGER NOT NULL PRIMARY KEY, w2nd INTEGER NOT NULL PRIMARY KEY, occurrences INTEGER DEFAULT 0, PRIMARY KEY (lid, w1st, w2nd), UNIQUE (lid, w1st, w2nd), FOREIGN KEY (w2nd) REFERENCES words(wid), FOREIGN KEY (w1st) REFERENCES words(wid), FOREIGN KEY (lid) REFERENCES langs(lid) );
mental_health_survey
{"Question": {"columns": [[0, "questiontext", "TEXT", 0, null, 0], [1, "questionid", "INTEGER", 0, null, 1]], "primary_keys": ["questionid"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Survey": {"columns": [[0, "SurveyID", "INTEGER", 0, null, 1], [1, "Description", "TEXT", 0, null, 0]], "primary_keys": ["SurveyID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Answer": {"columns": [[0, "AnswerText", "TEXT", 0, null, 0], [1, "SurveyID", "INTEGER", 0, null, 0], [2, "UserID", "INTEGER", 0, null, 1], [3, "QuestionID", "INTEGER", 0, null, 2]], "primary_keys": ["UserID", "QuestionID"], "foreign_keys": [[0, 0, "Question", "QuestionID", null, "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Survey", "SurveyID", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 2, "UserID"], [1, 3, "QuestionID"]]], "check_constraints": []}}
CREATE TABLE Question ( questiontext TEXT, questionid INTEGER PRIMARY KEY ); CREATE TABLE Survey ( SurveyID INTEGER PRIMARY KEY, Description TEXT ); CREATE TABLE Answer ( AnswerText TEXT, SurveyID INTEGER, UserID INTEGER PRIMARY KEY, QuestionID INTEGER PRIMARY KEY, PRIMARY KEY (UserID, QuestionID), UNIQUE (UserID, QuestionID), FOREIGN KEY (QuestionID) REFERENCES Question(None), FOREIGN KEY (SurveyID) REFERENCES Survey(None) );
sales_in_weather
{"sales_in_weather": {"columns": [[0, "date", "DATE", 0, null, 2], [1, "store_nbr", "INTEGER", 0, null, 1], [2, "item_nbr", "INTEGER", 0, null, 3], [3, "units", "INTEGER", 0, null, 0]], "primary_keys": ["date", "store_nbr", "item_nbr"], "foreign_keys": [], "unique_constraints": [[[0, 1, "store_nbr"], [1, 0, "date"], [2, 2, "item_nbr"]]], "check_constraints": []}, "weather": {"columns": [[0, "station_nbr", "INTEGER", 0, null, 1], [1, "date", "DATE", 0, null, 2], [2, "tmax", "INTEGER", 0, null, 0], [3, "tmin", "INTEGER", 0, null, 0], [4, "tavg", "INTEGER", 0, null, 0], [5, "depart", "INTEGER", 0, null, 0], [6, "dewpoint", "INTEGER", 0, null, 0], [7, "wetbulb", "INTEGER", 0, null, 0], [8, "heat", "INTEGER", 0, null, 0], [9, "cool", "INTEGER", 0, null, 0], [10, "sunrise", "TEXT", 0, null, 0], [11, "sunset", "TEXT", 0, null, 0], [12, "codesum", "TEXT", 0, null, 0], [13, "snowfall", "REAL", 0, null, 0], [14, "preciptotal", "REAL", 0, null, 0], [15, "stnpressure", "REAL", 0, null, 0], [16, "sealevel", "REAL", 0, null, 0], [17, "resultspeed", "REAL", 0, null, 0], [18, "resultdir", "INTEGER", 0, null, 0], [19, "avgspeed", "REAL", 0, null, 0]], "primary_keys": ["station_nbr", "date"], "foreign_keys": [], "unique_constraints": [[[0, 0, "station_nbr"], [1, 1, "date"]]], "check_constraints": []}, "relation": {"columns": [[0, "store_nbr", "INTEGER", 0, null, 1], [1, "station_nbr", "INTEGER", 0, null, 0]], "primary_keys": ["store_nbr"], "foreign_keys": [[0, 0, "weather", "station_nbr", "station_nbr", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "sales_in_weather", "store_nbr", "store_nbr", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE sales_in_weather ( date DATE PRIMARY KEY, store_nbr INTEGER PRIMARY KEY, item_nbr INTEGER PRIMARY KEY, units INTEGER, PRIMARY KEY (date, store_nbr, item_nbr), UNIQUE (store_nbr, date, item_nbr) ); CREATE TABLE weather ( station_nbr INTEGER PRIMARY KEY, date DATE PRIMARY KEY, tmax INTEGER, tmin INTEGER, tavg INTEGER, depart INTEGER, dewpoint INTEGER, wetbulb INTEGER, heat INTEGER, cool INTEGER, sunrise TEXT, sunset TEXT, codesum TEXT, snowfall REAL, preciptotal REAL, stnpressure REAL, sealevel REAL, resultspeed REAL, resultdir INTEGER, avgspeed REAL, PRIMARY KEY (station_nbr, date), UNIQUE (station_nbr, date) ); CREATE TABLE relation ( store_nbr INTEGER PRIMARY KEY, station_nbr INTEGER, FOREIGN KEY (station_nbr) REFERENCES weather(station_nbr), FOREIGN KEY (store_nbr) REFERENCES sales_in_weather(store_nbr) );
synthea
{"all_prevalences": {"columns": [[0, "ITEM", "TEXT", 0, null, 1], [1, "POPULATION TYPE", "TEXT", 0, null, 0], [2, "OCCURRENCES", "INTEGER", 0, null, 0], [3, "POPULATION COUNT", "INTEGER", 0, null, 0], [4, "PREVALENCE RATE", "REAL", 0, null, 0], [5, "PREVALENCE PERCENTAGE", "REAL", 0, null, 0]], "primary_keys": ["ITEM"], "foreign_keys": [], "unique_constraints": [[[0, 0, "ITEM"]]], "check_constraints": []}, "patients": {"columns": [[0, "patient", "TEXT", 0, null, 1], [1, "birthdate", "DATE", 0, null, 0], [2, "deathdate", "DATE", 0, null, 0], [3, "ssn", "TEXT", 0, null, 0], [4, "drivers", "TEXT", 0, null, 0], [5, "passport", "TEXT", 0, null, 0], [6, "prefix", "TEXT", 0, null, 0], [7, "first", "TEXT", 0, null, 0], [8, "last", "TEXT", 0, null, 0], [9, "suffix", "TEXT", 0, null, 0], [10, "maiden", "TEXT", 0, null, 0], [11, "marital", "TEXT", 0, null, 0], [12, "race", "TEXT", 0, null, 0], [13, "ethnicity", "TEXT", 0, null, 0], [14, "gender", "TEXT", 0, null, 0], [15, "birthplace", "TEXT", 0, null, 0], [16, "address", "TEXT", 0, null, 0]], "primary_keys": ["patient"], "foreign_keys": [], "unique_constraints": [[[0, 0, "patient"]]], "check_constraints": []}, "encounters": {"columns": [[0, "ID", "TEXT", 0, null, 1], [1, "DATE", "DATE", 0, null, 0], [2, "PATIENT", "TEXT", 0, null, 0], [3, "CODE", "INTEGER", 0, null, 0], [4, "DESCRIPTION", "TEXT", 0, null, 0], [5, "REASONCODE", "INTEGER", 0, null, 0], [6, "REASONDESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": ["ID"], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "ID"]]], "check_constraints": []}, "allergies": {"columns": [[0, "START", "TEXT", 0, null, 0], [1, "STOP", "TEXT", 0, null, 0], [2, "PATIENT", "TEXT", 0, null, 1], [3, "ENCOUNTER", "TEXT", 0, null, 2], [4, "CODE", "INTEGER", 0, null, 3], [5, "DESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": ["PATIENT", "ENCOUNTER", "CODE"], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 2, "PATIENT"], [1, 3, "ENCOUNTER"], [2, 4, "CODE"]]], "check_constraints": []}, "careplans": {"columns": [[0, "ID", "TEXT", 0, null, 0], [1, "START", "DATE", 0, null, 0], [2, "STOP", "DATE", 0, null, 0], [3, "PATIENT", "TEXT", 0, null, 0], [4, "ENCOUNTER", "TEXT", 0, null, 0], [5, "CODE", "REAL", 0, null, 0], [6, "DESCRIPTION", "TEXT", 0, null, 0], [7, "REASONCODE", "INTEGER", 0, null, 0], [8, "REASONDESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "conditions": {"columns": [[0, "START", "DATE", 0, null, 0], [1, "STOP", "DATE", 0, null, 0], [2, "PATIENT", "TEXT", 0, null, 0], [3, "ENCOUNTER", "TEXT", 0, null, 0], [4, "CODE", "INTEGER", 0, null, 0], [5, "DESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "all_prevalences", "DESCRIPTION", "ITEM", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "immunizations": {"columns": [[0, "DATE", "DATE", 0, null, 1], [1, "PATIENT", "TEXT", 0, null, 2], [2, "ENCOUNTER", "TEXT", 0, null, 3], [3, "CODE", "INTEGER", 0, null, 4], [4, "DESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": ["DATE", "PATIENT", "ENCOUNTER", "CODE"], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "DATE"], [1, 1, "PATIENT"], [2, 2, "ENCOUNTER"], [3, 3, "CODE"]]], "check_constraints": []}, "medications": {"columns": [[0, "START", "DATE", 0, null, 1], [1, "STOP", "DATE", 0, null, 0], [2, "PATIENT", "TEXT", 0, null, 2], [3, "ENCOUNTER", "TEXT", 0, null, 3], [4, "CODE", "INTEGER", 0, null, 4], [5, "DESCRIPTION", "TEXT", 0, null, 0], [6, "REASONCODE", "INTEGER", 0, null, 0], [7, "REASONDESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": ["START", "PATIENT", "ENCOUNTER", "CODE"], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "START"], [1, 2, "PATIENT"], [2, 3, "ENCOUNTER"], [3, 4, "CODE"]]], "check_constraints": []}, "observations": {"columns": [[0, "DATE", "DATE", 0, null, 0], [1, "PATIENT", "TEXT", 0, null, 0], [2, "ENCOUNTER", "TEXT", 0, null, 0], [3, "CODE", "TEXT", 0, null, 0], [4, "DESCRIPTION", "TEXT", 0, null, 0], [5, "VALUE", "REAL", 0, null, 0], [6, "UNITS", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "procedures": {"columns": [[0, "DATE", "DATE", 0, null, 0], [1, "PATIENT", "TEXT", 0, null, 0], [2, "ENCOUNTER", "TEXT", 0, null, 0], [3, "CODE", "INTEGER", 0, null, 0], [4, "DESCRIPTION", "TEXT", 0, null, 0], [5, "REASONCODE", "INTEGER", 0, null, 0], [6, "REASONDESCRIPTION", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "patients", "PATIENT", "patient", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "encounters", "ENCOUNTER", "ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "claims": {"columns": [[0, "ID", "TEXT", 0, null, 1], [1, "PATIENT", "TEXT", 0, null, 0], [2, "BILLABLEPERIOD", "DATE", 0, null, 0], [3, "ORGANIZATION", "TEXT", 0, null, 0], [4, "ENCOUNTER", "TEXT", 0, null, 0], [5, "DIAGNOSIS", "TEXT", 0, null, 0], [6, "TOTAL", "INTEGER", 0, null, 0]], "primary_keys": ["ID"], "foreign_keys": [[0, 0, "encounters", "ENCOUNTER", null, "NO ACTION", "NO ACTION", "NONE"], [1, 0, "patients", "PATIENT", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "ID"]]], "check_constraints": []}}
CREATE TABLE all_prevalences ( ITEM TEXT PRIMARY KEY, POPULATION TYPE TEXT, OCCURRENCES INTEGER, POPULATION COUNT INTEGER, PREVALENCE RATE REAL, PREVALENCE PERCENTAGE REAL, UNIQUE (ITEM) ); CREATE TABLE patients ( patient TEXT PRIMARY KEY, birthdate DATE, deathdate DATE, ssn TEXT, drivers TEXT, passport TEXT, prefix TEXT, first TEXT, last TEXT, suffix TEXT, maiden TEXT, marital TEXT, race TEXT, ethnicity TEXT, gender TEXT, birthplace TEXT, address TEXT, UNIQUE (patient) ); CREATE TABLE encounters ( ID TEXT PRIMARY KEY, DATE DATE, PATIENT TEXT, CODE INTEGER, DESCRIPTION TEXT, REASONCODE INTEGER, REASONDESCRIPTION TEXT, UNIQUE (ID), FOREIGN KEY (PATIENT) REFERENCES patients(patient) ); CREATE TABLE allergies ( START TEXT, STOP TEXT, PATIENT TEXT PRIMARY KEY, ENCOUNTER TEXT PRIMARY KEY, CODE INTEGER PRIMARY KEY, DESCRIPTION TEXT, PRIMARY KEY (PATIENT, ENCOUNTER, CODE), UNIQUE (PATIENT, ENCOUNTER, CODE), FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE careplans ( ID TEXT, START DATE, STOP DATE, PATIENT TEXT, ENCOUNTER TEXT, CODE REAL, DESCRIPTION TEXT, REASONCODE INTEGER, REASONDESCRIPTION TEXT, FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE conditions ( START DATE, STOP DATE, PATIENT TEXT, ENCOUNTER TEXT, CODE INTEGER, DESCRIPTION TEXT, FOREIGN KEY (DESCRIPTION) REFERENCES all_prevalences(ITEM), FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE immunizations ( DATE DATE PRIMARY KEY, PATIENT TEXT PRIMARY KEY, ENCOUNTER TEXT PRIMARY KEY, CODE INTEGER PRIMARY KEY, DESCRIPTION TEXT, PRIMARY KEY (DATE, PATIENT, ENCOUNTER, CODE), UNIQUE (DATE, PATIENT, ENCOUNTER, CODE), FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE medications ( START DATE PRIMARY KEY, STOP DATE, PATIENT TEXT PRIMARY KEY, ENCOUNTER TEXT PRIMARY KEY, CODE INTEGER PRIMARY KEY, DESCRIPTION TEXT, REASONCODE INTEGER, REASONDESCRIPTION TEXT, PRIMARY KEY (START, PATIENT, ENCOUNTER, CODE), UNIQUE (START, PATIENT, ENCOUNTER, CODE), FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE observations ( DATE DATE, PATIENT TEXT, ENCOUNTER TEXT, CODE TEXT, DESCRIPTION TEXT, VALUE REAL, UNITS TEXT, FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE procedures ( DATE DATE, PATIENT TEXT, ENCOUNTER TEXT, CODE INTEGER, DESCRIPTION TEXT, REASONCODE INTEGER, REASONDESCRIPTION TEXT, FOREIGN KEY (PATIENT) REFERENCES patients(patient), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(ID) ); CREATE TABLE claims ( ID TEXT PRIMARY KEY, PATIENT TEXT, BILLABLEPERIOD DATE, ORGANIZATION TEXT, ENCOUNTER TEXT, DIAGNOSIS TEXT, TOTAL INTEGER, UNIQUE (ID), FOREIGN KEY (ENCOUNTER) REFERENCES encounters(None), FOREIGN KEY (PATIENT) REFERENCES patients(None) );
cookbook
{"Ingredient": {"columns": [[0, "ingredient_id", "INTEGER", 0, null, 1], [1, "category", "TEXT", 0, null, 0], [2, "name", "TEXT", 0, null, 0], [3, "plural", "TEXT", 0, null, 0]], "primary_keys": ["ingredient_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Recipe": {"columns": [[0, "recipe_id", "INTEGER", 0, null, 1], [1, "title", "TEXT", 0, null, 0], [2, "subtitle", "TEXT", 0, null, 0], [3, "servings", "INTEGER", 0, null, 0], [4, "yield_unit", "TEXT", 0, null, 0], [5, "prep_min", "INTEGER", 0, null, 0], [6, "cook_min", "INTEGER", 0, null, 0], [7, "stnd_min", "INTEGER", 0, null, 0], [8, "source", "TEXT", 0, null, 0], [9, "intro", "TEXT", 0, null, 0], [10, "directions", "TEXT", 0, null, 0]], "primary_keys": ["recipe_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Nutrition": {"columns": [[0, "recipe_id", "INTEGER", 0, null, 1], [1, "protein", "REAL", 0, null, 0], [2, "carbo", "REAL", 0, null, 0], [3, "alcohol", "REAL", 0, null, 0], [4, "total_fat", "REAL", 0, null, 0], [5, "sat_fat", "REAL", 0, null, 0], [6, "cholestrl", "REAL", 0, null, 0], [7, "sodium", "REAL", 0, null, 0], [8, "iron", "REAL", 0, null, 0], [9, "vitamin_c", "REAL", 0, null, 0], [10, "vitamin_a", "REAL", 0, null, 0], [11, "fiber", "REAL", 0, null, 0], [12, "pcnt_cal_carb", "REAL", 0, null, 0], [13, "pcnt_cal_fat", "REAL", 0, null, 0], [14, "pcnt_cal_prot", "REAL", 0, null, 0], [15, "calories", "REAL", 0, null, 0]], "primary_keys": ["recipe_id"], "foreign_keys": [[0, 0, "Recipe", "recipe_id", "recipe_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Quantity": {"columns": [[0, "quantity_id", "INTEGER", 0, null, 1], [1, "recipe_id", "INTEGER", 0, null, 0], [2, "ingredient_id", "INTEGER", 0, null, 0], [3, "max_qty", "REAL", 0, null, 0], [4, "min_qty", "REAL", 0, null, 0], [5, "unit", "TEXT", 0, null, 0], [6, "preparation", "TEXT", 0, null, 0], [7, "optional", "TEXT", 0, null, 0]], "primary_keys": ["quantity_id"], "foreign_keys": [[0, 0, "Nutrition", "recipe_id", "recipe_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Ingredient", "ingredient_id", "ingredient_id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "Recipe", "recipe_id", "recipe_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Ingredient ( ingredient_id INTEGER PRIMARY KEY, category TEXT, name TEXT, plural TEXT ); CREATE TABLE Recipe ( recipe_id INTEGER PRIMARY KEY, title TEXT, subtitle TEXT, servings INTEGER, yield_unit TEXT, prep_min INTEGER, cook_min INTEGER, stnd_min INTEGER, source TEXT, intro TEXT, directions TEXT ); CREATE TABLE Nutrition ( recipe_id INTEGER PRIMARY KEY, protein REAL, carbo REAL, alcohol REAL, total_fat REAL, sat_fat REAL, cholestrl REAL, sodium REAL, iron REAL, vitamin_c REAL, vitamin_a REAL, fiber REAL, pcnt_cal_carb REAL, pcnt_cal_fat REAL, pcnt_cal_prot REAL, calories REAL, FOREIGN KEY (recipe_id) REFERENCES Recipe(recipe_id) ); CREATE TABLE Quantity ( quantity_id INTEGER PRIMARY KEY, recipe_id INTEGER, ingredient_id INTEGER, max_qty REAL, min_qty REAL, unit TEXT, preparation TEXT, optional TEXT, FOREIGN KEY (recipe_id) REFERENCES Nutrition(recipe_id), FOREIGN KEY (ingredient_id) REFERENCES Ingredient(ingredient_id), FOREIGN KEY (recipe_id) REFERENCES Recipe(recipe_id) );
bike_share_1
{"station": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "name", "TEXT", 0, null, 0], [2, "lat", "REAL", 0, null, 0], [3, "long", "REAL", 0, null, 0], [4, "dock_count", "INTEGER", 0, null, 0], [5, "city", "TEXT", 0, null, 0], [6, "installation_date", "TEXT", 0, null, 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "status": {"columns": [[0, "station_id", "INTEGER", 0, null, 0], [1, "bikes_available", "INTEGER", 0, null, 0], [2, "docks_available", "INTEGER", 0, null, 0], [3, "time", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "trip": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "duration", "INTEGER", 0, null, 0], [2, "start_date", "TEXT", 0, null, 0], [3, "start_station_name", "TEXT", 0, null, 0], [4, "start_station_id", "INTEGER", 0, null, 0], [5, "end_date", "TEXT", 0, null, 0], [6, "end_station_name", "TEXT", 0, null, 0], [7, "end_station_id", "INTEGER", 0, null, 0], [8, "bike_id", "INTEGER", 0, null, 0], [9, "subscription_type", "TEXT", 0, null, 0], [10, "zip_code", "INTEGER", 0, null, 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "weather": {"columns": [[0, "date", "TEXT", 0, null, 0], [1, "max_temperature_f", "INTEGER", 0, null, 0], [2, "mean_temperature_f", "INTEGER", 0, null, 0], [3, "min_temperature_f", "INTEGER", 0, null, 0], [4, "max_dew_point_f", "INTEGER", 0, null, 0], [5, "mean_dew_point_f", "INTEGER", 0, null, 0], [6, "min_dew_point_f", "INTEGER", 0, null, 0], [7, "max_humidity", "INTEGER", 0, null, 0], [8, "mean_humidity", "INTEGER", 0, null, 0], [9, "min_humidity", "INTEGER", 0, null, 0], [10, "max_sea_level_pressure_inches", "REAL", 0, null, 0], [11, "mean_sea_level_pressure_inches", "REAL", 0, null, 0], [12, "min_sea_level_pressure_inches", "REAL", 0, null, 0], [13, "max_visibility_miles", "INTEGER", 0, null, 0], [14, "mean_visibility_miles", "INTEGER", 0, null, 0], [15, "min_visibility_miles", "INTEGER", 0, null, 0], [16, "max_wind_Speed_mph", "INTEGER", 0, null, 0], [17, "mean_wind_speed_mph", "INTEGER", 0, null, 0], [18, "max_gust_speed_mph", "INTEGER", 0, null, 0], [19, "precipitation_inches", "TEXT", 0, null, 0], [20, "cloud_cover", "INTEGER", 0, null, 0], [21, "events", "TEXT", 0, null, 0], [22, "wind_dir_degrees", "INTEGER", 0, null, 0], [23, "zip_code", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE station ( id INTEGER NOT NULL PRIMARY KEY, name TEXT, lat REAL, long REAL, dock_count INTEGER, city TEXT, installation_date TEXT ); CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ); CREATE TABLE trip ( id INTEGER NOT NULL PRIMARY KEY, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ); CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_dew_point_f INTEGER, max_humidity INTEGER, mean_humidity INTEGER, min_humidity INTEGER, max_sea_level_pressure_inches REAL, mean_sea_level_pressure_inches REAL, min_sea_level_pressure_inches REAL, max_visibility_miles INTEGER, mean_visibility_miles INTEGER, min_visibility_miles INTEGER, max_wind_Speed_mph INTEGER, mean_wind_speed_mph INTEGER, max_gust_speed_mph INTEGER, precipitation_inches TEXT, cloud_cover INTEGER, events TEXT, wind_dir_degrees INTEGER, zip_code TEXT );
retail_complains
{"state": {"columns": [[0, "StateCode", "TEXT", 0, null, 1], [1, "State", "TEXT", 0, null, 0], [2, "Region", "TEXT", 0, null, 0]], "primary_keys": ["StateCode"], "foreign_keys": [], "unique_constraints": [[[0, 0, "StateCode"]]], "check_constraints": []}, "callcenterlogs": {"columns": [[0, "Date received", "DATE", 0, null, 0], [1, "Complaint ID", "TEXT", 0, null, 1], [2, "rand client", "TEXT", 0, null, 0], [3, "phonefinal", "TEXT", 0, null, 0], [4, "vru+line", "TEXT", 0, null, 0], [5, "call_id", "INTEGER", 0, null, 0], [6, "priority", "INTEGER", 0, null, 0], [7, "type", "TEXT", 0, null, 0], [8, "outcome", "TEXT", 0, null, 0], [9, "server", "TEXT", 0, null, 0], [10, "ser_start", "TEXT", 0, null, 0], [11, "ser_exit", "TEXT", 0, null, 0], [12, "ser_time", "TEXT", 0, null, 0]], "primary_keys": ["Complaint ID"], "foreign_keys": [[0, 0, "client", "rand client", "client_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 1, "Complaint ID"]]], "check_constraints": []}, "client": {"columns": [[0, "client_id", "TEXT", 0, null, 1], [1, "sex", "TEXT", 0, null, 0], [2, "day", "INTEGER", 0, null, 0], [3, "month", "INTEGER", 0, null, 0], [4, "year", "INTEGER", 0, null, 0], [5, "age", "INTEGER", 0, null, 0], [6, "social", "TEXT", 0, null, 0], [7, "first", "TEXT", 0, null, 0], [8, "middle", "TEXT", 0, null, 0], [9, "last", "TEXT", 0, null, 0], [10, "phone", "TEXT", 0, null, 0], [11, "email", "TEXT", 0, null, 0], [12, "address_1", "TEXT", 0, null, 0], [13, "address_2", "TEXT", 0, null, 0], [14, "city", "TEXT", 0, null, 0], [15, "state", "TEXT", 0, null, 0], [16, "zipcode", "INTEGER", 0, null, 0], [17, "district_id", "INTEGER", 0, null, 0]], "primary_keys": ["client_id"], "foreign_keys": [[0, 0, "district", "district_id", "district_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "client_id"]]], "check_constraints": []}, "district": {"columns": [[0, "district_id", "INTEGER", 0, null, 1], [1, "city", "TEXT", 0, null, 0], [2, "state_abbrev", "TEXT", 0, null, 0], [3, "division", "TEXT", 0, null, 0]], "primary_keys": ["district_id"], "foreign_keys": [[0, 0, "state", "state_abbrev", "StateCode", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "events": {"columns": [[0, "Date received", "DATE", 0, null, 0], [1, "Product", "TEXT", 0, null, 0], [2, "Sub-product", "TEXT", 0, null, 0], [3, "Issue", "TEXT", 0, null, 0], [4, "Sub-issue", "TEXT", 0, null, 0], [5, "Consumer complaint narrative", "TEXT", 0, null, 0], [6, "Tags", "TEXT", 0, null, 0], [7, "Consumer consent provided?", "TEXT", 0, null, 0], [8, "Submitted via", "TEXT", 0, null, 0], [9, "Date sent to company", "TEXT", 0, null, 0], [10, "Company response to consumer", "TEXT", 0, null, 0], [11, "Timely response?", "TEXT", 0, null, 0], [12, "Consumer disputed?", "TEXT", 0, null, 0], [13, "Complaint ID", "TEXT", 0, null, 1], [14, "Client_ID", "TEXT", 0, null, 2]], "primary_keys": ["Complaint ID", "Client_ID"], "foreign_keys": [[0, 0, "client", "Client_ID", "client_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "callcenterlogs", "Complaint ID", "Complaint ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 13, "Complaint ID"], [1, 14, "Client_ID"]]], "check_constraints": []}, "reviews": {"columns": [[0, "Date", "DATE", 0, null, 1], [1, "Stars", "INTEGER", 0, null, 0], [2, "Reviews", "TEXT", 0, null, 0], [3, "Product", "TEXT", 0, null, 0], [4, "district_id", "INTEGER", 0, null, 0]], "primary_keys": ["Date"], "foreign_keys": [[0, 0, "district", "district_id", "district_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Date"]]], "check_constraints": []}}
CREATE TABLE state ( StateCode TEXT PRIMARY KEY, State TEXT, Region TEXT, UNIQUE (StateCode) ); CREATE TABLE callcenterlogs ( Date received DATE, Complaint ID TEXT PRIMARY KEY, rand client TEXT, phonefinal TEXT, vru+line TEXT, call_id INTEGER, priority INTEGER, type TEXT, outcome TEXT, server TEXT, ser_start TEXT, ser_exit TEXT, ser_time TEXT, UNIQUE (Complaint ID), FOREIGN KEY (rand client) REFERENCES client(client_id) ); CREATE TABLE client ( client_id TEXT PRIMARY KEY, sex TEXT, day INTEGER, month INTEGER, year INTEGER, age INTEGER, social TEXT, first TEXT, middle TEXT, last TEXT, phone TEXT, email TEXT, address_1 TEXT, address_2 TEXT, city TEXT, state TEXT, zipcode INTEGER, district_id INTEGER, UNIQUE (client_id), FOREIGN KEY (district_id) REFERENCES district(district_id) ); CREATE TABLE district ( district_id INTEGER PRIMARY KEY, city TEXT, state_abbrev TEXT, division TEXT, FOREIGN KEY (state_abbrev) REFERENCES state(StateCode) ); CREATE TABLE events ( Date received DATE, Product TEXT, Sub-product TEXT, Issue TEXT, Sub-issue TEXT, Consumer complaint narrative TEXT, Tags TEXT, Consumer consent provided? TEXT, Submitted via TEXT, Date sent to company TEXT, Company response to consumer TEXT, Timely response? TEXT, Consumer disputed? TEXT, Complaint ID TEXT PRIMARY KEY, Client_ID TEXT PRIMARY KEY, PRIMARY KEY (Complaint ID, Client_ID), UNIQUE (Complaint ID, Client_ID), FOREIGN KEY (Client_ID) REFERENCES client(client_id), FOREIGN KEY (Complaint ID) REFERENCES callcenterlogs(Complaint ID) ); CREATE TABLE reviews ( Date DATE PRIMARY KEY, Stars INTEGER, Reviews TEXT, Product TEXT, district_id INTEGER, UNIQUE (Date), FOREIGN KEY (district_id) REFERENCES district(district_id) );
simpson_episodes
{"Episode": {"columns": [[0, "episode_id", "TEXT", 0, null, 1], [1, "season", "INTEGER", 0, null, 0], [2, "episode", "INTEGER", 0, null, 0], [3, "number_in_series", "INTEGER", 0, null, 0], [4, "title", "TEXT", 0, null, 0], [5, "summary", "TEXT", 0, null, 0], [6, "air_date", "TEXT", 0, null, 0], [7, "episode_image", "TEXT", 0, null, 0], [8, "rating", "REAL", 0, null, 0], [9, "votes", "INTEGER", 0, null, 0]], "primary_keys": ["episode_id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "episode_id"]]], "check_constraints": []}, "Person": {"columns": [[0, "name", "TEXT", 0, null, 1], [1, "birthdate", "TEXT", 0, null, 0], [2, "birth_name", "TEXT", 0, null, 0], [3, "birth_place", "TEXT", 0, null, 0], [4, "birth_region", "TEXT", 0, null, 0], [5, "birth_country", "TEXT", 0, null, 0], [6, "height_meters", "REAL", 0, null, 0], [7, "nickname", "TEXT", 0, null, 0]], "primary_keys": ["name"], "foreign_keys": [], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "Award": {"columns": [[0, "award_id", "INTEGER", 0, null, 1], [1, "organization", "TEXT", 0, null, 0], [2, "year", "INTEGER", 0, null, 0], [3, "award_category", "TEXT", 0, null, 0], [4, "award", "TEXT", 0, null, 0], [5, "person", "TEXT", 0, null, 0], [6, "role", "TEXT", 0, null, 0], [7, "episode_id", "TEXT", 0, null, 0], [8, "season", "TEXT", 0, null, 0], [9, "song", "TEXT", 0, null, 0], [10, "result", "TEXT", 0, null, 0]], "primary_keys": ["award_id"], "foreign_keys": [[0, 0, "Episode", "episode_id", "episode_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Person", "person", "name", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Character_Award": {"columns": [[0, "award_id", "INTEGER", 0, null, 0], [1, "character", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Award", "award_id", "award_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Credit": {"columns": [[0, "episode_id", "TEXT", 0, null, 0], [1, "category", "TEXT", 0, null, 0], [2, "person", "TEXT", 0, null, 0], [3, "role", "TEXT", 0, null, 0], [4, "credited", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Person", "person", "name", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Episode", "episode_id", "episode_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Keyword": {"columns": [[0, "episode_id", "TEXT", 0, null, 1], [1, "keyword", "TEXT", 0, null, 2]], "primary_keys": ["episode_id", "keyword"], "foreign_keys": [[0, 0, "Episode", "episode_id", "episode_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "episode_id"], [1, 1, "keyword"]]], "check_constraints": []}, "Vote": {"columns": [[0, "episode_id", "TEXT", 0, null, 0], [1, "stars", "INTEGER", 0, null, 0], [2, "votes", "INTEGER", 0, null, 0], [3, "percent", "REAL", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Episode", "episode_id", "episode_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Episode ( episode_id TEXT PRIMARY KEY, season INTEGER, episode INTEGER, number_in_series INTEGER, title TEXT, summary TEXT, air_date TEXT, episode_image TEXT, rating REAL, votes INTEGER, UNIQUE (episode_id) ); CREATE TABLE Person ( name TEXT PRIMARY KEY, birthdate TEXT, birth_name TEXT, birth_place TEXT, birth_region TEXT, birth_country TEXT, height_meters REAL, nickname TEXT, UNIQUE (name) ); CREATE TABLE Award ( award_id INTEGER PRIMARY KEY, organization TEXT, year INTEGER, award_category TEXT, award TEXT, person TEXT, role TEXT, episode_id TEXT, season TEXT, song TEXT, result TEXT, FOREIGN KEY (episode_id) REFERENCES Episode(episode_id), FOREIGN KEY (person) REFERENCES Person(name) ); CREATE TABLE Character_Award ( award_id INTEGER, character TEXT, FOREIGN KEY (award_id) REFERENCES Award(award_id) ); CREATE TABLE Credit ( episode_id TEXT, category TEXT, person TEXT, role TEXT, credited TEXT, FOREIGN KEY (person) REFERENCES Person(name), FOREIGN KEY (episode_id) REFERENCES Episode(episode_id) ); CREATE TABLE Keyword ( episode_id TEXT PRIMARY KEY, keyword TEXT PRIMARY KEY, PRIMARY KEY (episode_id, keyword), UNIQUE (episode_id, keyword), FOREIGN KEY (episode_id) REFERENCES Episode(episode_id) ); CREATE TABLE Vote ( episode_id TEXT, stars INTEGER, votes INTEGER, percent REAL, FOREIGN KEY (episode_id) REFERENCES Episode(episode_id) );
music_platform_2
{"runs": {"columns": [[0, "run_at", "TEXT", 1, null, 0], [1, "max_rowid", "INTEGER", 1, null, 0], [2, "reviews_added", "INTEGER", 1, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "podcasts": {"columns": [[0, "podcast_id", "TEXT", 0, null, 1], [1, "itunes_id", "INTEGER", 1, null, 0], [2, "slug", "TEXT", 1, null, 0], [3, "itunes_url", "TEXT", 1, null, 0], [4, "title", "TEXT", 1, null, 0]], "primary_keys": ["podcast_id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "podcast_id"]]], "check_constraints": []}, "reviews": {"columns": [[0, "podcast_id", "TEXT", 1, null, 0], [1, "title", "TEXT", 1, null, 0], [2, "content", "TEXT", 1, null, 0], [3, "rating", "INTEGER", 1, null, 0], [4, "author_id", "TEXT", 1, null, 0], [5, "created_at", "TEXT", 1, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "podcasts", "podcast_id", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "categories": {"columns": [[0, "podcast_id", "TEXT", 1, null, 1], [1, "category", "TEXT", 1, null, 2]], "primary_keys": ["podcast_id", "category"], "foreign_keys": [[0, 0, "podcasts", "podcast_id", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "podcast_id"], [1, 1, "category"]]], "check_constraints": []}}
CREATE TABLE runs ( run_at TEXT NOT NULL, max_rowid INTEGER NOT NULL, reviews_added INTEGER NOT NULL ); CREATE TABLE podcasts ( podcast_id TEXT PRIMARY KEY, itunes_id INTEGER NOT NULL, slug TEXT NOT NULL, itunes_url TEXT NOT NULL, title TEXT NOT NULL, UNIQUE (podcast_id) ); CREATE TABLE reviews ( podcast_id TEXT NOT NULL, title TEXT NOT NULL, content TEXT NOT NULL, rating INTEGER NOT NULL, author_id TEXT NOT NULL, created_at TEXT NOT NULL, FOREIGN KEY (podcast_id) REFERENCES podcasts(None) ); CREATE TABLE categories ( podcast_id TEXT NOT NULL PRIMARY KEY, category TEXT NOT NULL PRIMARY KEY, PRIMARY KEY (podcast_id, category), UNIQUE (podcast_id, category), FOREIGN KEY (podcast_id) REFERENCES podcasts(None) );
codebase_comments
{"sqlite_sequence": {"columns": [[0, "name", "", 0, null, 0], [1, "seq", "", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Method": {"columns": [[0, "Id", "INTEGER", 1, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "FullComment", "TEXT", 0, null, 0], [3, "Summary", "TEXT", 0, null, 0], [4, "ApiCalls", "TEXT", 0, null, 0], [5, "CommentIsXml", "INTEGER", 0, null, 0], [6, "SampledAt", "INTEGER", 0, null, 0], [7, "SolutionId", "INTEGER", 0, null, 0], [8, "Lang", "TEXT", 0, null, 0], [9, "NameTokenized", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "MethodParameter": {"columns": [[0, "Id", "INTEGER", 1, null, 1], [1, "MethodId", "TEXT", 0, null, 0], [2, "Type", "TEXT", 0, null, 0], [3, "Name", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Repo": {"columns": [[0, "Id", "INTEGER", 1, null, 1], [1, "Url", "TEXT", 0, null, 0], [2, "Stars", "INTEGER", 0, null, 0], [3, "Forks", "INTEGER", 0, null, 0], [4, "Watchers", "INTEGER", 0, null, 0], [5, "ProcessedTime", "INTEGER", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Solution": {"columns": [[0, "Id", "INTEGER", 1, null, 1], [1, "RepoId", "INTEGER", 0, null, 0], [2, "Path", "TEXT", 0, null, 0], [3, "ProcessedTime", "INTEGER", 0, null, 0], [4, "WasCompiled", "INTEGER", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE sqlite_sequence ( name, seq ); CREATE TABLE Method ( Id INTEGER NOT NULL PRIMARY KEY, Name TEXT, FullComment TEXT, Summary TEXT, ApiCalls TEXT, CommentIsXml INTEGER, SampledAt INTEGER, SolutionId INTEGER, Lang TEXT, NameTokenized TEXT ); CREATE TABLE MethodParameter ( Id INTEGER NOT NULL PRIMARY KEY, MethodId TEXT, Type TEXT, Name TEXT ); CREATE TABLE Repo ( Id INTEGER NOT NULL PRIMARY KEY, Url TEXT, Stars INTEGER, Forks INTEGER, Watchers INTEGER, ProcessedTime INTEGER ); CREATE TABLE Solution ( Id INTEGER NOT NULL PRIMARY KEY, RepoId INTEGER, Path TEXT, ProcessedTime INTEGER, WasCompiled INTEGER );
app_store
{"playstore": {"columns": [[0, "App", "TEXT", 0, null, 0], [1, "Category", "TEXT", 0, null, 0], [2, "Rating", "REAL", 0, null, 0], [3, "Reviews", "INTEGER", 0, null, 0], [4, "Size", "TEXT", 0, null, 0], [5, "Installs", "TEXT", 0, null, 0], [6, "Type", "TEXT", 0, null, 0], [7, "Price", "TEXT", 0, null, 0], [8, "Content Rating", "TEXT", 0, null, 0], [9, "Genres", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "user_reviews": {"columns": [[0, "App", "TEXT", 0, null, 0], [1, "Translated_Review", "TEXT", 0, null, 0], [2, "Sentiment", "TEXT", 0, null, 0], [3, "Sentiment_Polarity", "TEXT", 0, null, 0], [4, "Sentiment_Subjectivity", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "playstore", "App", "App", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE playstore ( App TEXT, Category TEXT, Rating REAL, Reviews INTEGER, Size TEXT, Installs TEXT, Type TEXT, Price TEXT, Content Rating TEXT, Genres TEXT ); CREATE TABLE user_reviews ( App TEXT, Translated_Review TEXT, Sentiment TEXT, Sentiment_Polarity TEXT, Sentiment_Subjectivity TEXT, FOREIGN KEY (App) REFERENCES playstore(App) );
world
{"sqlite_sequence": {"columns": [[0, "name", "", 0, null, 0], [1, "seq", "", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "City": {"columns": [[0, "ID", "INTEGER", 1, null, 1], [1, "Name", "TEXT", 1, "''", 0], [2, "CountryCode", "TEXT", 1, "''", 0], [3, "District", "TEXT", 1, "''", 0], [4, "Population", "INTEGER", 1, "0", 0]], "primary_keys": ["ID"], "foreign_keys": [[0, 0, "Country", "CountryCode", "Code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Country": {"columns": [[0, "Code", "TEXT", 1, "''", 1], [1, "Name", "TEXT", 1, "''", 0], [2, "Continent", "TEXT", 1, "'Asia'", 0], [3, "Region", "TEXT", 1, "''", 0], [4, "SurfaceArea", "REAL", 1, "0.00", 0], [5, "IndepYear", "INTEGER", 0, "NULL", 0], [6, "Population", "INTEGER", 1, "0", 0], [7, "LifeExpectancy", "REAL", 0, "NULL", 0], [8, "GNP", "REAL", 0, "NULL", 0], [9, "GNPOld", "REAL", 0, "NULL", 0], [10, "LocalName", "TEXT", 1, "''", 0], [11, "GovernmentForm", "TEXT", 1, "''", 0], [12, "HeadOfState", "TEXT", 0, "NULL", 0], [13, "Capital", "INTEGER", 0, "NULL", 0], [14, "Code2", "TEXT", 1, "''", 0]], "primary_keys": ["Code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Code"]]], "check_constraints": []}, "CountryLanguage": {"columns": [[0, "CountryCode", "TEXT", 1, "''", 1], [1, "Language", "TEXT", 1, "''", 2], [2, "IsOfficial", "TEXT", 1, "'F'", 0], [3, "Percentage", "REAL", 1, "0.0", 0]], "primary_keys": ["CountryCode", "Language"], "foreign_keys": [[0, 0, "Country", "CountryCode", "Code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "CountryCode"], [1, 1, "Language"]]], "check_constraints": []}}
CREATE TABLE sqlite_sequence ( name, seq ); CREATE TABLE City ( ID INTEGER NOT NULL PRIMARY KEY, Name TEXT NOT NULL DEFAULT '', CountryCode TEXT NOT NULL DEFAULT '', District TEXT NOT NULL DEFAULT '', Population INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (CountryCode) REFERENCES Country(Code) ); CREATE TABLE Country ( Code TEXT NOT NULL DEFAULT '' PRIMARY KEY, Name TEXT NOT NULL DEFAULT '', Continent TEXT NOT NULL DEFAULT 'Asia', Region TEXT NOT NULL DEFAULT '', SurfaceArea REAL NOT NULL DEFAULT 0.00, IndepYear INTEGER DEFAULT NULL, Population INTEGER NOT NULL DEFAULT 0, LifeExpectancy REAL DEFAULT NULL, GNP REAL DEFAULT NULL, GNPOld REAL DEFAULT NULL, LocalName TEXT NOT NULL DEFAULT '', GovernmentForm TEXT NOT NULL DEFAULT '', HeadOfState TEXT DEFAULT NULL, Capital INTEGER DEFAULT NULL, Code2 TEXT NOT NULL DEFAULT '', UNIQUE (Code) ); CREATE TABLE CountryLanguage ( CountryCode TEXT NOT NULL DEFAULT '' PRIMARY KEY, Language TEXT NOT NULL DEFAULT '' PRIMARY KEY, IsOfficial TEXT NOT NULL DEFAULT 'F', Percentage REAL NOT NULL DEFAULT 0.0, PRIMARY KEY (CountryCode, Language), UNIQUE (CountryCode, Language), FOREIGN KEY (CountryCode) REFERENCES Country(Code) );
olympics
{"city": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "city_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "games": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "games_year", "INTEGER", 0, "NULL", 0], [2, "games_name", "TEXT", 0, "NULL", 0], [3, "season", "TEXT", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "games_city": {"columns": [[0, "games_id", "INTEGER", 0, "NULL", 0], [1, "city_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "games", "games_id", "id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "city", "city_id", "id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "medal": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "medal_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "noc_region": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "noc", "TEXT", 0, "NULL", 0], [2, "region_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "person": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "full_name", "TEXT", 0, "NULL", 0], [2, "gender", "TEXT", 0, "NULL", 0], [3, "height", "INTEGER", 0, "NULL", 0], [4, "weight", "INTEGER", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "games_competitor": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "games_id", "INTEGER", 0, "NULL", 0], [2, "person_id", "INTEGER", 0, "NULL", 0], [3, "age", "INTEGER", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [[0, 0, "person", "person_id", "id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "games", "games_id", "id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "person_region": {"columns": [[0, "person_id", "INTEGER", 0, "NULL", 0], [1, "region_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "noc_region", "region_id", "id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "person", "person_id", "id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "sport": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "sport_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "event": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "sport_id", "INTEGER", 0, "NULL", 0], [2, "event_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["id"], "foreign_keys": [[0, 0, "sport", "sport_id", "id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "competitor_event": {"columns": [[0, "event_id", "INTEGER", 0, "NULL", 0], [1, "competitor_id", "INTEGER", 0, "NULL", 0], [2, "medal_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "medal", "medal_id", "id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "event", "event_id", "id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "games_competitor", "competitor_id", "id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE city ( id INTEGER NOT NULL PRIMARY KEY, city_name TEXT DEFAULT NULL ); CREATE TABLE games ( id INTEGER NOT NULL PRIMARY KEY, games_year INTEGER DEFAULT NULL, games_name TEXT DEFAULT NULL, season TEXT DEFAULT NULL ); CREATE TABLE games_city ( games_id INTEGER DEFAULT NULL, city_id INTEGER DEFAULT NULL, FOREIGN KEY (games_id) REFERENCES games(id), FOREIGN KEY (city_id) REFERENCES city(id) ); CREATE TABLE medal ( id INTEGER NOT NULL PRIMARY KEY, medal_name TEXT DEFAULT NULL ); CREATE TABLE noc_region ( id INTEGER NOT NULL PRIMARY KEY, noc TEXT DEFAULT NULL, region_name TEXT DEFAULT NULL ); CREATE TABLE person ( id INTEGER NOT NULL PRIMARY KEY, full_name TEXT DEFAULT NULL, gender TEXT DEFAULT NULL, height INTEGER DEFAULT NULL, weight INTEGER DEFAULT NULL ); CREATE TABLE games_competitor ( id INTEGER NOT NULL PRIMARY KEY, games_id INTEGER DEFAULT NULL, person_id INTEGER DEFAULT NULL, age INTEGER DEFAULT NULL, FOREIGN KEY (person_id) REFERENCES person(id), FOREIGN KEY (games_id) REFERENCES games(id) ); CREATE TABLE person_region ( person_id INTEGER DEFAULT NULL, region_id INTEGER DEFAULT NULL, FOREIGN KEY (region_id) REFERENCES noc_region(id), FOREIGN KEY (person_id) REFERENCES person(id) ); CREATE TABLE sport ( id INTEGER NOT NULL PRIMARY KEY, sport_name TEXT DEFAULT NULL ); CREATE TABLE event ( id INTEGER NOT NULL PRIMARY KEY, sport_id INTEGER DEFAULT NULL, event_name TEXT DEFAULT NULL, FOREIGN KEY (sport_id) REFERENCES sport(id) ); CREATE TABLE competitor_event ( event_id INTEGER DEFAULT NULL, competitor_id INTEGER DEFAULT NULL, medal_id INTEGER DEFAULT NULL, FOREIGN KEY (medal_id) REFERENCES medal(id), FOREIGN KEY (event_id) REFERENCES event(id), FOREIGN KEY (competitor_id) REFERENCES games_competitor(id) );
music_tracker
{"torrents": {"columns": [[0, "groupName", "TEXT", 0, null, 0], [1, "totalSnatched", "INTEGER", 0, null, 0], [2, "artist", "TEXT", 0, null, 0], [3, "groupYear", "INTEGER", 0, null, 0], [4, "releaseType", "TEXT", 0, null, 0], [5, "groupId", "INTEGER", 0, null, 0], [6, "id", "INTEGER", 0, null, 1]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "tags": {"columns": [[0, "index", "INTEGER", 0, null, 1], [1, "id", "INTEGER", 0, null, 0], [2, "tag", "TEXT", 0, null, 0]], "primary_keys": ["index"], "foreign_keys": [[0, 0, "torrents", "id", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE torrents ( groupName TEXT, totalSnatched INTEGER, artist TEXT, groupYear INTEGER, releaseType TEXT, groupId INTEGER, id INTEGER PRIMARY KEY ); CREATE TABLE tags ( index INTEGER PRIMARY KEY, id INTEGER, tag TEXT, FOREIGN KEY (id) REFERENCES torrents(None) );
retail_world
{"sqlite_sequence": {"columns": [[0, "name", "", 0, null, 0], [1, "seq", "", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Categories": {"columns": [[0, "CategoryID", "INTEGER", 0, null, 1], [1, "CategoryName", "TEXT", 0, null, 0], [2, "Description", "TEXT", 0, null, 0]], "primary_keys": ["CategoryID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Customers": {"columns": [[0, "CustomerID", "INTEGER", 0, null, 1], [1, "CustomerName", "TEXT", 0, null, 0], [2, "ContactName", "TEXT", 0, null, 0], [3, "Address", "TEXT", 0, null, 0], [4, "City", "TEXT", 0, null, 0], [5, "PostalCode", "TEXT", 0, null, 0], [6, "Country", "TEXT", 0, null, 0]], "primary_keys": ["CustomerID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Employees": {"columns": [[0, "EmployeeID", "INTEGER", 0, null, 1], [1, "LastName", "TEXT", 0, null, 0], [2, "FirstName", "TEXT", 0, null, 0], [3, "BirthDate", "DATE", 0, null, 0], [4, "Photo", "TEXT", 0, null, 0], [5, "Notes", "TEXT", 0, null, 0]], "primary_keys": ["EmployeeID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Shippers": {"columns": [[0, "ShipperID", "INTEGER", 0, null, 1], [1, "ShipperName", "TEXT", 0, null, 0], [2, "Phone", "TEXT", 0, null, 0]], "primary_keys": ["ShipperID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Suppliers": {"columns": [[0, "SupplierID", "INTEGER", 0, null, 1], [1, "SupplierName", "TEXT", 0, null, 0], [2, "ContactName", "TEXT", 0, null, 0], [3, "Address", "TEXT", 0, null, 0], [4, "City", "TEXT", 0, null, 0], [5, "PostalCode", "TEXT", 0, null, 0], [6, "Country", "TEXT", 0, null, 0], [7, "Phone", "TEXT", 0, null, 0]], "primary_keys": ["SupplierID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Products": {"columns": [[0, "ProductID", "INTEGER", 0, null, 1], [1, "ProductName", "TEXT", 0, null, 0], [2, "SupplierID", "INTEGER", 0, null, 0], [3, "CategoryID", "INTEGER", 0, null, 0], [4, "Unit", "TEXT", 0, null, 0], [5, "Price", "REAL", 0, "0", 0]], "primary_keys": ["ProductID"], "foreign_keys": [[0, 0, "Suppliers", "SupplierID", "SupplierID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Categories", "CategoryID", "CategoryID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Orders": {"columns": [[0, "OrderID", "INTEGER", 0, null, 1], [1, "CustomerID", "INTEGER", 0, null, 0], [2, "EmployeeID", "INTEGER", 0, null, 0], [3, "OrderDate", "DATETIME", 0, null, 0], [4, "ShipperID", "INTEGER", 0, null, 0]], "primary_keys": ["OrderID"], "foreign_keys": [[0, 0, "Shippers", "ShipperID", "ShipperID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Customers", "CustomerID", "CustomerID", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "Employees", "EmployeeID", "EmployeeID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "OrderDetails": {"columns": [[0, "OrderDetailID", "INTEGER", 0, null, 1], [1, "OrderID", "INTEGER", 0, null, 0], [2, "ProductID", "INTEGER", 0, null, 0], [3, "Quantity", "INTEGER", 0, null, 0]], "primary_keys": ["OrderDetailID"], "foreign_keys": [[0, 0, "Products", "ProductID", "ProductID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Orders", "OrderID", "OrderID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE sqlite_sequence ( name, seq ); CREATE TABLE Categories ( CategoryID INTEGER PRIMARY KEY, CategoryName TEXT, Description TEXT ); CREATE TABLE Customers ( CustomerID INTEGER PRIMARY KEY, CustomerName TEXT, ContactName TEXT, Address TEXT, City TEXT, PostalCode TEXT, Country TEXT ); CREATE TABLE Employees ( EmployeeID INTEGER PRIMARY KEY, LastName TEXT, FirstName TEXT, BirthDate DATE, Photo TEXT, Notes TEXT ); CREATE TABLE Shippers ( ShipperID INTEGER PRIMARY KEY, ShipperName TEXT, Phone TEXT ); CREATE TABLE Suppliers ( SupplierID INTEGER PRIMARY KEY, SupplierName TEXT, ContactName TEXT, Address TEXT, City TEXT, PostalCode TEXT, Country TEXT, Phone TEXT ); CREATE TABLE Products ( ProductID INTEGER PRIMARY KEY, ProductName TEXT, SupplierID INTEGER, CategoryID INTEGER, Unit TEXT, Price REAL DEFAULT 0, FOREIGN KEY (SupplierID) REFERENCES Suppliers(SupplierID), FOREIGN KEY (CategoryID) REFERENCES Categories(CategoryID) ); CREATE TABLE Orders ( OrderID INTEGER PRIMARY KEY, CustomerID INTEGER, EmployeeID INTEGER, OrderDate DATETIME, ShipperID INTEGER, FOREIGN KEY (ShipperID) REFERENCES Shippers(ShipperID), FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID), FOREIGN KEY (EmployeeID) REFERENCES Employees(EmployeeID) ); CREATE TABLE OrderDetails ( OrderDetailID INTEGER PRIMARY KEY, OrderID INTEGER, ProductID INTEGER, Quantity INTEGER, FOREIGN KEY (ProductID) REFERENCES Products(ProductID), FOREIGN KEY (OrderID) REFERENCES Orders(OrderID) );
image_and_language
{"ATT_CLASSES": {"columns": [[0, "ATT_CLASS_ID", "INTEGER", 1, "0", 1], [1, "ATT_CLASS", "TEXT", 1, null, 0]], "primary_keys": ["ATT_CLASS_ID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "OBJ_CLASSES": {"columns": [[0, "OBJ_CLASS_ID", "INTEGER", 1, "0", 1], [1, "OBJ_CLASS", "TEXT", 1, null, 0]], "primary_keys": ["OBJ_CLASS_ID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "IMG_OBJ": {"columns": [[0, "IMG_ID", "INTEGER", 1, "0", 1], [1, "OBJ_SAMPLE_ID", "INTEGER", 1, "0", 2], [2, "OBJ_CLASS_ID", "INTEGER", 0, null, 0], [3, "X", "INTEGER", 0, null, 0], [4, "Y", "INTEGER", 0, null, 0], [5, "W", "INTEGER", 0, null, 0], [6, "H", "INTEGER", 0, null, 0]], "primary_keys": ["IMG_ID", "OBJ_SAMPLE_ID"], "foreign_keys": [[0, 0, "OBJ_CLASSES", "OBJ_CLASS_ID", "OBJ_CLASS_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "IMG_ID"], [1, 1, "OBJ_SAMPLE_ID"]]], "check_constraints": []}, "IMG_OBJ_ATT": {"columns": [[0, "IMG_ID", "INTEGER", 1, "0", 1], [1, "ATT_CLASS_ID", "INTEGER", 1, "0", 2], [2, "OBJ_SAMPLE_ID", "INTEGER", 1, "0", 3]], "primary_keys": ["IMG_ID", "ATT_CLASS_ID", "OBJ_SAMPLE_ID"], "foreign_keys": [[0, 0, "IMG_OBJ", "IMG_ID", "IMG_ID", "NO ACTION", "NO ACTION", "NONE"], [0, 1, "IMG_OBJ", "OBJ_SAMPLE_ID", "OBJ_SAMPLE_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "ATT_CLASSES", "ATT_CLASS_ID", "ATT_CLASS_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "IMG_ID"], [1, 1, "ATT_CLASS_ID"], [2, 2, "OBJ_SAMPLE_ID"]]], "check_constraints": []}, "PRED_CLASSES": {"columns": [[0, "PRED_CLASS_ID", "INTEGER", 1, "0", 1], [1, "PRED_CLASS", "TEXT", 1, null, 0]], "primary_keys": ["PRED_CLASS_ID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "IMG_REL": {"columns": [[0, "IMG_ID", "INTEGER", 1, "0", 1], [1, "PRED_CLASS_ID", "INTEGER", 1, "0", 2], [2, "OBJ1_SAMPLE_ID", "INTEGER", 1, "0", 3], [3, "OBJ2_SAMPLE_ID", "INTEGER", 1, "0", 4]], "primary_keys": ["IMG_ID", "PRED_CLASS_ID", "OBJ1_SAMPLE_ID", "OBJ2_SAMPLE_ID"], "foreign_keys": [[0, 0, "IMG_OBJ", "IMG_ID", "IMG_ID", "NO ACTION", "NO ACTION", "NONE"], [0, 1, "IMG_OBJ", "OBJ2_SAMPLE_ID", "OBJ_SAMPLE_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "IMG_OBJ", "IMG_ID", "IMG_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 1, "IMG_OBJ", "OBJ1_SAMPLE_ID", "OBJ_SAMPLE_ID", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "PRED_CLASSES", "PRED_CLASS_ID", "PRED_CLASS_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "IMG_ID"], [1, 1, "PRED_CLASS_ID"], [2, 2, "OBJ1_SAMPLE_ID"], [3, 3, "OBJ2_SAMPLE_ID"]]], "check_constraints": []}}
CREATE TABLE ATT_CLASSES ( ATT_CLASS_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, ATT_CLASS TEXT NOT NULL ); CREATE TABLE OBJ_CLASSES ( OBJ_CLASS_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, OBJ_CLASS TEXT NOT NULL ); CREATE TABLE IMG_OBJ ( IMG_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, OBJ_SAMPLE_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, OBJ_CLASS_ID INTEGER, X INTEGER, Y INTEGER, W INTEGER, H INTEGER, PRIMARY KEY (IMG_ID, OBJ_SAMPLE_ID), UNIQUE (IMG_ID, OBJ_SAMPLE_ID), FOREIGN KEY (OBJ_CLASS_ID) REFERENCES OBJ_CLASSES(OBJ_CLASS_ID) ); CREATE TABLE IMG_OBJ_ATT ( IMG_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, ATT_CLASS_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, OBJ_SAMPLE_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, PRIMARY KEY (IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID), UNIQUE (IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID), FOREIGN KEY (IMG_ID) REFERENCES IMG_OBJ(IMG_ID), FOREIGN KEY (OBJ_SAMPLE_ID) REFERENCES IMG_OBJ(OBJ_SAMPLE_ID), FOREIGN KEY (ATT_CLASS_ID) REFERENCES ATT_CLASSES(ATT_CLASS_ID) ); CREATE TABLE PRED_CLASSES ( PRED_CLASS_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, PRED_CLASS TEXT NOT NULL ); CREATE TABLE IMG_REL ( IMG_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, PRED_CLASS_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, OBJ1_SAMPLE_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, OBJ2_SAMPLE_ID INTEGER NOT NULL DEFAULT 0 PRIMARY KEY, PRIMARY KEY (IMG_ID, PRED_CLASS_ID, OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID), UNIQUE (IMG_ID, PRED_CLASS_ID, OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID), FOREIGN KEY (IMG_ID) REFERENCES IMG_OBJ(IMG_ID), FOREIGN KEY (OBJ2_SAMPLE_ID) REFERENCES IMG_OBJ(OBJ_SAMPLE_ID), FOREIGN KEY (IMG_ID) REFERENCES IMG_OBJ(IMG_ID), FOREIGN KEY (OBJ1_SAMPLE_ID) REFERENCES IMG_OBJ(OBJ_SAMPLE_ID), FOREIGN KEY (PRED_CLASS_ID) REFERENCES PRED_CLASSES(PRED_CLASS_ID) );
college_completion
{"institution_details": {"columns": [[0, "unitid", "INTEGER", 0, null, 1], [1, "chronname", "TEXT", 0, null, 0], [2, "city", "TEXT", 0, null, 0], [3, "state", "TEXT", 0, null, 0], [4, "level", "TEXT", 0, null, 0], [5, "control", "TEXT", 0, null, 0], [6, "basic", "TEXT", 0, null, 0], [7, "hbcu", "TEXT", 0, null, 0], [8, "flagship", "TEXT", 0, null, 0], [9, "long_x", "REAL", 0, null, 0], [10, "lat_y", "REAL", 0, null, 0], [11, "site", "TEXT", 0, null, 0], [12, "student_count", "INTEGER", 0, null, 0], [13, "awards_per_value", "REAL", 0, null, 0], [14, "awards_per_state_value", "REAL", 0, null, 0], [15, "awards_per_natl_value", "REAL", 0, null, 0], [16, "exp_award_value", "INTEGER", 0, null, 0], [17, "exp_award_state_value", "INTEGER", 0, null, 0], [18, "exp_award_natl_value", "INTEGER", 0, null, 0], [19, "exp_award_percentile", "INTEGER", 0, null, 0], [20, "ft_pct", "REAL", 0, null, 0], [21, "fte_value", "INTEGER", 0, null, 0], [22, "fte_percentile", "INTEGER", 0, null, 0], [23, "med_sat_value", "TEXT", 0, null, 0], [24, "med_sat_percentile", "TEXT", 0, null, 0], [25, "aid_value", "INTEGER", 0, null, 0], [26, "aid_percentile", "INTEGER", 0, null, 0], [27, "endow_value", "TEXT", 0, null, 0], [28, "endow_percentile", "TEXT", 0, null, 0], [29, "grad_100_value", "REAL", 0, null, 0], [30, "grad_100_percentile", "INTEGER", 0, null, 0], [31, "grad_150_value", "REAL", 0, null, 0], [32, "grad_150_percentile", "INTEGER", 0, null, 0], [33, "pell_value", "REAL", 0, null, 0], [34, "pell_percentile", "INTEGER", 0, null, 0], [35, "retain_value", "REAL", 0, null, 0], [36, "retain_percentile", "INTEGER", 0, null, 0], [37, "ft_fac_value", "REAL", 0, null, 0], [38, "ft_fac_percentile", "INTEGER", 0, null, 0], [39, "vsa_year", "TEXT", 0, null, 0], [40, "vsa_grad_after4_first", "TEXT", 0, null, 0], [41, "vsa_grad_elsewhere_after4_first", "TEXT", 0, null, 0], [42, "vsa_enroll_after4_first", "TEXT", 0, null, 0], [43, "vsa_enroll_elsewhere_after4_first", "TEXT", 0, null, 0], [44, "vsa_grad_after6_first", "TEXT", 0, null, 0], [45, "vsa_grad_elsewhere_after6_first", "TEXT", 0, null, 0], [46, "vsa_enroll_after6_first", "TEXT", 0, null, 0], [47, "vsa_enroll_elsewhere_after6_first", "TEXT", 0, null, 0], [48, "vsa_grad_after4_transfer", "TEXT", 0, null, 0], [49, "vsa_grad_elsewhere_after4_transfer", "TEXT", 0, null, 0], [50, "vsa_enroll_after4_transfer", "TEXT", 0, null, 0], [51, "vsa_enroll_elsewhere_after4_transfer", "TEXT", 0, null, 0], [52, "vsa_grad_after6_transfer", "TEXT", 0, null, 0], [53, "vsa_grad_elsewhere_after6_transfer", "TEXT", 0, null, 0], [54, "vsa_enroll_after6_transfer", "TEXT", 0, null, 0], [55, "vsa_enroll_elsewhere_after6_transfer", "TEXT", 0, null, 0], [56, "similar", "TEXT", 0, null, 0], [57, "state_sector_ct", "INTEGER", 0, null, 0], [58, "carnegie_ct", "INTEGER", 0, null, 0], [59, "counted_pct", "TEXT", 0, null, 0], [60, "nicknames", "TEXT", 0, null, 0], [61, "cohort_size", "INTEGER", 0, null, 0]], "primary_keys": ["unitid"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "institution_grads": {"columns": [[0, "unitid", "INTEGER", 0, null, 0], [1, "year", "INTEGER", 0, null, 0], [2, "gender", "TEXT", 0, null, 0], [3, "race", "TEXT", 0, null, 0], [4, "cohort", "TEXT", 0, null, 0], [5, "grad_cohort", "TEXT", 0, null, 0], [6, "grad_100", "TEXT", 0, null, 0], [7, "grad_150", "TEXT", 0, null, 0], [8, "grad_100_rate", "TEXT", 0, null, 0], [9, "grad_150_rate", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "institution_details", "unitid", "unitid", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "state_sector_grads": {"columns": [[0, "stateid", "INTEGER", 0, null, 0], [1, "state", "TEXT", 0, null, 0], [2, "state_abbr", "TEXT", 0, null, 0], [3, "control", "TEXT", 0, null, 0], [4, "level", "TEXT", 0, null, 0], [5, "year", "INTEGER", 0, null, 0], [6, "gender", "TEXT", 0, null, 0], [7, "race", "TEXT", 0, null, 0], [8, "cohort", "TEXT", 0, null, 0], [9, "grad_cohort", "TEXT", 0, null, 0], [10, "grad_100", "TEXT", 0, null, 0], [11, "grad_150", "TEXT", 0, null, 0], [12, "grad_100_rate", "TEXT", 0, null, 0], [13, "grad_150_rate", "TEXT", 0, null, 0], [14, "grad_cohort_ct", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "state_sector_details", "stateid", "stateid", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "institution_details", "state", "state", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "state_sector_details": {"columns": [[0, "stateid", "INTEGER", 0, null, 1], [1, "state", "TEXT", 0, null, 0], [2, "state_post", "TEXT", 0, null, 0], [3, "level", "TEXT", 0, null, 2], [4, "control", "TEXT", 0, null, 3], [5, "schools_count", "INTEGER", 0, null, 0], [6, "counted_pct", "TEXT", 0, null, 0], [7, "awards_per_state_value", "TEXT", 0, null, 0], [8, "awards_per_natl_value", "REAL", 0, null, 0], [9, "exp_award_state_value", "TEXT", 0, null, 0], [10, "exp_award_natl_value", "INTEGER", 0, null, 0], [11, "state_appr_value", "TEXT", 0, null, 0], [12, "state_appr_rank", "TEXT", 0, null, 0], [13, "grad_rate_rank", "TEXT", 0, null, 0], [14, "awards_per_rank", "TEXT", 0, null, 0]], "primary_keys": ["stateid", "level", "control"], "foreign_keys": [[0, 0, "institution_details", "state", "state", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "stateid"], [1, 3, "level"], [2, 4, "control"]]], "check_constraints": []}}
CREATE TABLE institution_details ( unitid INTEGER PRIMARY KEY, chronname TEXT, city TEXT, state TEXT, level TEXT, control TEXT, basic TEXT, hbcu TEXT, flagship TEXT, long_x REAL, lat_y REAL, site TEXT, student_count INTEGER, awards_per_value REAL, awards_per_state_value REAL, awards_per_natl_value REAL, exp_award_value INTEGER, exp_award_state_value INTEGER, exp_award_natl_value INTEGER, exp_award_percentile INTEGER, ft_pct REAL, fte_value INTEGER, fte_percentile INTEGER, med_sat_value TEXT, med_sat_percentile TEXT, aid_value INTEGER, aid_percentile INTEGER, endow_value TEXT, endow_percentile TEXT, grad_100_value REAL, grad_100_percentile INTEGER, grad_150_value REAL, grad_150_percentile INTEGER, pell_value REAL, pell_percentile INTEGER, retain_value REAL, retain_percentile INTEGER, ft_fac_value REAL, ft_fac_percentile INTEGER, vsa_year TEXT, vsa_grad_after4_first TEXT, vsa_grad_elsewhere_after4_first TEXT, vsa_enroll_after4_first TEXT, vsa_enroll_elsewhere_after4_first TEXT, vsa_grad_after6_first TEXT, vsa_grad_elsewhere_after6_first TEXT, vsa_enroll_after6_first TEXT, vsa_enroll_elsewhere_after6_first TEXT, vsa_grad_after4_transfer TEXT, vsa_grad_elsewhere_after4_transfer TEXT, vsa_enroll_after4_transfer TEXT, vsa_enroll_elsewhere_after4_transfer TEXT, vsa_grad_after6_transfer TEXT, vsa_grad_elsewhere_after6_transfer TEXT, vsa_enroll_after6_transfer TEXT, vsa_enroll_elsewhere_after6_transfer TEXT, similar TEXT, state_sector_ct INTEGER, carnegie_ct INTEGER, counted_pct TEXT, nicknames TEXT, cohort_size INTEGER ); CREATE TABLE institution_grads ( unitid INTEGER, year INTEGER, gender TEXT, race TEXT, cohort TEXT, grad_cohort TEXT, grad_100 TEXT, grad_150 TEXT, grad_100_rate TEXT, grad_150_rate TEXT, FOREIGN KEY (unitid) REFERENCES institution_details(unitid) ); CREATE TABLE state_sector_grads ( stateid INTEGER, state TEXT, state_abbr TEXT, control TEXT, level TEXT, year INTEGER, gender TEXT, race TEXT, cohort TEXT, grad_cohort TEXT, grad_100 TEXT, grad_150 TEXT, grad_100_rate TEXT, grad_150_rate TEXT, grad_cohort_ct INTEGER, FOREIGN KEY (stateid) REFERENCES state_sector_details(stateid), FOREIGN KEY (state) REFERENCES institution_details(state) ); CREATE TABLE state_sector_details ( stateid INTEGER PRIMARY KEY, state TEXT, state_post TEXT, level TEXT PRIMARY KEY, control TEXT PRIMARY KEY, schools_count INTEGER, counted_pct TEXT, awards_per_state_value TEXT, awards_per_natl_value REAL, exp_award_state_value TEXT, exp_award_natl_value INTEGER, state_appr_value TEXT, state_appr_rank TEXT, grad_rate_rank TEXT, awards_per_rank TEXT, PRIMARY KEY (stateid, level, control), UNIQUE (stateid, level, control), FOREIGN KEY (state) REFERENCES institution_details(state) );
book_publishing_company
{"authors": {"columns": [[0, "au_id", "TEXT", 0, null, 1], [1, "au_lname", "TEXT", 1, null, 0], [2, "au_fname", "TEXT", 1, null, 0], [3, "phone", "TEXT", 1, null, 0], [4, "address", "TEXT", 0, null, 0], [5, "city", "TEXT", 0, null, 0], [6, "state", "TEXT", 0, null, 0], [7, "zip", "TEXT", 0, null, 0], [8, "contract", "TEXT", 1, null, 0]], "primary_keys": ["au_id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "au_id"]]], "check_constraints": []}, "jobs": {"columns": [[0, "job_id", "INTEGER", 0, null, 1], [1, "job_desc", "TEXT", 1, null, 0], [2, "min_lvl", "INTEGER", 1, null, 0], [3, "max_lvl", "INTEGER", 1, null, 0]], "primary_keys": ["job_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "publishers": {"columns": [[0, "pub_id", "TEXT", 0, null, 1], [1, "pub_name", "TEXT", 0, null, 0], [2, "city", "TEXT", 0, null, 0], [3, "state", "TEXT", 0, null, 0], [4, "country", "TEXT", 0, null, 0]], "primary_keys": ["pub_id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "pub_id"]]], "check_constraints": []}, "employee": {"columns": [[0, "emp_id", "TEXT", 0, null, 1], [1, "fname", "TEXT", 1, null, 0], [2, "minit", "TEXT", 0, null, 0], [3, "lname", "TEXT", 1, null, 0], [4, "job_id", "INTEGER", 1, null, 0], [5, "job_lvl", "INTEGER", 0, null, 0], [6, "pub_id", "TEXT", 1, null, 0], [7, "hire_date", "DATETIME", 1, null, 0]], "primary_keys": ["emp_id"], "foreign_keys": [[0, 0, "publishers", "pub_id", "pub_id", "CASCADE", "CASCADE", "NONE"], [1, 0, "jobs", "job_id", "job_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "emp_id"]]], "check_constraints": []}, "pub_info": {"columns": [[0, "pub_id", "TEXT", 0, null, 1], [1, "logo", "BLOB", 0, null, 0], [2, "pr_info", "TEXT", 0, null, 0]], "primary_keys": ["pub_id"], "foreign_keys": [[0, 0, "publishers", "pub_id", "pub_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "pub_id"]]], "check_constraints": []}, "stores": {"columns": [[0, "stor_id", "TEXT", 0, null, 1], [1, "stor_name", "TEXT", 0, null, 0], [2, "stor_address", "TEXT", 0, null, 0], [3, "city", "TEXT", 0, null, 0], [4, "state", "TEXT", 0, null, 0], [5, "zip", "TEXT", 0, null, 0]], "primary_keys": ["stor_id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "stor_id"]]], "check_constraints": []}, "discounts": {"columns": [[0, "discounttype", "TEXT", 1, null, 0], [1, "stor_id", "TEXT", 0, null, 0], [2, "lowqty", "INTEGER", 0, null, 0], [3, "highqty", "INTEGER", 0, null, 0], [4, "discount", "REAL", 1, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "stores", "stor_id", "stor_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "titles": {"columns": [[0, "title_id", "TEXT", 0, null, 1], [1, "title", "TEXT", 1, null, 0], [2, "type", "TEXT", 1, null, 0], [3, "pub_id", "TEXT", 0, null, 0], [4, "price", "REAL", 0, null, 0], [5, "advance", "REAL", 0, null, 0], [6, "royalty", "INTEGER", 0, null, 0], [7, "ytd_sales", "INTEGER", 0, null, 0], [8, "notes", "TEXT", 0, null, 0], [9, "pubdate", "DATETIME", 1, null, 0]], "primary_keys": ["title_id"], "foreign_keys": [[0, 0, "publishers", "pub_id", "pub_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "title_id"]]], "check_constraints": []}, "roysched": {"columns": [[0, "title_id", "TEXT", 1, null, 0], [1, "lorange", "INTEGER", 0, null, 0], [2, "hirange", "INTEGER", 0, null, 0], [3, "royalty", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "titles", "title_id", "title_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "sales": {"columns": [[0, "stor_id", "TEXT", 1, null, 1], [1, "ord_num", "TEXT", 1, null, 2], [2, "ord_date", "DATETIME", 1, null, 0], [3, "qty", "INTEGER", 1, null, 0], [4, "payterms", "TEXT", 1, null, 0], [5, "title_id", "TEXT", 1, null, 3]], "primary_keys": ["stor_id", "ord_num", "title_id"], "foreign_keys": [[0, 0, "titles", "title_id", "title_id", "CASCADE", "CASCADE", "NONE"], [1, 0, "stores", "stor_id", "stor_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "stor_id"], [1, 1, "ord_num"], [2, 5, "title_id"]]], "check_constraints": []}, "titleauthor": {"columns": [[0, "au_id", "TEXT", 1, null, 1], [1, "title_id", "TEXT", 1, null, 2], [2, "au_ord", "INTEGER", 0, null, 0], [3, "royaltyper", "INTEGER", 0, null, 0]], "primary_keys": ["au_id", "title_id"], "foreign_keys": [[0, 0, "titles", "title_id", "title_id", "CASCADE", "CASCADE", "NONE"], [1, 0, "authors", "au_id", "au_id", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "au_id"], [1, 1, "title_id"]]], "check_constraints": []}}
CREATE TABLE authors ( au_id TEXT PRIMARY KEY, au_lname TEXT NOT NULL, au_fname TEXT NOT NULL, phone TEXT NOT NULL, address TEXT, city TEXT, state TEXT, zip TEXT, contract TEXT NOT NULL, UNIQUE (au_id) ); CREATE TABLE jobs ( job_id INTEGER PRIMARY KEY, job_desc TEXT NOT NULL, min_lvl INTEGER NOT NULL, max_lvl INTEGER NOT NULL ); CREATE TABLE publishers ( pub_id TEXT PRIMARY KEY, pub_name TEXT, city TEXT, state TEXT, country TEXT, UNIQUE (pub_id) ); CREATE TABLE employee ( emp_id TEXT PRIMARY KEY, fname TEXT NOT NULL, minit TEXT, lname TEXT NOT NULL, job_id INTEGER NOT NULL, job_lvl INTEGER, pub_id TEXT NOT NULL, hire_date DATETIME NOT NULL, UNIQUE (emp_id), FOREIGN KEY (pub_id) REFERENCES publishers(pub_id), FOREIGN KEY (job_id) REFERENCES jobs(job_id) ); CREATE TABLE pub_info ( pub_id TEXT PRIMARY KEY, logo BLOB, pr_info TEXT, UNIQUE (pub_id), FOREIGN KEY (pub_id) REFERENCES publishers(pub_id) ); CREATE TABLE stores ( stor_id TEXT PRIMARY KEY, stor_name TEXT, stor_address TEXT, city TEXT, state TEXT, zip TEXT, UNIQUE (stor_id) ); CREATE TABLE discounts ( discounttype TEXT NOT NULL, stor_id TEXT, lowqty INTEGER, highqty INTEGER, discount REAL NOT NULL, FOREIGN KEY (stor_id) REFERENCES stores(stor_id) ); CREATE TABLE titles ( title_id TEXT PRIMARY KEY, title TEXT NOT NULL, type TEXT NOT NULL, pub_id TEXT, price REAL, advance REAL, royalty INTEGER, ytd_sales INTEGER, notes TEXT, pubdate DATETIME NOT NULL, UNIQUE (title_id), FOREIGN KEY (pub_id) REFERENCES publishers(pub_id) ); CREATE TABLE roysched ( title_id TEXT NOT NULL, lorange INTEGER, hirange INTEGER, royalty INTEGER, FOREIGN KEY (title_id) REFERENCES titles(title_id) ); CREATE TABLE sales ( stor_id TEXT NOT NULL PRIMARY KEY, ord_num TEXT NOT NULL PRIMARY KEY, ord_date DATETIME NOT NULL, qty INTEGER NOT NULL, payterms TEXT NOT NULL, title_id TEXT NOT NULL PRIMARY KEY, PRIMARY KEY (stor_id, ord_num, title_id), UNIQUE (stor_id, ord_num, title_id), FOREIGN KEY (title_id) REFERENCES titles(title_id), FOREIGN KEY (stor_id) REFERENCES stores(stor_id) ); CREATE TABLE titleauthor ( au_id TEXT NOT NULL PRIMARY KEY, title_id TEXT NOT NULL PRIMARY KEY, au_ord INTEGER, royaltyper INTEGER, PRIMARY KEY (au_id, title_id), UNIQUE (au_id, title_id), FOREIGN KEY (title_id) REFERENCES titles(title_id), FOREIGN KEY (au_id) REFERENCES authors(au_id) );
genes
{"Classification": {"columns": [[0, "GeneID", "TEXT", 1, null, 1], [1, "Localization", "TEXT", 1, null, 0]], "primary_keys": ["GeneID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "GeneID"]]], "check_constraints": []}, "Genes": {"columns": [[0, "GeneID", "TEXT", 1, null, 0], [1, "Essential", "TEXT", 1, null, 0], [2, "Class", "TEXT", 1, null, 0], [3, "Complex", "TEXT", 0, null, 0], [4, "Phenotype", "TEXT", 1, null, 0], [5, "Motif", "TEXT", 1, null, 0], [6, "Chromosome", "INTEGER", 1, null, 0], [7, "Function", "TEXT", 1, null, 0], [8, "Localization", "TEXT", 1, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Classification", "GeneID", "GeneID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Interactions": {"columns": [[0, "GeneID1", "TEXT", 1, null, 1], [1, "GeneID2", "TEXT", 1, null, 2], [2, "Type", "TEXT", 1, null, 0], [3, "Expression_Corr", "REAL", 1, null, 0]], "primary_keys": ["GeneID1", "GeneID2"], "foreign_keys": [[0, 0, "Classification", "GeneID2", "GeneID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Classification", "GeneID1", "GeneID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "GeneID1"], [1, 1, "GeneID2"]]], "check_constraints": []}}
CREATE TABLE Classification ( GeneID TEXT NOT NULL PRIMARY KEY, Localization TEXT NOT NULL, UNIQUE (GeneID) ); CREATE TABLE Genes ( GeneID TEXT NOT NULL, Essential TEXT NOT NULL, Class TEXT NOT NULL, Complex TEXT, Phenotype TEXT NOT NULL, Motif TEXT NOT NULL, Chromosome INTEGER NOT NULL, Function TEXT NOT NULL, Localization TEXT NOT NULL, FOREIGN KEY (GeneID) REFERENCES Classification(GeneID) ); CREATE TABLE Interactions ( GeneID1 TEXT NOT NULL PRIMARY KEY, GeneID2 TEXT NOT NULL PRIMARY KEY, Type TEXT NOT NULL, Expression_Corr REAL NOT NULL, PRIMARY KEY (GeneID1, GeneID2), UNIQUE (GeneID1, GeneID2), FOREIGN KEY (GeneID2) REFERENCES Classification(GeneID), FOREIGN KEY (GeneID1) REFERENCES Classification(GeneID) );
coinmarketcap
{"coins": {"columns": [[0, "id", "INTEGER", 1, null, 1], [1, "name", "TEXT", 0, null, 0], [2, "slug", "TEXT", 0, null, 0], [3, "symbol", "TEXT", 0, null, 0], [4, "status", "TEXT", 0, null, 0], [5, "category", "TEXT", 0, null, 0], [6, "description", "TEXT", 0, null, 0], [7, "subreddit", "TEXT", 0, null, 0], [8, "notice", "TEXT", 0, null, 0], [9, "tags", "TEXT", 0, null, 0], [10, "tag_names", "TEXT", 0, null, 0], [11, "website", "TEXT", 0, null, 0], [12, "platform_id", "INTEGER", 0, null, 0], [13, "date_added", "TEXT", 0, null, 0], [14, "date_launched", "TEXT", 0, null, 0]], "primary_keys": ["id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "historical": {"columns": [[0, "date", "DATE", 0, null, 0], [1, "coin_id", "INTEGER", 0, null, 0], [2, "cmc_rank", "INTEGER", 0, null, 0], [3, "market_cap", "REAL", 0, null, 0], [4, "price", "REAL", 0, null, 0], [5, "open", "REAL", 0, null, 0], [6, "high", "REAL", 0, null, 0], [7, "low", "REAL", 0, null, 0], [8, "close", "REAL", 0, null, 0], [9, "time_high", "TEXT", 0, null, 0], [10, "time_low", "TEXT", 0, null, 0], [11, "volume_24h", "REAL", 0, null, 0], [12, "percent_change_1h", "REAL", 0, null, 0], [13, "percent_change_24h", "REAL", 0, null, 0], [14, "percent_change_7d", "REAL", 0, null, 0], [15, "circulating_supply", "REAL", 0, null, 0], [16, "total_supply", "REAL", 0, null, 0], [17, "max_supply", "REAL", 0, null, 0], [18, "num_market_pairs", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE coins ( id INTEGER NOT NULL PRIMARY KEY, name TEXT, slug TEXT, symbol TEXT, status TEXT, category TEXT, description TEXT, subreddit TEXT, notice TEXT, tags TEXT, tag_names TEXT, website TEXT, platform_id INTEGER, date_added TEXT, date_launched TEXT ); CREATE TABLE historical ( date DATE, coin_id INTEGER, cmc_rank INTEGER, market_cap REAL, price REAL, open REAL, high REAL, low REAL, close REAL, time_high TEXT, time_low TEXT, volume_24h REAL, percent_change_1h REAL, percent_change_24h REAL, percent_change_7d REAL, circulating_supply REAL, total_supply REAL, max_supply REAL, num_market_pairs INTEGER );
movies_4
{"country": {"columns": [[0, "country_id", "INTEGER", 1, null, 1], [1, "country_iso_code", "TEXT", 0, "NULL", 0], [2, "country_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["country_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "department": {"columns": [[0, "department_id", "INTEGER", 1, null, 1], [1, "department_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["department_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "gender": {"columns": [[0, "gender_id", "INTEGER", 1, null, 1], [1, "gender", "TEXT", 0, "NULL", 0]], "primary_keys": ["gender_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "genre": {"columns": [[0, "genre_id", "INTEGER", 1, null, 1], [1, "genre_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["genre_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "keyword": {"columns": [[0, "keyword_id", "INTEGER", 1, null, 1], [1, "keyword_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["keyword_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "language": {"columns": [[0, "language_id", "INTEGER", 1, null, 1], [1, "language_code", "TEXT", 0, "NULL", 0], [2, "language_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["language_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "language_role": {"columns": [[0, "role_id", "INTEGER", 1, null, 1], [1, "language_role", "TEXT", 0, "NULL", 0]], "primary_keys": ["role_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "movie": {"columns": [[0, "movie_id", "INTEGER", 1, null, 1], [1, "title", "TEXT", 0, "NULL", 0], [2, "budget", "INTEGER", 0, "NULL", 0], [3, "homepage", "TEXT", 0, "NULL", 0], [4, "overview", "TEXT", 0, "NULL", 0], [5, "popularity", "REAL", 0, "NULL", 0], [6, "release_date", "DATE", 0, "NULL", 0], [7, "revenue", "INTEGER", 0, "NULL", 0], [8, "runtime", "INTEGER", 0, "NULL", 0], [9, "movie_status", "TEXT", 0, "NULL", 0], [10, "tagline", "TEXT", 0, "NULL", 0], [11, "vote_average", "REAL", 0, "NULL", 0], [12, "vote_count", "INTEGER", 0, "NULL", 0]], "primary_keys": ["movie_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "movie_genres": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "genre_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "movie", "movie_id", "movie_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "genre", "genre_id", "genre_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "movie_languages": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "language_id", "INTEGER", 0, "NULL", 0], [2, "language_role_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "language_role", "language_role_id", "role_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "movie", "movie_id", "movie_id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "language", "language_id", "language_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "person": {"columns": [[0, "person_id", "INTEGER", 1, null, 1], [1, "person_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["person_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "movie_crew": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "person_id", "INTEGER", 0, "NULL", 0], [2, "department_id", "INTEGER", 0, "NULL", 0], [3, "job", "TEXT", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "person", "person_id", "person_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "movie", "movie_id", "movie_id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "department", "department_id", "department_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "production_company": {"columns": [[0, "company_id", "INTEGER", 1, null, 1], [1, "company_name", "TEXT", 0, "NULL", 0]], "primary_keys": ["company_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "production_country": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "country_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "movie", "movie_id", "movie_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "country", "country_id", "country_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "movie_cast": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "person_id", "INTEGER", 0, "NULL", 0], [2, "character_name", "TEXT", 0, "NULL", 0], [3, "gender_id", "INTEGER", 0, "NULL", 0], [4, "cast_order", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "person", "person_id", "person_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "movie", "movie_id", "movie_id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "gender", "gender_id", "gender_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "movie_keywords": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "keyword_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "keyword", "keyword_id", null, "NO ACTION", "NO ACTION", "NONE"], [1, 0, "movie", "movie_id", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "movie_company": {"columns": [[0, "movie_id", "INTEGER", 0, "NULL", 0], [1, "company_id", "INTEGER", 0, "NULL", 0]], "primary_keys": [], "foreign_keys": [[0, 0, "production_company", "company_id", null, "NO ACTION", "NO ACTION", "NONE"], [1, 0, "movie", "movie_id", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE country ( country_id INTEGER NOT NULL PRIMARY KEY, country_iso_code TEXT DEFAULT NULL, country_name TEXT DEFAULT NULL ); CREATE TABLE department ( department_id INTEGER NOT NULL PRIMARY KEY, department_name TEXT DEFAULT NULL ); CREATE TABLE gender ( gender_id INTEGER NOT NULL PRIMARY KEY, gender TEXT DEFAULT NULL ); CREATE TABLE genre ( genre_id INTEGER NOT NULL PRIMARY KEY, genre_name TEXT DEFAULT NULL ); CREATE TABLE keyword ( keyword_id INTEGER NOT NULL PRIMARY KEY, keyword_name TEXT DEFAULT NULL ); CREATE TABLE language ( language_id INTEGER NOT NULL PRIMARY KEY, language_code TEXT DEFAULT NULL, language_name TEXT DEFAULT NULL ); CREATE TABLE language_role ( role_id INTEGER NOT NULL PRIMARY KEY, language_role TEXT DEFAULT NULL ); CREATE TABLE movie ( movie_id INTEGER NOT NULL PRIMARY KEY, title TEXT DEFAULT NULL, budget INTEGER DEFAULT NULL, homepage TEXT DEFAULT NULL, overview TEXT DEFAULT NULL, popularity REAL DEFAULT NULL, release_date DATE DEFAULT NULL, revenue INTEGER DEFAULT NULL, runtime INTEGER DEFAULT NULL, movie_status TEXT DEFAULT NULL, tagline TEXT DEFAULT NULL, vote_average REAL DEFAULT NULL, vote_count INTEGER DEFAULT NULL ); CREATE TABLE movie_genres ( movie_id INTEGER DEFAULT NULL, genre_id INTEGER DEFAULT NULL, FOREIGN KEY (movie_id) REFERENCES movie(movie_id), FOREIGN KEY (genre_id) REFERENCES genre(genre_id) ); CREATE TABLE movie_languages ( movie_id INTEGER DEFAULT NULL, language_id INTEGER DEFAULT NULL, language_role_id INTEGER DEFAULT NULL, FOREIGN KEY (language_role_id) REFERENCES language_role(role_id), FOREIGN KEY (movie_id) REFERENCES movie(movie_id), FOREIGN KEY (language_id) REFERENCES language(language_id) ); CREATE TABLE person ( person_id INTEGER NOT NULL PRIMARY KEY, person_name TEXT DEFAULT NULL ); CREATE TABLE movie_crew ( movie_id INTEGER DEFAULT NULL, person_id INTEGER DEFAULT NULL, department_id INTEGER DEFAULT NULL, job TEXT DEFAULT NULL, FOREIGN KEY (person_id) REFERENCES person(person_id), FOREIGN KEY (movie_id) REFERENCES movie(movie_id), FOREIGN KEY (department_id) REFERENCES department(department_id) ); CREATE TABLE production_company ( company_id INTEGER NOT NULL PRIMARY KEY, company_name TEXT DEFAULT NULL ); CREATE TABLE production_country ( movie_id INTEGER DEFAULT NULL, country_id INTEGER DEFAULT NULL, FOREIGN KEY (movie_id) REFERENCES movie(movie_id), FOREIGN KEY (country_id) REFERENCES country(country_id) ); CREATE TABLE movie_cast ( movie_id INTEGER DEFAULT NULL, person_id INTEGER DEFAULT NULL, character_name TEXT DEFAULT NULL, gender_id INTEGER DEFAULT NULL, cast_order INTEGER DEFAULT NULL, FOREIGN KEY (person_id) REFERENCES person(person_id), FOREIGN KEY (movie_id) REFERENCES movie(movie_id), FOREIGN KEY (gender_id) REFERENCES gender(gender_id) ); CREATE TABLE movie_keywords ( movie_id INTEGER DEFAULT NULL, keyword_id INTEGER DEFAULT NULL, FOREIGN KEY (keyword_id) REFERENCES keyword(None), FOREIGN KEY (movie_id) REFERENCES movie(None) ); CREATE TABLE movie_company ( movie_id INTEGER DEFAULT NULL, company_id INTEGER DEFAULT NULL, FOREIGN KEY (company_id) REFERENCES production_company(None), FOREIGN KEY (movie_id) REFERENCES movie(None) );
address
{"CBSA": {"columns": [[0, "CBSA", "INTEGER", 0, null, 1], [1, "CBSA_name", "TEXT", 0, null, 0], [2, "CBSA_type", "TEXT", 0, null, 0]], "primary_keys": ["CBSA"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "state": {"columns": [[0, "abbreviation", "TEXT", 0, null, 1], [1, "name", "TEXT", 0, null, 0]], "primary_keys": ["abbreviation"], "foreign_keys": [], "unique_constraints": [[[0, 0, "abbreviation"]]], "check_constraints": []}, "congress": {"columns": [[0, "cognress_rep_id", "TEXT", 0, null, 1], [1, "first_name", "TEXT", 0, null, 0], [2, "last_name", "TEXT", 0, null, 0], [3, "CID", "TEXT", 0, null, 0], [4, "party", "TEXT", 0, null, 0], [5, "state", "TEXT", 0, null, 0], [6, "abbreviation", "TEXT", 0, null, 0], [7, "House", "TEXT", 0, null, 0], [8, "District", "INTEGER", 0, null, 0], [9, "land_area", "REAL", 0, null, 0]], "primary_keys": ["cognress_rep_id"], "foreign_keys": [[0, 0, "state", "abbreviation", "abbreviation", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "cognress_rep_id"]]], "check_constraints": []}, "zip_data": {"columns": [[0, "zip_code", "INTEGER", 0, null, 1], [1, "city", "TEXT", 0, null, 0], [2, "state", "TEXT", 0, null, 0], [3, "multi_county", "TEXT", 0, null, 0], [4, "type", "TEXT", 0, null, 0], [5, "organization", "TEXT", 0, null, 0], [6, "time_zone", "TEXT", 0, null, 0], [7, "daylight_savings", "TEXT", 0, null, 0], [8, "latitude", "REAL", 0, null, 0], [9, "longitude", "REAL", 0, null, 0], [10, "elevation", "INTEGER", 0, null, 0], [11, "state_fips", "INTEGER", 0, null, 0], [12, "county_fips", "INTEGER", 0, null, 0], [13, "region", "TEXT", 0, null, 0], [14, "division", "TEXT", 0, null, 0], [15, "population_2020", "INTEGER", 0, null, 0], [16, "population_2010", "INTEGER", 0, null, 0], [17, "households", "INTEGER", 0, null, 0], [18, "avg_house_value", "INTEGER", 0, null, 0], [19, "avg_income_per_household", "INTEGER", 0, null, 0], [20, "persons_per_household", "REAL", 0, null, 0], [21, "white_population", "INTEGER", 0, null, 0], [22, "black_population", "INTEGER", 0, null, 0], [23, "hispanic_population", "INTEGER", 0, null, 0], [24, "asian_population", "INTEGER", 0, null, 0], [25, "american_indian_population", "INTEGER", 0, null, 0], [26, "hawaiian_population", "INTEGER", 0, null, 0], [27, "other_population", "INTEGER", 0, null, 0], [28, "male_population", "INTEGER", 0, null, 0], [29, "female_population", "INTEGER", 0, null, 0], [30, "median_age", "REAL", 0, null, 0], [31, "male_median_age", "REAL", 0, null, 0], [32, "female_median_age", "REAL", 0, null, 0], [33, "residential_mailboxes", "INTEGER", 0, null, 0], [34, "business_mailboxes", "INTEGER", 0, null, 0], [35, "total_delivery_receptacles", "INTEGER", 0, null, 0], [36, "businesses", "INTEGER", 0, null, 0], [37, "1st_quarter_payroll", "INTEGER", 0, null, 0], [38, "annual_payroll", "INTEGER", 0, null, 0], [39, "employees", "INTEGER", 0, null, 0], [40, "water_area", "REAL", 0, null, 0], [41, "land_area", "REAL", 0, null, 0], [42, "single_family_delivery_units", "INTEGER", 0, null, 0], [43, "multi_family_delivery_units", "INTEGER", 0, null, 0], [44, "total_beneficiaries", "INTEGER", 0, null, 0], [45, "retired_workers", "INTEGER", 0, null, 0], [46, "disabled_workers", "INTEGER", 0, null, 0], [47, "parents_and_widowed", "INTEGER", 0, null, 0], [48, "spouses", "INTEGER", 0, null, 0], [49, "children", "INTEGER", 0, null, 0], [50, "over_65", "INTEGER", 0, null, 0], [51, "monthly_benefits_all", "INTEGER", 0, null, 0], [52, "monthly_benefits_retired_workers", "INTEGER", 0, null, 0], [53, "monthly_benefits_widowed", "INTEGER", 0, null, 0], [54, "CBSA", "INTEGER", 0, null, 0]], "primary_keys": ["zip_code"], "foreign_keys": [[0, 0, "CBSA", "CBSA", "CBSA", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "state", "state", "abbreviation", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "alias": {"columns": [[0, "zip_code", "INTEGER", 0, null, 1], [1, "alias", "TEXT", 0, null, 0]], "primary_keys": ["zip_code"], "foreign_keys": [[0, 0, "zip_data", "zip_code", "zip_code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "area_code": {"columns": [[0, "zip_code", "INTEGER", 0, null, 1], [1, "area_code", "INTEGER", 0, null, 2]], "primary_keys": ["zip_code", "area_code"], "foreign_keys": [[0, 0, "zip_data", "zip_code", "zip_code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "zip_code"], [1, 1, "area_code"]]], "check_constraints": []}, "avoid": {"columns": [[0, "zip_code", "INTEGER", 0, null, 1], [1, "bad_alias", "TEXT", 0, null, 2]], "primary_keys": ["zip_code", "bad_alias"], "foreign_keys": [[0, 0, "zip_data", "zip_code", "zip_code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "zip_code"], [1, 1, "bad_alias"]]], "check_constraints": []}, "country": {"columns": [[0, "zip_code", "INTEGER", 0, null, 1], [1, "county", "TEXT", 0, null, 2], [2, "state", "TEXT", 0, null, 0]], "primary_keys": ["zip_code", "county"], "foreign_keys": [[0, 0, "state", "state", "abbreviation", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "zip_data", "zip_code", "zip_code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "zip_code"], [1, 1, "county"]]], "check_constraints": []}, "zip_congress": {"columns": [[0, "zip_code", "INTEGER", 0, null, 1], [1, "district", "TEXT", 0, null, 2]], "primary_keys": ["zip_code", "district"], "foreign_keys": [[0, 0, "zip_data", "zip_code", "zip_code", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "congress", "district", "cognress_rep_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "zip_code"], [1, 1, "district"]]], "check_constraints": []}}
CREATE TABLE CBSA ( CBSA INTEGER PRIMARY KEY, CBSA_name TEXT, CBSA_type TEXT ); CREATE TABLE state ( abbreviation TEXT PRIMARY KEY, name TEXT, UNIQUE (abbreviation) ); CREATE TABLE congress ( cognress_rep_id TEXT PRIMARY KEY, first_name TEXT, last_name TEXT, CID TEXT, party TEXT, state TEXT, abbreviation TEXT, House TEXT, District INTEGER, land_area REAL, UNIQUE (cognress_rep_id), FOREIGN KEY (abbreviation) REFERENCES state(abbreviation) ); CREATE TABLE zip_data ( zip_code INTEGER PRIMARY KEY, city TEXT, state TEXT, multi_county TEXT, type TEXT, organization TEXT, time_zone TEXT, daylight_savings TEXT, latitude REAL, longitude REAL, elevation INTEGER, state_fips INTEGER, county_fips INTEGER, region TEXT, division TEXT, population_2020 INTEGER, population_2010 INTEGER, households INTEGER, avg_house_value INTEGER, avg_income_per_household INTEGER, persons_per_household REAL, white_population INTEGER, black_population INTEGER, hispanic_population INTEGER, asian_population INTEGER, american_indian_population INTEGER, hawaiian_population INTEGER, other_population INTEGER, male_population INTEGER, female_population INTEGER, median_age REAL, male_median_age REAL, female_median_age REAL, residential_mailboxes INTEGER, business_mailboxes INTEGER, total_delivery_receptacles INTEGER, businesses INTEGER, 1st_quarter_payroll INTEGER, annual_payroll INTEGER, employees INTEGER, water_area REAL, land_area REAL, single_family_delivery_units INTEGER, multi_family_delivery_units INTEGER, total_beneficiaries INTEGER, retired_workers INTEGER, disabled_workers INTEGER, parents_and_widowed INTEGER, spouses INTEGER, children INTEGER, over_65 INTEGER, monthly_benefits_all INTEGER, monthly_benefits_retired_workers INTEGER, monthly_benefits_widowed INTEGER, CBSA INTEGER, FOREIGN KEY (CBSA) REFERENCES CBSA(CBSA), FOREIGN KEY (state) REFERENCES state(abbreviation) ); CREATE TABLE alias ( zip_code INTEGER PRIMARY KEY, alias TEXT, FOREIGN KEY (zip_code) REFERENCES zip_data(zip_code) ); CREATE TABLE area_code ( zip_code INTEGER PRIMARY KEY, area_code INTEGER PRIMARY KEY, PRIMARY KEY (zip_code, area_code), UNIQUE (zip_code, area_code), FOREIGN KEY (zip_code) REFERENCES zip_data(zip_code) ); CREATE TABLE avoid ( zip_code INTEGER PRIMARY KEY, bad_alias TEXT PRIMARY KEY, PRIMARY KEY (zip_code, bad_alias), UNIQUE (zip_code, bad_alias), FOREIGN KEY (zip_code) REFERENCES zip_data(zip_code) ); CREATE TABLE country ( zip_code INTEGER PRIMARY KEY, county TEXT PRIMARY KEY, state TEXT, PRIMARY KEY (zip_code, county), UNIQUE (zip_code, county), FOREIGN KEY (state) REFERENCES state(abbreviation), FOREIGN KEY (zip_code) REFERENCES zip_data(zip_code) ); CREATE TABLE zip_congress ( zip_code INTEGER PRIMARY KEY, district TEXT PRIMARY KEY, PRIMARY KEY (zip_code, district), UNIQUE (zip_code, district), FOREIGN KEY (zip_code) REFERENCES zip_data(zip_code), FOREIGN KEY (district) REFERENCES congress(cognress_rep_id) );
software_company
{"Demog": {"columns": [[0, "GEOID", "INTEGER", 0, null, 1], [1, "INHABITANTS_K", "REAL", 0, null, 0], [2, "INCOME_K", "REAL", 0, null, 0], [3, "A_VAR1", "REAL", 0, null, 0], [4, "A_VAR2", "REAL", 0, null, 0], [5, "A_VAR3", "REAL", 0, null, 0], [6, "A_VAR4", "REAL", 0, null, 0], [7, "A_VAR5", "REAL", 0, null, 0], [8, "A_VAR6", "REAL", 0, null, 0], [9, "A_VAR7", "REAL", 0, null, 0], [10, "A_VAR8", "REAL", 0, null, 0], [11, "A_VAR9", "REAL", 0, null, 0], [12, "A_VAR10", "REAL", 0, null, 0], [13, "A_VAR11", "REAL", 0, null, 0], [14, "A_VAR12", "REAL", 0, null, 0], [15, "A_VAR13", "REAL", 0, null, 0], [16, "A_VAR14", "REAL", 0, null, 0], [17, "A_VAR15", "REAL", 0, null, 0], [18, "A_VAR16", "REAL", 0, null, 0], [19, "A_VAR17", "REAL", 0, null, 0], [20, "A_VAR18", "REAL", 0, null, 0]], "primary_keys": ["GEOID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "mailings3": {"columns": [[0, "REFID", "INTEGER", 0, null, 1], [1, "REF_DATE", "DATETIME", 0, null, 0], [2, "RESPONSE", "TEXT", 0, null, 0]], "primary_keys": ["REFID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Customers": {"columns": [[0, "ID", "INTEGER", 0, null, 1], [1, "SEX", "TEXT", 0, null, 0], [2, "MARITAL_STATUS", "TEXT", 0, null, 0], [3, "GEOID", "INTEGER", 0, null, 0], [4, "EDUCATIONNUM", "INTEGER", 0, null, 0], [5, "OCCUPATION", "TEXT", 0, null, 0], [6, "age", "INTEGER", 0, null, 0]], "primary_keys": ["ID"], "foreign_keys": [[0, 0, "Demog", "GEOID", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Mailings1_2": {"columns": [[0, "REFID", "INTEGER", 0, null, 1], [1, "REF_DATE", "DATETIME", 0, null, 0], [2, "RESPONSE", "TEXT", 0, null, 0]], "primary_keys": ["REFID"], "foreign_keys": [[0, 0, "Customers", "REFID", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Sales": {"columns": [[0, "EVENTID", "INTEGER", 0, null, 1], [1, "REFID", "INTEGER", 0, null, 0], [2, "EVENT_DATE", "DATETIME", 0, null, 0], [3, "AMOUNT", "REAL", 0, null, 0]], "primary_keys": ["EVENTID"], "foreign_keys": [[0, 0, "Customers", "REFID", null, "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Demog ( GEOID INTEGER PRIMARY KEY, INHABITANTS_K REAL, INCOME_K REAL, A_VAR1 REAL, A_VAR2 REAL, A_VAR3 REAL, A_VAR4 REAL, A_VAR5 REAL, A_VAR6 REAL, A_VAR7 REAL, A_VAR8 REAL, A_VAR9 REAL, A_VAR10 REAL, A_VAR11 REAL, A_VAR12 REAL, A_VAR13 REAL, A_VAR14 REAL, A_VAR15 REAL, A_VAR16 REAL, A_VAR17 REAL, A_VAR18 REAL ); CREATE TABLE mailings3 ( REFID INTEGER PRIMARY KEY, REF_DATE DATETIME, RESPONSE TEXT ); CREATE TABLE Customers ( ID INTEGER PRIMARY KEY, SEX TEXT, MARITAL_STATUS TEXT, GEOID INTEGER, EDUCATIONNUM INTEGER, OCCUPATION TEXT, age INTEGER, FOREIGN KEY (GEOID) REFERENCES Demog(None) ); CREATE TABLE Mailings1_2 ( REFID INTEGER PRIMARY KEY, REF_DATE DATETIME, RESPONSE TEXT, FOREIGN KEY (REFID) REFERENCES Customers(None) ); CREATE TABLE Sales ( EVENTID INTEGER PRIMARY KEY, REFID INTEGER, EVENT_DATE DATETIME, AMOUNT REAL, FOREIGN KEY (REFID) REFERENCES Customers(None) );
student_loan
{"bool": {"columns": [[0, "name", "TEXT", 1, "''", 1]], "primary_keys": ["name"], "foreign_keys": [], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "person": {"columns": [[0, "name", "TEXT", 1, "''", 1]], "primary_keys": ["name"], "foreign_keys": [], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "disabled": {"columns": [[0, "name", "TEXT", 1, "''", 1]], "primary_keys": ["name"], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "enlist": {"columns": [[0, "name", "TEXT", 1, null, 0], [1, "organ", "TEXT", 1, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "filed_for_bankrupcy": {"columns": [[0, "name", "TEXT", 1, "''", 1]], "primary_keys": ["name"], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "longest_absense_from_school": {"columns": [[0, "name", "TEXT", 1, "''", 1], [1, "month", "INTEGER", 0, "0", 0]], "primary_keys": ["name"], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "male": {"columns": [[0, "name", "TEXT", 1, "''", 1]], "primary_keys": ["name"], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "no_payment_due": {"columns": [[0, "name", "TEXT", 1, "''", 1], [1, "bool", "TEXT", 0, null, 0]], "primary_keys": ["name"], "foreign_keys": [[0, 0, "bool", "bool", "name", "CASCADE", "CASCADE", "NONE"], [1, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "unemployed": {"columns": [[0, "name", "TEXT", 1, "''", 1]], "primary_keys": ["name"], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "enrolled": {"columns": [[0, "name", "TEXT", 1, null, 1], [1, "school", "TEXT", 1, null, 2], [2, "month", "INTEGER", 1, "0", 0]], "primary_keys": ["name", "school"], "foreign_keys": [[0, 0, "person", "name", "name", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "name"], [1, 1, "school"]]], "check_constraints": []}}
CREATE TABLE bool ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, UNIQUE (name) ); CREATE TABLE person ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, UNIQUE (name) ); CREATE TABLE disabled ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, UNIQUE (name), FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE enlist ( name TEXT NOT NULL, organ TEXT NOT NULL, FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE filed_for_bankrupcy ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, UNIQUE (name), FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE longest_absense_from_school ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, month INTEGER DEFAULT 0, UNIQUE (name), FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE male ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, UNIQUE (name), FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE no_payment_due ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, bool TEXT, UNIQUE (name), FOREIGN KEY (bool) REFERENCES bool(name), FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE unemployed ( name TEXT NOT NULL DEFAULT '' PRIMARY KEY, UNIQUE (name), FOREIGN KEY (name) REFERENCES person(name) ); CREATE TABLE enrolled ( name TEXT NOT NULL PRIMARY KEY, school TEXT NOT NULL PRIMARY KEY, month INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (name, school), UNIQUE (name, school), FOREIGN KEY (name) REFERENCES person(name) );
food_inspection_2
{"employee": {"columns": [[0, "employee_id", "INTEGER", 0, null, 1], [1, "first_name", "TEXT", 0, null, 0], [2, "last_name", "TEXT", 0, null, 0], [3, "address", "TEXT", 0, null, 0], [4, "city", "TEXT", 0, null, 0], [5, "state", "TEXT", 0, null, 0], [6, "zip", "INTEGER", 0, null, 0], [7, "phone", "TEXT", 0, null, 0], [8, "title", "TEXT", 0, null, 0], [9, "salary", "INTEGER", 0, null, 0], [10, "supervisor", "INTEGER", 0, null, 0]], "primary_keys": ["employee_id"], "foreign_keys": [[0, 0, "employee", "supervisor", "employee_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "establishment": {"columns": [[0, "license_no", "INTEGER", 0, null, 1], [1, "dba_name", "TEXT", 0, null, 0], [2, "aka_name", "TEXT", 0, null, 0], [3, "facility_type", "TEXT", 0, null, 0], [4, "risk_level", "INTEGER", 0, null, 0], [5, "address", "TEXT", 0, null, 0], [6, "city", "TEXT", 0, null, 0], [7, "state", "TEXT", 0, null, 0], [8, "zip", "INTEGER", 0, null, 0], [9, "latitude", "REAL", 0, null, 0], [10, "longitude", "REAL", 0, null, 0], [11, "ward", "INTEGER", 0, null, 0]], "primary_keys": ["license_no"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "inspection": {"columns": [[0, "inspection_id", "INTEGER", 0, null, 1], [1, "inspection_date", "DATE", 0, null, 0], [2, "inspection_type", "TEXT", 0, null, 0], [3, "results", "TEXT", 0, null, 0], [4, "employee_id", "INTEGER", 0, null, 0], [5, "license_no", "INTEGER", 0, null, 0], [6, "followup_to", "INTEGER", 0, null, 0]], "primary_keys": ["inspection_id"], "foreign_keys": [[0, 0, "inspection", "followup_to", "inspection_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "establishment", "license_no", "license_no", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "employee", "employee_id", "employee_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "inspection_point": {"columns": [[0, "point_id", "INTEGER", 0, null, 1], [1, "Description", "TEXT", 0, null, 0], [2, "category", "TEXT", 0, null, 0], [3, "code", "TEXT", 0, null, 0], [4, "fine", "INTEGER", 0, null, 0], [5, "point_level", "TEXT", 0, null, 0]], "primary_keys": ["point_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "violation": {"columns": [[0, "inspection_id", "INTEGER", 0, null, 1], [1, "point_id", "INTEGER", 0, null, 2], [2, "fine", "INTEGER", 0, null, 0], [3, "inspector_comment", "TEXT", 0, null, 0]], "primary_keys": ["inspection_id", "point_id"], "foreign_keys": [[0, 0, "inspection_point", "point_id", "point_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "inspection", "inspection_id", "inspection_id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "inspection_id"], [1, 1, "point_id"]]], "check_constraints": []}}
CREATE TABLE employee ( employee_id INTEGER PRIMARY KEY, first_name TEXT, last_name TEXT, address TEXT, city TEXT, state TEXT, zip INTEGER, phone TEXT, title TEXT, salary INTEGER, supervisor INTEGER, FOREIGN KEY (supervisor) REFERENCES employee(employee_id) ); CREATE TABLE establishment ( license_no INTEGER PRIMARY KEY, dba_name TEXT, aka_name TEXT, facility_type TEXT, risk_level INTEGER, address TEXT, city TEXT, state TEXT, zip INTEGER, latitude REAL, longitude REAL, ward INTEGER ); CREATE TABLE inspection ( inspection_id INTEGER PRIMARY KEY, inspection_date DATE, inspection_type TEXT, results TEXT, employee_id INTEGER, license_no INTEGER, followup_to INTEGER, FOREIGN KEY (followup_to) REFERENCES inspection(inspection_id), FOREIGN KEY (license_no) REFERENCES establishment(license_no), FOREIGN KEY (employee_id) REFERENCES employee(employee_id) ); CREATE TABLE inspection_point ( point_id INTEGER PRIMARY KEY, Description TEXT, category TEXT, code TEXT, fine INTEGER, point_level TEXT ); CREATE TABLE violation ( inspection_id INTEGER PRIMARY KEY, point_id INTEGER PRIMARY KEY, fine INTEGER, inspector_comment TEXT, PRIMARY KEY (inspection_id, point_id), UNIQUE (inspection_id, point_id), FOREIGN KEY (point_id) REFERENCES inspection_point(point_id), FOREIGN KEY (inspection_id) REFERENCES inspection(inspection_id) );
human_resources
{"location": {"columns": [[0, "locationID", "INTEGER", 0, null, 1], [1, "locationcity", "TEXT", 0, null, 0], [2, "address", "TEXT", 0, null, 0], [3, "state", "TEXT", 0, null, 0], [4, "zipcode", "INTEGER", 0, null, 0], [5, "officephone", "TEXT", 0, null, 0]], "primary_keys": ["locationID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "position": {"columns": [[0, "positionID", "INTEGER", 0, null, 1], [1, "positiontitle", "TEXT", 0, null, 0], [2, "educationrequired", "TEXT", 0, null, 0], [3, "minsalary", "TEXT", 0, null, 0], [4, "maxsalary", "TEXT", 0, null, 0]], "primary_keys": ["positionID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "employee": {"columns": [[0, "ssn", "TEXT", 0, null, 1], [1, "lastname", "TEXT", 0, null, 0], [2, "firstname", "TEXT", 0, null, 0], [3, "hiredate", "TEXT", 0, null, 0], [4, "salary", "TEXT", 0, null, 0], [5, "gender", "TEXT", 0, null, 0], [6, "performance", "TEXT", 0, null, 0], [7, "positionID", "INTEGER", 0, null, 0], [8, "locationID", "INTEGER", 0, null, 0]], "primary_keys": ["ssn"], "foreign_keys": [[0, 0, "position", "positionID", "positionID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "location", "locationID", "locationID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "ssn"]]], "check_constraints": []}}
CREATE TABLE location ( locationID INTEGER PRIMARY KEY, locationcity TEXT, address TEXT, state TEXT, zipcode INTEGER, officephone TEXT ); CREATE TABLE position ( positionID INTEGER PRIMARY KEY, positiontitle TEXT, educationrequired TEXT, minsalary TEXT, maxsalary TEXT ); CREATE TABLE employee ( ssn TEXT PRIMARY KEY, lastname TEXT, firstname TEXT, hiredate TEXT, salary TEXT, gender TEXT, performance TEXT, positionID INTEGER, locationID INTEGER, UNIQUE (ssn), FOREIGN KEY (positionID) REFERENCES position(positionID), FOREIGN KEY (locationID) REFERENCES location(locationID) );
world_development_indicators
{"Country": {"columns": [[0, "CountryCode", "TEXT", 1, null, 1], [1, "ShortName", "TEXT", 0, null, 0], [2, "TableName", "TEXT", 0, null, 0], [3, "LongName", "TEXT", 0, null, 0], [4, "Alpha2Code", "TEXT", 0, null, 0], [5, "CurrencyUnit", "TEXT", 0, null, 0], [6, "SpecialNotes", "TEXT", 0, null, 0], [7, "Region", "TEXT", 0, null, 0], [8, "IncomeGroup", "TEXT", 0, null, 0], [9, "Wb2Code", "TEXT", 0, null, 0], [10, "NationalAccountsBaseYear", "TEXT", 0, null, 0], [11, "NationalAccountsReferenceYear", "TEXT", 0, null, 0], [12, "SnaPriceValuation", "TEXT", 0, null, 0], [13, "LendingCategory", "TEXT", 0, null, 0], [14, "OtherGroups", "TEXT", 0, null, 0], [15, "SystemOfNationalAccounts", "TEXT", 0, null, 0], [16, "AlternativeConversionFactor", "TEXT", 0, null, 0], [17, "PppSurveyYear", "TEXT", 0, null, 0], [18, "BalanceOfPaymentsManualInUse", "TEXT", 0, null, 0], [19, "ExternalDebtReportingStatus", "TEXT", 0, null, 0], [20, "SystemOfTrade", "TEXT", 0, null, 0], [21, "GovernmentAccountingConcept", "TEXT", 0, null, 0], [22, "ImfDataDisseminationStandard", "TEXT", 0, null, 0], [23, "LatestPopulationCensus", "TEXT", 0, null, 0], [24, "LatestHouseholdSurvey", "TEXT", 0, null, 0], [25, "SourceOfMostRecentIncomeAndExpenditureData", "TEXT", 0, null, 0], [26, "VitalRegistrationComplete", "TEXT", 0, null, 0], [27, "LatestAgriculturalCensus", "TEXT", 0, null, 0], [28, "LatestIndustrialData", "INTEGER", 0, null, 0], [29, "LatestTradeData", "INTEGER", 0, null, 0], [30, "LatestWaterWithdrawalData", "INTEGER", 0, null, 0]], "primary_keys": ["CountryCode"], "foreign_keys": [], "unique_constraints": [[[0, 0, "CountryCode"]]], "check_constraints": []}, "Series": {"columns": [[0, "SeriesCode", "TEXT", 1, null, 1], [1, "Topic", "TEXT", 0, null, 0], [2, "IndicatorName", "TEXT", 0, null, 0], [3, "ShortDefinition", "TEXT", 0, null, 0], [4, "LongDefinition", "TEXT", 0, null, 0], [5, "UnitOfMeasure", "TEXT", 0, null, 0], [6, "Periodicity", "TEXT", 0, null, 0], [7, "BasePeriod", "TEXT", 0, null, 0], [8, "OtherNotes", "INTEGER", 0, null, 0], [9, "AggregationMethod", "TEXT", 0, null, 0], [10, "LimitationsAndExceptions", "TEXT", 0, null, 0], [11, "NotesFromOriginalSource", "TEXT", 0, null, 0], [12, "GeneralComments", "TEXT", 0, null, 0], [13, "Source", "TEXT", 0, null, 0], [14, "StatisticalConceptAndMethodology", "TEXT", 0, null, 0], [15, "DevelopmentRelevance", "TEXT", 0, null, 0], [16, "RelatedSourceLinks", "TEXT", 0, null, 0], [17, "OtherWebLinks", "INTEGER", 0, null, 0], [18, "RelatedIndicators", "INTEGER", 0, null, 0], [19, "LicenseType", "TEXT", 0, null, 0]], "primary_keys": ["SeriesCode"], "foreign_keys": [], "unique_constraints": [[[0, 0, "SeriesCode"]]], "check_constraints": []}, "CountryNotes": {"columns": [[0, "Countrycode", "TEXT", 1, null, 1], [1, "Seriescode", "TEXT", 1, null, 2], [2, "Description", "TEXT", 0, null, 0]], "primary_keys": ["Countrycode", "Seriescode"], "foreign_keys": [[0, 0, "Country", "Countrycode", "CountryCode", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Series", "Seriescode", "SeriesCode", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Countrycode"], [1, 1, "Seriescode"]]], "check_constraints": []}, "Footnotes": {"columns": [[0, "Countrycode", "TEXT", 1, null, 1], [1, "Seriescode", "TEXT", 1, null, 2], [2, "Year", "TEXT", 0, null, 3], [3, "Description", "TEXT", 0, null, 0]], "primary_keys": ["Countrycode", "Seriescode", "Year"], "foreign_keys": [[0, 0, "Country", "Countrycode", "CountryCode", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Series", "Seriescode", "SeriesCode", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Countrycode"], [1, 1, "Seriescode"], [2, 2, "Year"]]], "check_constraints": []}, "Indicators": {"columns": [[0, "CountryName", "TEXT", 0, null, 0], [1, "CountryCode", "TEXT", 1, null, 1], [2, "IndicatorName", "TEXT", 0, null, 0], [3, "IndicatorCode", "TEXT", 1, null, 2], [4, "Year", "INTEGER", 1, null, 3], [5, "Value", "INTEGER", 0, null, 0]], "primary_keys": ["CountryCode", "IndicatorCode", "Year"], "foreign_keys": [[0, 0, "Country", "CountryCode", "CountryCode", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 1, "CountryCode"], [1, 3, "IndicatorCode"], [2, 4, "Year"]]], "check_constraints": []}, "SeriesNotes": {"columns": [[0, "Seriescode", "TEXT", 1, null, 1], [1, "Year", "TEXT", 1, null, 2], [2, "Description", "TEXT", 0, null, 0]], "primary_keys": ["Seriescode", "Year"], "foreign_keys": [[0, 0, "Series", "Seriescode", "SeriesCode", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Seriescode"], [1, 1, "Year"]]], "check_constraints": []}}
CREATE TABLE Country ( CountryCode TEXT NOT NULL PRIMARY KEY, ShortName TEXT, TableName TEXT, LongName TEXT, Alpha2Code TEXT, CurrencyUnit TEXT, SpecialNotes TEXT, Region TEXT, IncomeGroup TEXT, Wb2Code TEXT, NationalAccountsBaseYear TEXT, NationalAccountsReferenceYear TEXT, SnaPriceValuation TEXT, LendingCategory TEXT, OtherGroups TEXT, SystemOfNationalAccounts TEXT, AlternativeConversionFactor TEXT, PppSurveyYear TEXT, BalanceOfPaymentsManualInUse TEXT, ExternalDebtReportingStatus TEXT, SystemOfTrade TEXT, GovernmentAccountingConcept TEXT, ImfDataDisseminationStandard TEXT, LatestPopulationCensus TEXT, LatestHouseholdSurvey TEXT, SourceOfMostRecentIncomeAndExpenditureData TEXT, VitalRegistrationComplete TEXT, LatestAgriculturalCensus TEXT, LatestIndustrialData INTEGER, LatestTradeData INTEGER, LatestWaterWithdrawalData INTEGER, UNIQUE (CountryCode) ); CREATE TABLE Series ( SeriesCode TEXT NOT NULL PRIMARY KEY, Topic TEXT, IndicatorName TEXT, ShortDefinition TEXT, LongDefinition TEXT, UnitOfMeasure TEXT, Periodicity TEXT, BasePeriod TEXT, OtherNotes INTEGER, AggregationMethod TEXT, LimitationsAndExceptions TEXT, NotesFromOriginalSource TEXT, GeneralComments TEXT, Source TEXT, StatisticalConceptAndMethodology TEXT, DevelopmentRelevance TEXT, RelatedSourceLinks TEXT, OtherWebLinks INTEGER, RelatedIndicators INTEGER, LicenseType TEXT, UNIQUE (SeriesCode) ); CREATE TABLE CountryNotes ( Countrycode TEXT NOT NULL PRIMARY KEY, Seriescode TEXT NOT NULL PRIMARY KEY, Description TEXT, PRIMARY KEY (Countrycode, Seriescode), UNIQUE (Countrycode, Seriescode), FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode), FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode) ); CREATE TABLE Footnotes ( Countrycode TEXT NOT NULL PRIMARY KEY, Seriescode TEXT NOT NULL PRIMARY KEY, Year TEXT PRIMARY KEY, Description TEXT, PRIMARY KEY (Countrycode, Seriescode, Year), UNIQUE (Countrycode, Seriescode, Year), FOREIGN KEY (Countrycode) REFERENCES Country(CountryCode), FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode) ); CREATE TABLE Indicators ( CountryName TEXT, CountryCode TEXT NOT NULL PRIMARY KEY, IndicatorName TEXT, IndicatorCode TEXT NOT NULL PRIMARY KEY, Year INTEGER NOT NULL PRIMARY KEY, Value INTEGER, PRIMARY KEY (CountryCode, IndicatorCode, Year), UNIQUE (CountryCode, IndicatorCode, Year), FOREIGN KEY (CountryCode) REFERENCES Country(CountryCode) ); CREATE TABLE SeriesNotes ( Seriescode TEXT NOT NULL PRIMARY KEY, Year TEXT NOT NULL PRIMARY KEY, Description TEXT, PRIMARY KEY (Seriescode, Year), UNIQUE (Seriescode, Year), FOREIGN KEY (Seriescode) REFERENCES Series(SeriesCode) );
social_media
{"location": {"columns": [[0, "LocationID", "INTEGER", 0, null, 1], [1, "Country", "TEXT", 0, null, 0], [2, "State", "TEXT", 0, null, 0], [3, "StateCode", "TEXT", 0, null, 0], [4, "City", "TEXT", 0, null, 0]], "primary_keys": ["LocationID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "user": {"columns": [[0, "UserID", "TEXT", 0, null, 1], [1, "Gender", "TEXT", 0, null, 0]], "primary_keys": ["UserID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "UserID"]]], "check_constraints": []}, "twitter": {"columns": [[0, "TweetID", "TEXT", 0, null, 1], [1, "Weekday", "TEXT", 0, null, 0], [2, "Hour", "INTEGER", 0, null, 0], [3, "Day", "INTEGER", 0, null, 0], [4, "Lang", "TEXT", 0, null, 0], [5, "IsReshare", "TEXT", 0, null, 0], [6, "Reach", "INTEGER", 0, null, 0], [7, "RetweetCount", "INTEGER", 0, null, 0], [8, "Likes", "INTEGER", 0, null, 0], [9, "Klout", "INTEGER", 0, null, 0], [10, "Sentiment", "REAL", 0, null, 0], [11, "text", "TEXT", 0, null, 0], [12, "LocationID", "INTEGER", 0, null, 0], [13, "UserID", "TEXT", 0, null, 0]], "primary_keys": ["TweetID"], "foreign_keys": [[0, 0, "user", "UserID", "UserID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "location", "LocationID", "LocationID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "TweetID"]]], "check_constraints": []}}
CREATE TABLE location ( LocationID INTEGER PRIMARY KEY, Country TEXT, State TEXT, StateCode TEXT, City TEXT ); CREATE TABLE user ( UserID TEXT PRIMARY KEY, Gender TEXT, UNIQUE (UserID) ); CREATE TABLE twitter ( TweetID TEXT PRIMARY KEY, Weekday TEXT, Hour INTEGER, Day INTEGER, Lang TEXT, IsReshare TEXT, Reach INTEGER, RetweetCount INTEGER, Likes INTEGER, Klout INTEGER, Sentiment REAL, text TEXT, LocationID INTEGER, UserID TEXT, UNIQUE (TweetID), FOREIGN KEY (UserID) REFERENCES user(UserID), FOREIGN KEY (LocationID) REFERENCES location(LocationID) );
authors
{"Author": {"columns": [[0, "Id", "INTEGER", 0, null, 1], [1, "Name", "TEXT", 0, null, 0], [2, "Affiliation", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Conference": {"columns": [[0, "Id", "INTEGER", 0, null, 1], [1, "ShortName", "TEXT", 0, null, 0], [2, "FullName", "TEXT", 0, null, 0], [3, "HomePage", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Journal": {"columns": [[0, "Id", "INTEGER", 0, null, 1], [1, "ShortName", "TEXT", 0, null, 0], [2, "FullName", "TEXT", 0, null, 0], [3, "HomePage", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Paper": {"columns": [[0, "Id", "INTEGER", 0, null, 1], [1, "Title", "TEXT", 0, null, 0], [2, "Year", "INTEGER", 0, null, 0], [3, "ConferenceId", "INTEGER", 0, null, 0], [4, "JournalId", "INTEGER", 0, null, 0], [5, "Keyword", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [[0, 0, "Journal", "JournalId", "Id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Conference", "ConferenceId", "Id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "PaperAuthor": {"columns": [[0, "PaperId", "INTEGER", 0, null, 0], [1, "AuthorId", "INTEGER", 0, null, 0], [2, "Name", "TEXT", 0, null, 0], [3, "Affiliation", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Author", "AuthorId", "Id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Paper", "PaperId", "Id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Author ( Id INTEGER PRIMARY KEY, Name TEXT, Affiliation TEXT ); CREATE TABLE Conference ( Id INTEGER PRIMARY KEY, ShortName TEXT, FullName TEXT, HomePage TEXT ); CREATE TABLE Journal ( Id INTEGER PRIMARY KEY, ShortName TEXT, FullName TEXT, HomePage TEXT ); CREATE TABLE Paper ( Id INTEGER PRIMARY KEY, Title TEXT, Year INTEGER, ConferenceId INTEGER, JournalId INTEGER, Keyword TEXT, FOREIGN KEY (JournalId) REFERENCES Journal(Id), FOREIGN KEY (ConferenceId) REFERENCES Conference(Id) ); CREATE TABLE PaperAuthor ( PaperId INTEGER, AuthorId INTEGER, Name TEXT, Affiliation TEXT, FOREIGN KEY (AuthorId) REFERENCES Author(Id), FOREIGN KEY (PaperId) REFERENCES Paper(Id) );
airline
{"Air Carriers": {"columns": [[0, "Code", "INTEGER", 0, null, 1], [1, "Description", "TEXT", 0, null, 0]], "primary_keys": ["Code"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Airports": {"columns": [[0, "Code", "TEXT", 0, null, 1], [1, "Description", "TEXT", 0, null, 0]], "primary_keys": ["Code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Code"]]], "check_constraints": []}, "Airlines": {"columns": [[0, "FL_DATE", "TEXT", 0, null, 0], [1, "OP_CARRIER_AIRLINE_ID", "INTEGER", 0, null, 0], [2, "TAIL_NUM", "TEXT", 0, null, 0], [3, "OP_CARRIER_FL_NUM", "INTEGER", 0, null, 0], [4, "ORIGIN_AIRPORT_ID", "INTEGER", 0, null, 0], [5, "ORIGIN_AIRPORT_SEQ_ID", "INTEGER", 0, null, 0], [6, "ORIGIN_CITY_MARKET_ID", "INTEGER", 0, null, 0], [7, "ORIGIN", "TEXT", 0, null, 0], [8, "DEST_AIRPORT_ID", "INTEGER", 0, null, 0], [9, "DEST_AIRPORT_SEQ_ID", "INTEGER", 0, null, 0], [10, "DEST_CITY_MARKET_ID", "INTEGER", 0, null, 0], [11, "DEST", "TEXT", 0, null, 0], [12, "CRS_DEP_TIME", "INTEGER", 0, null, 0], [13, "DEP_TIME", "INTEGER", 0, null, 0], [14, "DEP_DELAY", "INTEGER", 0, null, 0], [15, "DEP_DELAY_NEW", "INTEGER", 0, null, 0], [16, "ARR_TIME", "INTEGER", 0, null, 0], [17, "ARR_DELAY", "INTEGER", 0, null, 0], [18, "ARR_DELAY_NEW", "INTEGER", 0, null, 0], [19, "CANCELLED", "INTEGER", 0, null, 0], [20, "CANCELLATION_CODE", "TEXT", 0, null, 0], [21, "CRS_ELAPSED_TIME", "INTEGER", 0, null, 0], [22, "ACTUAL_ELAPSED_TIME", "INTEGER", 0, null, 0], [23, "CARRIER_DELAY", "INTEGER", 0, null, 0], [24, "WEATHER_DELAY", "INTEGER", 0, null, 0], [25, "NAS_DELAY", "INTEGER", 0, null, 0], [26, "SECURITY_DELAY", "INTEGER", 0, null, 0], [27, "LATE_AIRCRAFT_DELAY", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Air Carriers", "OP_CARRIER_AIRLINE_ID", "Code", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Airports", "DEST", "Code", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "Airports", "ORIGIN", "Code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Air Carriers ( Code INTEGER PRIMARY KEY, Description TEXT ); CREATE TABLE Airports ( Code TEXT PRIMARY KEY, Description TEXT, UNIQUE (Code) ); CREATE TABLE Airlines ( FL_DATE TEXT, OP_CARRIER_AIRLINE_ID INTEGER, TAIL_NUM TEXT, OP_CARRIER_FL_NUM INTEGER, ORIGIN_AIRPORT_ID INTEGER, ORIGIN_AIRPORT_SEQ_ID INTEGER, ORIGIN_CITY_MARKET_ID INTEGER, ORIGIN TEXT, DEST_AIRPORT_ID INTEGER, DEST_AIRPORT_SEQ_ID INTEGER, DEST_CITY_MARKET_ID INTEGER, DEST TEXT, CRS_DEP_TIME INTEGER, DEP_TIME INTEGER, DEP_DELAY INTEGER, DEP_DELAY_NEW INTEGER, ARR_TIME INTEGER, ARR_DELAY INTEGER, ARR_DELAY_NEW INTEGER, CANCELLED INTEGER, CANCELLATION_CODE TEXT, CRS_ELAPSED_TIME INTEGER, ACTUAL_ELAPSED_TIME INTEGER, CARRIER_DELAY INTEGER, WEATHER_DELAY INTEGER, NAS_DELAY INTEGER, SECURITY_DELAY INTEGER, LATE_AIRCRAFT_DELAY INTEGER, FOREIGN KEY (OP_CARRIER_AIRLINE_ID) REFERENCES Air Carriers(Code), FOREIGN KEY (DEST) REFERENCES Airports(Code), FOREIGN KEY (ORIGIN) REFERENCES Airports(Code) );
hockey
{"AwardsMisc": {"columns": [[0, "name", "TEXT", 1, null, 1], [1, "ID", "TEXT", 0, null, 0], [2, "award", "TEXT", 0, null, 0], [3, "year", "INTEGER", 0, null, 0], [4, "lgID", "TEXT", 0, null, 0], [5, "note", "TEXT", 0, null, 0]], "primary_keys": ["name"], "foreign_keys": [], "unique_constraints": [[[0, 0, "name"]]], "check_constraints": []}, "HOF": {"columns": [[0, "year", "INTEGER", 0, null, 0], [1, "hofID", "TEXT", 1, null, 1], [2, "name", "TEXT", 0, null, 0], [3, "category", "TEXT", 0, null, 0]], "primary_keys": ["hofID"], "foreign_keys": [], "unique_constraints": [[[0, 1, "hofID"]]], "check_constraints": []}, "Teams": {"columns": [[0, "year", "INTEGER", 1, null, 1], [1, "lgID", "TEXT", 0, null, 0], [2, "tmID", "TEXT", 1, null, 2], [3, "franchID", "TEXT", 0, null, 0], [4, "confID", "TEXT", 0, null, 0], [5, "divID", "TEXT", 0, null, 0], [6, "rank", "INTEGER", 0, null, 0], [7, "playoff", "TEXT", 0, null, 0], [8, "G", "INTEGER", 0, null, 0], [9, "W", "INTEGER", 0, null, 0], [10, "L", "INTEGER", 0, null, 0], [11, "T", "INTEGER", 0, null, 0], [12, "OTL", "TEXT", 0, null, 0], [13, "Pts", "INTEGER", 0, null, 0], [14, "SoW", "TEXT", 0, null, 0], [15, "SoL", "TEXT", 0, null, 0], [16, "GF", "INTEGER", 0, null, 0], [17, "GA", "INTEGER", 0, null, 0], [18, "name", "TEXT", 0, null, 0], [19, "PIM", "TEXT", 0, null, 0], [20, "BenchMinor", "TEXT", 0, null, 0], [21, "PPG", "TEXT", 0, null, 0], [22, "PPC", "TEXT", 0, null, 0], [23, "SHA", "TEXT", 0, null, 0], [24, "PKG", "TEXT", 0, null, 0], [25, "PKC", "TEXT", 0, null, 0], [26, "SHF", "TEXT", 0, null, 0]], "primary_keys": ["year", "tmID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "year"], [1, 2, "tmID"]]], "check_constraints": []}, "Coaches": {"columns": [[0, "coachID", "TEXT", 1, null, 1], [1, "year", "INTEGER", 1, null, 2], [2, "tmID", "TEXT", 1, null, 3], [3, "lgID", "TEXT", 0, null, 0], [4, "stint", "INTEGER", 1, null, 4], [5, "notes", "TEXT", 0, null, 0], [6, "g", "INTEGER", 0, null, 0], [7, "w", "INTEGER", 0, null, 0], [8, "l", "INTEGER", 0, null, 0], [9, "t", "INTEGER", 0, null, 0], [10, "postg", "TEXT", 0, null, 0], [11, "postw", "TEXT", 0, null, 0], [12, "postl", "TEXT", 0, null, 0], [13, "postt", "TEXT", 0, null, 0]], "primary_keys": ["coachID", "year", "tmID", "stint"], "foreign_keys": [[0, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "coachID"], [1, 1, "year"], [2, 2, "tmID"], [3, 4, "stint"]]], "check_constraints": []}, "AwardsCoaches": {"columns": [[0, "coachID", "TEXT", 0, null, 0], [1, "award", "TEXT", 0, null, 0], [2, "year", "INTEGER", 0, null, 0], [3, "lgID", "TEXT", 0, null, 0], [4, "note", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Coaches", "coachID", "coachID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Master": {"columns": [[0, "playerID", "TEXT", 0, null, 0], [1, "coachID", "TEXT", 0, null, 0], [2, "hofID", "TEXT", 0, null, 0], [3, "firstName", "TEXT", 0, null, 0], [4, "lastName", "TEXT", 1, null, 0], [5, "nameNote", "TEXT", 0, null, 0], [6, "nameGiven", "TEXT", 0, null, 0], [7, "nameNick", "TEXT", 0, null, 0], [8, "height", "TEXT", 0, null, 0], [9, "weight", "TEXT", 0, null, 0], [10, "shootCatch", "TEXT", 0, null, 0], [11, "legendsID", "TEXT", 0, null, 0], [12, "ihdbID", "TEXT", 0, null, 0], [13, "hrefID", "TEXT", 0, null, 0], [14, "firstNHL", "TEXT", 0, null, 0], [15, "lastNHL", "TEXT", 0, null, 0], [16, "firstWHA", "TEXT", 0, null, 0], [17, "lastWHA", "TEXT", 0, null, 0], [18, "pos", "TEXT", 0, null, 0], [19, "birthYear", "TEXT", 0, null, 0], [20, "birthMon", "TEXT", 0, null, 0], [21, "birthDay", "TEXT", 0, null, 0], [22, "birthCountry", "TEXT", 0, null, 0], [23, "birthState", "TEXT", 0, null, 0], [24, "birthCity", "TEXT", 0, null, 0], [25, "deathYear", "TEXT", 0, null, 0], [26, "deathMon", "TEXT", 0, null, 0], [27, "deathDay", "TEXT", 0, null, 0], [28, "deathCountry", "TEXT", 0, null, 0], [29, "deathState", "TEXT", 0, null, 0], [30, "deathCity", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Coaches", "coachID", "coachID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "AwardsPlayers": {"columns": [[0, "playerID", "TEXT", 1, null, 1], [1, "award", "TEXT", 1, null, 2], [2, "year", "INTEGER", 1, null, 3], [3, "lgID", "TEXT", 0, null, 0], [4, "note", "TEXT", 0, null, 0], [5, "pos", "TEXT", 0, null, 0]], "primary_keys": ["playerID", "award", "year"], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "playerID"], [1, 1, "award"], [2, 2, "year"]]], "check_constraints": []}, "CombinedShutouts": {"columns": [[0, "year", "INTEGER", 0, null, 0], [1, "month", "INTEGER", 0, null, 0], [2, "date", "INTEGER", 0, null, 0], [3, "tmID", "TEXT", 0, null, 0], [4, "oppID", "TEXT", 0, null, 0], [5, "R/P", "TEXT", 0, null, 0], [6, "IDgoalie1", "TEXT", 0, null, 0], [7, "IDgoalie2", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Master", "IDgoalie2", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Master", "IDgoalie1", "playerID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Goalies": {"columns": [[0, "playerID", "TEXT", 1, null, 1], [1, "year", "INTEGER", 1, null, 2], [2, "stint", "INTEGER", 1, null, 3], [3, "tmID", "TEXT", 0, null, 0], [4, "lgID", "TEXT", 0, null, 0], [5, "GP", "TEXT", 0, null, 0], [6, "Min", "TEXT", 0, null, 0], [7, "W", "TEXT", 0, null, 0], [8, "L", "TEXT", 0, null, 0], [9, "T/OL", "TEXT", 0, null, 0], [10, "ENG", "TEXT", 0, null, 0], [11, "SHO", "TEXT", 0, null, 0], [12, "GA", "TEXT", 0, null, 0], [13, "SA", "TEXT", 0, null, 0], [14, "PostGP", "TEXT", 0, null, 0], [15, "PostMin", "TEXT", 0, null, 0], [16, "PostW", "TEXT", 0, null, 0], [17, "PostL", "TEXT", 0, null, 0], [18, "PostT", "TEXT", 0, null, 0], [19, "PostENG", "TEXT", 0, null, 0], [20, "PostSHO", "TEXT", 0, null, 0], [21, "PostGA", "TEXT", 0, null, 0], [22, "PostSA", "TEXT", 0, null, 0]], "primary_keys": ["playerID", "year", "stint"], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "playerID"], [1, 1, "year"], [2, 2, "stint"]]], "check_constraints": []}, "GoaliesSC": {"columns": [[0, "playerID", "TEXT", 1, null, 1], [1, "year", "INTEGER", 1, null, 2], [2, "tmID", "TEXT", 0, null, 0], [3, "lgID", "TEXT", 0, null, 0], [4, "GP", "INTEGER", 0, null, 0], [5, "Min", "INTEGER", 0, null, 0], [6, "W", "INTEGER", 0, null, 0], [7, "L", "INTEGER", 0, null, 0], [8, "T", "INTEGER", 0, null, 0], [9, "SHO", "INTEGER", 0, null, 0], [10, "GA", "INTEGER", 0, null, 0]], "primary_keys": ["playerID", "year"], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "playerID"], [1, 1, "year"]]], "check_constraints": []}, "GoaliesShootout": {"columns": [[0, "playerID", "TEXT", 0, null, 0], [1, "year", "INTEGER", 0, null, 0], [2, "stint", "INTEGER", 0, null, 0], [3, "tmID", "TEXT", 0, null, 0], [4, "W", "INTEGER", 0, null, 0], [5, "L", "INTEGER", 0, null, 0], [6, "SA", "INTEGER", 0, null, 0], [7, "GA", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Scoring": {"columns": [[0, "playerID", "TEXT", 0, null, 0], [1, "year", "INTEGER", 0, null, 0], [2, "stint", "INTEGER", 0, null, 0], [3, "tmID", "TEXT", 0, null, 0], [4, "lgID", "TEXT", 0, null, 0], [5, "pos", "TEXT", 0, null, 0], [6, "GP", "INTEGER", 0, null, 0], [7, "G", "INTEGER", 0, null, 0], [8, "A", "INTEGER", 0, null, 0], [9, "Pts", "INTEGER", 0, null, 0], [10, "PIM", "INTEGER", 0, null, 0], [11, "+/-", "TEXT", 0, null, 0], [12, "PPG", "TEXT", 0, null, 0], [13, "PPA", "TEXT", 0, null, 0], [14, "SHG", "TEXT", 0, null, 0], [15, "SHA", "TEXT", 0, null, 0], [16, "GWG", "TEXT", 0, null, 0], [17, "GTG", "TEXT", 0, null, 0], [18, "SOG", "TEXT", 0, null, 0], [19, "PostGP", "TEXT", 0, null, 0], [20, "PostG", "TEXT", 0, null, 0], [21, "PostA", "TEXT", 0, null, 0], [22, "PostPts", "TEXT", 0, null, 0], [23, "PostPIM", "TEXT", 0, null, 0], [24, "Post+/-", "TEXT", 0, null, 0], [25, "PostPPG", "TEXT", 0, null, 0], [26, "PostPPA", "TEXT", 0, null, 0], [27, "PostSHG", "TEXT", 0, null, 0], [28, "PostSHA", "TEXT", 0, null, 0], [29, "PostGWG", "TEXT", 0, null, 0], [30, "PostSOG", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "ScoringSC": {"columns": [[0, "playerID", "TEXT", 0, null, 0], [1, "year", "INTEGER", 0, null, 0], [2, "tmID", "TEXT", 0, null, 0], [3, "lgID", "TEXT", 0, null, 0], [4, "pos", "TEXT", 0, null, 0], [5, "GP", "INTEGER", 0, null, 0], [6, "G", "INTEGER", 0, null, 0], [7, "A", "INTEGER", 0, null, 0], [8, "Pts", "INTEGER", 0, null, 0], [9, "PIM", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "ScoringShootout": {"columns": [[0, "playerID", "TEXT", 0, null, 0], [1, "year", "INTEGER", 0, null, 0], [2, "stint", "INTEGER", 0, null, 0], [3, "tmID", "TEXT", 0, null, 0], [4, "S", "INTEGER", 0, null, 0], [5, "G", "INTEGER", 0, null, 0], [6, "GDG", "INTEGER", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "ScoringSup": {"columns": [[0, "playerID", "TEXT", 0, null, 0], [1, "year", "INTEGER", 0, null, 0], [2, "PPA", "TEXT", 0, null, 0], [3, "SHA", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Master", "playerID", "playerID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "SeriesPost": {"columns": [[0, "year", "INTEGER", 0, null, 0], [1, "round", "TEXT", 0, null, 0], [2, "series", "TEXT", 0, null, 0], [3, "tmIDWinner", "TEXT", 0, null, 0], [4, "lgIDWinner", "TEXT", 0, null, 0], [5, "tmIDLoser", "TEXT", 0, null, 0], [6, "lgIDLoser", "TEXT", 0, null, 0], [7, "W", "INTEGER", 0, null, 0], [8, "L", "INTEGER", 0, null, 0], [9, "T", "INTEGER", 0, null, 0], [10, "GoalsWinner", "INTEGER", 0, null, 0], [11, "GoalsLoser", "INTEGER", 0, null, 0], [12, "note", "TEXT", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "tmIDLoser", "tmID", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmIDWinner", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [], "check_constraints": []}, "TeamSplits": {"columns": [[0, "year", "INTEGER", 1, null, 1], [1, "lgID", "TEXT", 0, null, 0], [2, "tmID", "TEXT", 1, null, 2], [3, "hW", "INTEGER", 0, null, 0], [4, "hL", "INTEGER", 0, null, 0], [5, "hT", "INTEGER", 0, null, 0], [6, "hOTL", "TEXT", 0, null, 0], [7, "rW", "INTEGER", 0, null, 0], [8, "rL", "INTEGER", 0, null, 0], [9, "rT", "INTEGER", 0, null, 0], [10, "rOTL", "TEXT", 0, null, 0], [11, "SepW", "TEXT", 0, null, 0], [12, "SepL", "TEXT", 0, null, 0], [13, "SepT", "TEXT", 0, null, 0], [14, "SepOL", "TEXT", 0, null, 0], [15, "OctW", "TEXT", 0, null, 0], [16, "OctL", "TEXT", 0, null, 0], [17, "OctT", "TEXT", 0, null, 0], [18, "OctOL", "TEXT", 0, null, 0], [19, "NovW", "TEXT", 0, null, 0], [20, "NovL", "TEXT", 0, null, 0], [21, "NovT", "TEXT", 0, null, 0], [22, "NovOL", "TEXT", 0, null, 0], [23, "DecW", "TEXT", 0, null, 0], [24, "DecL", "TEXT", 0, null, 0], [25, "DecT", "TEXT", 0, null, 0], [26, "DecOL", "TEXT", 0, null, 0], [27, "JanW", "INTEGER", 0, null, 0], [28, "JanL", "INTEGER", 0, null, 0], [29, "JanT", "INTEGER", 0, null, 0], [30, "JanOL", "TEXT", 0, null, 0], [31, "FebW", "INTEGER", 0, null, 0], [32, "FebL", "INTEGER", 0, null, 0], [33, "FebT", "INTEGER", 0, null, 0], [34, "FebOL", "TEXT", 0, null, 0], [35, "MarW", "TEXT", 0, null, 0], [36, "MarL", "TEXT", 0, null, 0], [37, "MarT", "TEXT", 0, null, 0], [38, "MarOL", "TEXT", 0, null, 0], [39, "AprW", "TEXT", 0, null, 0], [40, "AprL", "TEXT", 0, null, 0], [41, "AprT", "TEXT", 0, null, 0], [42, "AprOL", "TEXT", 0, null, 0]], "primary_keys": ["year", "tmID"], "foreign_keys": [[0, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "year"], [1, 2, "tmID"]]], "check_constraints": []}, "TeamVsTeam": {"columns": [[0, "year", "INTEGER", 1, null, 1], [1, "lgID", "TEXT", 0, null, 0], [2, "tmID", "TEXT", 1, null, 2], [3, "oppID", "TEXT", 1, null, 3], [4, "W", "INTEGER", 0, null, 0], [5, "L", "INTEGER", 0, null, 0], [6, "T", "INTEGER", 0, null, 0], [7, "OTL", "TEXT", 0, null, 0]], "primary_keys": ["year", "tmID", "oppID"], "foreign_keys": [[0, 0, "Teams", "oppID", "tmID", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [1, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "year"], [1, 2, "tmID"], [2, 3, "oppID"]]], "check_constraints": []}, "TeamsHalf": {"columns": [[0, "year", "INTEGER", 1, null, 1], [1, "lgID", "TEXT", 0, null, 0], [2, "tmID", "TEXT", 1, null, 2], [3, "half", "INTEGER", 1, null, 3], [4, "rank", "INTEGER", 0, null, 0], [5, "G", "INTEGER", 0, null, 0], [6, "W", "INTEGER", 0, null, 0], [7, "L", "INTEGER", 0, null, 0], [8, "T", "INTEGER", 0, null, 0], [9, "GF", "INTEGER", 0, null, 0], [10, "GA", "INTEGER", 0, null, 0]], "primary_keys": ["year", "tmID", "half"], "foreign_keys": [[0, 0, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "year"], [1, 2, "tmID"], [2, 3, "half"]]], "check_constraints": []}, "TeamsPost": {"columns": [[0, "year", "INTEGER", 1, null, 1], [1, "lgID", "TEXT", 0, null, 0], [2, "tmID", "TEXT", 1, null, 2], [3, "G", "INTEGER", 0, null, 0], [4, "W", "INTEGER", 0, null, 0], [5, "L", "INTEGER", 0, null, 0], [6, "T", "INTEGER", 0, null, 0], [7, "GF", "INTEGER", 0, null, 0], [8, "GA", "INTEGER", 0, null, 0], [9, "PIM", "TEXT", 0, null, 0], [10, "BenchMinor", "TEXT", 0, null, 0], [11, "PPG", "TEXT", 0, null, 0], [12, "PPC", "TEXT", 0, null, 0], [13, "SHA", "TEXT", 0, null, 0], [14, "PKG", "TEXT", 0, null, 0], [15, "PKC", "TEXT", 0, null, 0], [16, "SHF", "TEXT", 0, null, 0]], "primary_keys": ["year", "tmID"], "foreign_keys": [[0, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "year"], [1, 2, "tmID"]]], "check_constraints": []}, "TeamsSC": {"columns": [[0, "year", "INTEGER", 1, null, 1], [1, "lgID", "TEXT", 0, null, 0], [2, "tmID", "TEXT", 1, null, 2], [3, "G", "INTEGER", 0, null, 0], [4, "W", "INTEGER", 0, null, 0], [5, "L", "INTEGER", 0, null, 0], [6, "T", "INTEGER", 0, null, 0], [7, "GF", "INTEGER", 0, null, 0], [8, "GA", "INTEGER", 0, null, 0], [9, "PIM", "TEXT", 0, null, 0]], "primary_keys": ["year", "tmID"], "foreign_keys": [[0, 0, "Teams", "year", "year", "CASCADE", "CASCADE", "NONE"], [0, 1, "Teams", "tmID", "tmID", "CASCADE", "CASCADE", "NONE"]], "unique_constraints": [[[0, 0, "year"], [1, 2, "tmID"]]], "check_constraints": []}, "abbrev": {"columns": [[0, "Type", "TEXT", 1, null, 1], [1, "Code", "TEXT", 1, null, 2], [2, "Fullname", "TEXT", 0, null, 0]], "primary_keys": ["Type", "Code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Type"], [1, 1, "Code"]]], "check_constraints": []}}
CREATE TABLE AwardsMisc ( name TEXT NOT NULL PRIMARY KEY, ID TEXT, award TEXT, year INTEGER, lgID TEXT, note TEXT, UNIQUE (name) ); CREATE TABLE HOF ( year INTEGER, hofID TEXT NOT NULL PRIMARY KEY, name TEXT, category TEXT, UNIQUE (hofID) ); CREATE TABLE Teams ( year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, tmID TEXT NOT NULL PRIMARY KEY, franchID TEXT, confID TEXT, divID TEXT, rank INTEGER, playoff TEXT, G INTEGER, W INTEGER, L INTEGER, T INTEGER, OTL TEXT, Pts INTEGER, SoW TEXT, SoL TEXT, GF INTEGER, GA INTEGER, name TEXT, PIM TEXT, BenchMinor TEXT, PPG TEXT, PPC TEXT, SHA TEXT, PKG TEXT, PKC TEXT, SHF TEXT, PRIMARY KEY (year, tmID), UNIQUE (year, tmID) ); CREATE TABLE Coaches ( coachID TEXT NOT NULL PRIMARY KEY, year INTEGER NOT NULL PRIMARY KEY, tmID TEXT NOT NULL PRIMARY KEY, lgID TEXT, stint INTEGER NOT NULL PRIMARY KEY, notes TEXT, g INTEGER, w INTEGER, l INTEGER, t INTEGER, postg TEXT, postw TEXT, postl TEXT, postt TEXT, PRIMARY KEY (coachID, year, tmID, stint), UNIQUE (coachID, year, tmID, stint), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE AwardsCoaches ( coachID TEXT, award TEXT, year INTEGER, lgID TEXT, note TEXT, FOREIGN KEY (coachID) REFERENCES Coaches(coachID) ); CREATE TABLE Master ( playerID TEXT, coachID TEXT, hofID TEXT, firstName TEXT, lastName TEXT NOT NULL, nameNote TEXT, nameGiven TEXT, nameNick TEXT, height TEXT, weight TEXT, shootCatch TEXT, legendsID TEXT, ihdbID TEXT, hrefID TEXT, firstNHL TEXT, lastNHL TEXT, firstWHA TEXT, lastWHA TEXT, pos TEXT, birthYear TEXT, birthMon TEXT, birthDay TEXT, birthCountry TEXT, birthState TEXT, birthCity TEXT, deathYear TEXT, deathMon TEXT, deathDay TEXT, deathCountry TEXT, deathState TEXT, deathCity TEXT, FOREIGN KEY (coachID) REFERENCES Coaches(coachID) ); CREATE TABLE AwardsPlayers ( playerID TEXT NOT NULL PRIMARY KEY, award TEXT NOT NULL PRIMARY KEY, year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, note TEXT, pos TEXT, PRIMARY KEY (playerID, award, year), UNIQUE (playerID, award, year), FOREIGN KEY (playerID) REFERENCES Master(playerID) ); CREATE TABLE CombinedShutouts ( year INTEGER, month INTEGER, date INTEGER, tmID TEXT, oppID TEXT, R/P TEXT, IDgoalie1 TEXT, IDgoalie2 TEXT, FOREIGN KEY (IDgoalie2) REFERENCES Master(playerID), FOREIGN KEY (IDgoalie1) REFERENCES Master(playerID) ); CREATE TABLE Goalies ( playerID TEXT NOT NULL PRIMARY KEY, year INTEGER NOT NULL PRIMARY KEY, stint INTEGER NOT NULL PRIMARY KEY, tmID TEXT, lgID TEXT, GP TEXT, Min TEXT, W TEXT, L TEXT, T/OL TEXT, ENG TEXT, SHO TEXT, GA TEXT, SA TEXT, PostGP TEXT, PostMin TEXT, PostW TEXT, PostL TEXT, PostT TEXT, PostENG TEXT, PostSHO TEXT, PostGA TEXT, PostSA TEXT, PRIMARY KEY (playerID, year, stint), UNIQUE (playerID, year, stint), FOREIGN KEY (playerID) REFERENCES Master(playerID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE GoaliesSC ( playerID TEXT NOT NULL PRIMARY KEY, year INTEGER NOT NULL PRIMARY KEY, tmID TEXT, lgID TEXT, GP INTEGER, Min INTEGER, W INTEGER, L INTEGER, T INTEGER, SHO INTEGER, GA INTEGER, PRIMARY KEY (playerID, year), UNIQUE (playerID, year), FOREIGN KEY (playerID) REFERENCES Master(playerID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE GoaliesShootout ( playerID TEXT, year INTEGER, stint INTEGER, tmID TEXT, W INTEGER, L INTEGER, SA INTEGER, GA INTEGER, FOREIGN KEY (playerID) REFERENCES Master(playerID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE Scoring ( playerID TEXT, year INTEGER, stint INTEGER, tmID TEXT, lgID TEXT, pos TEXT, GP INTEGER, G INTEGER, A INTEGER, Pts INTEGER, PIM INTEGER, +/- TEXT, PPG TEXT, PPA TEXT, SHG TEXT, SHA TEXT, GWG TEXT, GTG TEXT, SOG TEXT, PostGP TEXT, PostG TEXT, PostA TEXT, PostPts TEXT, PostPIM TEXT, Post+/- TEXT, PostPPG TEXT, PostPPA TEXT, PostSHG TEXT, PostSHA TEXT, PostGWG TEXT, PostSOG TEXT, FOREIGN KEY (playerID) REFERENCES Master(playerID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE ScoringSC ( playerID TEXT, year INTEGER, tmID TEXT, lgID TEXT, pos TEXT, GP INTEGER, G INTEGER, A INTEGER, Pts INTEGER, PIM INTEGER, FOREIGN KEY (playerID) REFERENCES Master(playerID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE ScoringShootout ( playerID TEXT, year INTEGER, stint INTEGER, tmID TEXT, S INTEGER, G INTEGER, GDG INTEGER, FOREIGN KEY (playerID) REFERENCES Master(playerID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE ScoringSup ( playerID TEXT, year INTEGER, PPA TEXT, SHA TEXT, FOREIGN KEY (playerID) REFERENCES Master(playerID) ); CREATE TABLE SeriesPost ( year INTEGER, round TEXT, series TEXT, tmIDWinner TEXT, lgIDWinner TEXT, tmIDLoser TEXT, lgIDLoser TEXT, W INTEGER, L INTEGER, T INTEGER, GoalsWinner INTEGER, GoalsLoser INTEGER, note TEXT, FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmIDLoser) REFERENCES Teams(tmID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmIDWinner) REFERENCES Teams(tmID) ); CREATE TABLE TeamSplits ( year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, tmID TEXT NOT NULL PRIMARY KEY, hW INTEGER, hL INTEGER, hT INTEGER, hOTL TEXT, rW INTEGER, rL INTEGER, rT INTEGER, rOTL TEXT, SepW TEXT, SepL TEXT, SepT TEXT, SepOL TEXT, OctW TEXT, OctL TEXT, OctT TEXT, OctOL TEXT, NovW TEXT, NovL TEXT, NovT TEXT, NovOL TEXT, DecW TEXT, DecL TEXT, DecT TEXT, DecOL TEXT, JanW INTEGER, JanL INTEGER, JanT INTEGER, JanOL TEXT, FebW INTEGER, FebL INTEGER, FebT INTEGER, FebOL TEXT, MarW TEXT, MarL TEXT, MarT TEXT, MarOL TEXT, AprW TEXT, AprL TEXT, AprT TEXT, AprOL TEXT, PRIMARY KEY (year, tmID), UNIQUE (year, tmID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE TeamVsTeam ( year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, tmID TEXT NOT NULL PRIMARY KEY, oppID TEXT NOT NULL PRIMARY KEY, W INTEGER, L INTEGER, T INTEGER, OTL TEXT, PRIMARY KEY (year, tmID, oppID), UNIQUE (year, tmID, oppID), FOREIGN KEY (oppID) REFERENCES Teams(tmID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE TeamsHalf ( year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, tmID TEXT NOT NULL PRIMARY KEY, half INTEGER NOT NULL PRIMARY KEY, rank INTEGER, G INTEGER, W INTEGER, L INTEGER, T INTEGER, GF INTEGER, GA INTEGER, PRIMARY KEY (year, tmID, half), UNIQUE (year, tmID, half), FOREIGN KEY (tmID) REFERENCES Teams(tmID), FOREIGN KEY (year) REFERENCES Teams(year) ); CREATE TABLE TeamsPost ( year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, tmID TEXT NOT NULL PRIMARY KEY, G INTEGER, W INTEGER, L INTEGER, T INTEGER, GF INTEGER, GA INTEGER, PIM TEXT, BenchMinor TEXT, PPG TEXT, PPC TEXT, SHA TEXT, PKG TEXT, PKC TEXT, SHF TEXT, PRIMARY KEY (year, tmID), UNIQUE (year, tmID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE TeamsSC ( year INTEGER NOT NULL PRIMARY KEY, lgID TEXT, tmID TEXT NOT NULL PRIMARY KEY, G INTEGER, W INTEGER, L INTEGER, T INTEGER, GF INTEGER, GA INTEGER, PIM TEXT, PRIMARY KEY (year, tmID), UNIQUE (year, tmID), FOREIGN KEY (year) REFERENCES Teams(year), FOREIGN KEY (tmID) REFERENCES Teams(tmID) ); CREATE TABLE abbrev ( Type TEXT NOT NULL PRIMARY KEY, Code TEXT NOT NULL PRIMARY KEY, Fullname TEXT, PRIMARY KEY (Type, Code), UNIQUE (Type, Code) );
shooting
{"incidents": {"columns": [[0, "case_number", "TEXT", 1, null, 1], [1, "date", "DATE", 1, null, 0], [2, "location", "TEXT", 1, null, 0], [3, "subject_statuses", "TEXT", 1, null, 0], [4, "subject_weapon", "TEXT", 1, null, 0], [5, "subjects", "TEXT", 1, null, 0], [6, "subject_count", "INTEGER", 1, null, 0], [7, "officers", "TEXT", 1, null, 0]], "primary_keys": ["case_number"], "foreign_keys": [], "unique_constraints": [[[0, 0, "case_number"]]], "check_constraints": []}, "officers": {"columns": [[0, "case_number", "TEXT", 1, null, 0], [1, "race", "TEXT", 0, null, 0], [2, "gender", "TEXT", 1, null, 0], [3, "last_name", "TEXT", 1, null, 0], [4, "first_name", "TEXT", 0, null, 0], [5, "full_name", "TEXT", 1, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "incidents", "case_number", "case_number", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "subjects": {"columns": [[0, "case_number", "TEXT", 1, null, 0], [1, "race", "TEXT", 1, null, 0], [2, "gender", "TEXT", 1, null, 0], [3, "last_name", "TEXT", 1, null, 0], [4, "first_name", "TEXT", 0, null, 0], [5, "full_name", "TEXT", 1, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "incidents", "case_number", "case_number", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE incidents ( case_number TEXT NOT NULL PRIMARY KEY, date DATE NOT NULL, location TEXT NOT NULL, subject_statuses TEXT NOT NULL, subject_weapon TEXT NOT NULL, subjects TEXT NOT NULL, subject_count INTEGER NOT NULL, officers TEXT NOT NULL, UNIQUE (case_number) ); CREATE TABLE officers ( case_number TEXT NOT NULL, race TEXT, gender TEXT NOT NULL, last_name TEXT NOT NULL, first_name TEXT, full_name TEXT NOT NULL, FOREIGN KEY (case_number) REFERENCES incidents(case_number) ); CREATE TABLE subjects ( case_number TEXT NOT NULL, race TEXT NOT NULL, gender TEXT NOT NULL, last_name TEXT NOT NULL, first_name TEXT, full_name TEXT NOT NULL, FOREIGN KEY (case_number) REFERENCES incidents(case_number) );
superstore
{"people": {"columns": [[0, "Customer ID", "TEXT", 0, null, 1], [1, "Customer Name", "TEXT", 0, null, 0], [2, "Segment", "TEXT", 0, null, 0], [3, "Country", "TEXT", 0, null, 0], [4, "City", "TEXT", 0, null, 0], [5, "State", "TEXT", 0, null, 0], [6, "Postal Code", "INTEGER", 0, null, 0], [7, "Region", "TEXT", 0, null, 2]], "primary_keys": ["Customer ID", "Region"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Customer ID"], [1, 7, "Region"]]], "check_constraints": []}, "product": {"columns": [[0, "Product ID", "TEXT", 0, null, 1], [1, "Product Name", "TEXT", 0, null, 0], [2, "Category", "TEXT", 0, null, 0], [3, "Sub-Category", "TEXT", 0, null, 0], [4, "Region", "TEXT", 0, null, 2]], "primary_keys": ["Product ID", "Region"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Product ID"], [1, 4, "Region"]]], "check_constraints": []}, "central_superstore": {"columns": [[0, "Row ID", "INTEGER", 0, null, 1], [1, "Order ID", "TEXT", 0, null, 0], [2, "Order Date", "DATE", 0, null, 0], [3, "Ship Date", "DATE", 0, null, 0], [4, "Ship Mode", "TEXT", 0, null, 0], [5, "Customer ID", "TEXT", 0, null, 0], [6, "Region", "TEXT", 0, null, 0], [7, "Product ID", "TEXT", 0, null, 0], [8, "Sales", "REAL", 0, null, 0], [9, "Quantity", "INTEGER", 0, null, 0], [10, "Discount", "REAL", 0, null, 0], [11, "Profit", "REAL", 0, null, 0]], "primary_keys": ["Row ID"], "foreign_keys": [[0, 0, "product", "Product ID", "Product ID", "NO ACTION", "NO ACTION", "NONE"], [0, 1, "product", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "people", "Customer ID", "Customer ID", "NO ACTION", "NO ACTION", "NONE"], [1, 1, "people", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "east_superstore": {"columns": [[0, "Row ID", "INTEGER", 0, null, 1], [1, "Order ID", "TEXT", 0, null, 0], [2, "Order Date", "DATE", 0, null, 0], [3, "Ship Date", "DATE", 0, null, 0], [4, "Ship Mode", "TEXT", 0, null, 0], [5, "Customer ID", "TEXT", 0, null, 0], [6, "Region", "TEXT", 0, null, 0], [7, "Product ID", "TEXT", 0, null, 0], [8, "Sales", "REAL", 0, null, 0], [9, "Quantity", "INTEGER", 0, null, 0], [10, "Discount", "REAL", 0, null, 0], [11, "Profit", "REAL", 0, null, 0]], "primary_keys": ["Row ID"], "foreign_keys": [[0, 0, "product", "Product ID", "Product ID", "NO ACTION", "NO ACTION", "NONE"], [0, 1, "product", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "people", "Customer ID", "Customer ID", "NO ACTION", "NO ACTION", "NONE"], [1, 1, "people", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "south_superstore": {"columns": [[0, "Row ID", "INTEGER", 0, null, 1], [1, "Order ID", "TEXT", 0, null, 0], [2, "Order Date", "DATE", 0, null, 0], [3, "Ship Date", "DATE", 0, null, 0], [4, "Ship Mode", "TEXT", 0, null, 0], [5, "Customer ID", "TEXT", 0, null, 0], [6, "Region", "TEXT", 0, null, 0], [7, "Product ID", "TEXT", 0, null, 0], [8, "Sales", "REAL", 0, null, 0], [9, "Quantity", "INTEGER", 0, null, 0], [10, "Discount", "REAL", 0, null, 0], [11, "Profit", "REAL", 0, null, 0]], "primary_keys": ["Row ID"], "foreign_keys": [[0, 0, "product", "Product ID", "Product ID", "NO ACTION", "NO ACTION", "NONE"], [0, 1, "product", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "people", "Customer ID", "Customer ID", "NO ACTION", "NO ACTION", "NONE"], [1, 1, "people", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "west_superstore": {"columns": [[0, "Row ID", "INTEGER", 0, null, 1], [1, "Order ID", "TEXT", 0, null, 0], [2, "Order Date", "DATE", 0, null, 0], [3, "Ship Date", "DATE", 0, null, 0], [4, "Ship Mode", "TEXT", 0, null, 0], [5, "Customer ID", "TEXT", 0, null, 0], [6, "Region", "TEXT", 0, null, 0], [7, "Product ID", "TEXT", 0, null, 0], [8, "Sales", "REAL", 0, null, 0], [9, "Quantity", "INTEGER", 0, null, 0], [10, "Discount", "REAL", 0, null, 0], [11, "Profit", "REAL", 0, null, 0]], "primary_keys": ["Row ID"], "foreign_keys": [[0, 0, "product", "Product ID", "Product ID", "NO ACTION", "NO ACTION", "NONE"], [0, 1, "product", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "people", "Customer ID", "Customer ID", "NO ACTION", "NO ACTION", "NONE"], [1, 1, "people", "Region", "Region", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE people ( Customer ID TEXT PRIMARY KEY, Customer Name TEXT, Segment TEXT, Country TEXT, City TEXT, State TEXT, Postal Code INTEGER, Region TEXT PRIMARY KEY, PRIMARY KEY (Customer ID, Region), UNIQUE (Customer ID, Region) ); CREATE TABLE product ( Product ID TEXT PRIMARY KEY, Product Name TEXT, Category TEXT, Sub-Category TEXT, Region TEXT PRIMARY KEY, PRIMARY KEY (Product ID, Region), UNIQUE (Product ID, Region) ); CREATE TABLE central_superstore ( Row ID INTEGER PRIMARY KEY, Order ID TEXT, Order Date DATE, Ship Date DATE, Ship Mode TEXT, Customer ID TEXT, Region TEXT, Product ID TEXT, Sales REAL, Quantity INTEGER, Discount REAL, Profit REAL, FOREIGN KEY (Product ID) REFERENCES product(Product ID), FOREIGN KEY (Region) REFERENCES product(Region), FOREIGN KEY (Customer ID) REFERENCES people(Customer ID), FOREIGN KEY (Region) REFERENCES people(Region) ); CREATE TABLE east_superstore ( Row ID INTEGER PRIMARY KEY, Order ID TEXT, Order Date DATE, Ship Date DATE, Ship Mode TEXT, Customer ID TEXT, Region TEXT, Product ID TEXT, Sales REAL, Quantity INTEGER, Discount REAL, Profit REAL, FOREIGN KEY (Product ID) REFERENCES product(Product ID), FOREIGN KEY (Region) REFERENCES product(Region), FOREIGN KEY (Customer ID) REFERENCES people(Customer ID), FOREIGN KEY (Region) REFERENCES people(Region) ); CREATE TABLE south_superstore ( Row ID INTEGER PRIMARY KEY, Order ID TEXT, Order Date DATE, Ship Date DATE, Ship Mode TEXT, Customer ID TEXT, Region TEXT, Product ID TEXT, Sales REAL, Quantity INTEGER, Discount REAL, Profit REAL, FOREIGN KEY (Product ID) REFERENCES product(Product ID), FOREIGN KEY (Region) REFERENCES product(Region), FOREIGN KEY (Customer ID) REFERENCES people(Customer ID), FOREIGN KEY (Region) REFERENCES people(Region) ); CREATE TABLE west_superstore ( Row ID INTEGER PRIMARY KEY, Order ID TEXT, Order Date DATE, Ship Date DATE, Ship Mode TEXT, Customer ID TEXT, Region TEXT, Product ID TEXT, Sales REAL, Quantity INTEGER, Discount REAL, Profit REAL, FOREIGN KEY (Product ID) REFERENCES product(Product ID), FOREIGN KEY (Region) REFERENCES product(Region), FOREIGN KEY (Customer ID) REFERENCES people(Customer ID), FOREIGN KEY (Region) REFERENCES people(Region) );
regional_sales
{"Customers": {"columns": [[0, "CustomerID", "INTEGER", 0, null, 1], [1, "Customer Names", "TEXT", 0, null, 0]], "primary_keys": ["CustomerID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Products": {"columns": [[0, "ProductID", "INTEGER", 0, null, 1], [1, "Product Name", "TEXT", 0, null, 0]], "primary_keys": ["ProductID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Regions": {"columns": [[0, "StateCode", "TEXT", 0, null, 1], [1, "State", "TEXT", 0, null, 0], [2, "Region", "TEXT", 0, null, 0]], "primary_keys": ["StateCode"], "foreign_keys": [], "unique_constraints": [[[0, 0, "StateCode"]]], "check_constraints": []}, "Sales Team": {"columns": [[0, "SalesTeamID", "INTEGER", 0, null, 1], [1, "Sales Team", "TEXT", 0, null, 0], [2, "Region", "TEXT", 0, null, 0]], "primary_keys": ["SalesTeamID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Store Locations": {"columns": [[0, "StoreID", "INTEGER", 0, null, 1], [1, "City Name", "TEXT", 0, null, 0], [2, "County", "TEXT", 0, null, 0], [3, "StateCode", "TEXT", 0, null, 0], [4, "State", "TEXT", 0, null, 0], [5, "Type", "TEXT", 0, null, 0], [6, "Latitude", "REAL", 0, null, 0], [7, "Longitude", "REAL", 0, null, 0], [8, "AreaCode", "INTEGER", 0, null, 0], [9, "Population", "INTEGER", 0, null, 0], [10, "Household Income", "INTEGER", 0, null, 0], [11, "Median Income", "INTEGER", 0, null, 0], [12, "Land Area", "INTEGER", 0, null, 0], [13, "Water Area", "INTEGER", 0, null, 0], [14, "Time Zone", "TEXT", 0, null, 0]], "primary_keys": ["StoreID"], "foreign_keys": [[0, 0, "Regions", "StateCode", "StateCode", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Sales Orders": {"columns": [[0, "OrderNumber", "TEXT", 0, null, 1], [1, "Sales Channel", "TEXT", 0, null, 0], [2, "WarehouseCode", "TEXT", 0, null, 0], [3, "ProcuredDate", "TEXT", 0, null, 0], [4, "OrderDate", "TEXT", 0, null, 0], [5, "ShipDate", "TEXT", 0, null, 0], [6, "DeliveryDate", "TEXT", 0, null, 0], [7, "CurrencyCode", "TEXT", 0, null, 0], [8, "_SalesTeamID", "INTEGER", 0, null, 0], [9, "_CustomerID", "INTEGER", 0, null, 0], [10, "_StoreID", "INTEGER", 0, null, 0], [11, "_ProductID", "INTEGER", 0, null, 0], [12, "Order Quantity", "INTEGER", 0, null, 0], [13, "Discount Applied", "REAL", 0, null, 0], [14, "Unit Price", "TEXT", 0, null, 0], [15, "Unit Cost", "TEXT", 0, null, 0]], "primary_keys": ["OrderNumber"], "foreign_keys": [[0, 0, "Products", "_ProductID", "ProductID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Store Locations", "_StoreID", "StoreID", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "Customers", "_CustomerID", "CustomerID", "NO ACTION", "NO ACTION", "NONE"], [3, 0, "Sales Team", "_SalesTeamID", "SalesTeamID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "OrderNumber"]]], "check_constraints": []}}
CREATE TABLE Customers ( CustomerID INTEGER PRIMARY KEY, Customer Names TEXT ); CREATE TABLE Products ( ProductID INTEGER PRIMARY KEY, Product Name TEXT ); CREATE TABLE Regions ( StateCode TEXT PRIMARY KEY, State TEXT, Region TEXT, UNIQUE (StateCode) ); CREATE TABLE Sales Team ( SalesTeamID INTEGER PRIMARY KEY, Sales Team TEXT, Region TEXT ); CREATE TABLE Store Locations ( StoreID INTEGER PRIMARY KEY, City Name TEXT, County TEXT, StateCode TEXT, State TEXT, Type TEXT, Latitude REAL, Longitude REAL, AreaCode INTEGER, Population INTEGER, Household Income INTEGER, Median Income INTEGER, Land Area INTEGER, Water Area INTEGER, Time Zone TEXT, FOREIGN KEY (StateCode) REFERENCES Regions(StateCode) ); CREATE TABLE Sales Orders ( OrderNumber TEXT PRIMARY KEY, Sales Channel TEXT, WarehouseCode TEXT, ProcuredDate TEXT, OrderDate TEXT, ShipDate TEXT, DeliveryDate TEXT, CurrencyCode TEXT, _SalesTeamID INTEGER, _CustomerID INTEGER, _StoreID INTEGER, _ProductID INTEGER, Order Quantity INTEGER, Discount Applied REAL, Unit Price TEXT, Unit Cost TEXT, UNIQUE (OrderNumber), FOREIGN KEY (_ProductID) REFERENCES Products(ProductID), FOREIGN KEY (_StoreID) REFERENCES Store Locations(StoreID), FOREIGN KEY (_CustomerID) REFERENCES Customers(CustomerID), FOREIGN KEY (_SalesTeamID) REFERENCES Sales Team(SalesTeamID) );
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
49
Edit dataset card