{"continents": {"columns": [[0, "ContId", "INTEGER", 0, null, 1], [1, "Continent", "TEXT", 0, null, 0]], "primary_keys": ["ContId"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "countries": {"columns": [[0, "CountryId", "INTEGER", 0, null, 1], [1, "CountryName", "TEXT", 0, null, 0], [2, "Continent", "INTEGER", 0, null, 0]], "primary_keys": ["CountryId"], "foreign_keys": [[0, 0, "continents", "Continent", "ContId", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "car_makers": {"columns": [[0, "Id", "INTEGER", 0, null, 1], [1, "Maker", "TEXT", 0, null, 0], [2, "FullName", "TEXT", 0, null, 0], [3, "Country", "TEXT", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [[0, 0, "countries", "Country", "CountryId", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "model_list": {"columns": [[0, "ModelId", "INTEGER", 0, null, 1], [1, "Maker", "INTEGER", 0, null, 0], [2, "Model", "TEXT", 0, null, 0]], "primary_keys": ["ModelId"], "foreign_keys": [[0, 0, "car_makers", "Maker", "Id", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 2, "Model"]]], "check_constraints": []}, "car_names": {"columns": [[0, "MakeId", "INTEGER", 0, null, 1], [1, "Model", "TEXT", 0, null, 0], [2, "Make", "TEXT", 0, null, 0]], "primary_keys": ["MakeId"], "foreign_keys": [[0, 0, "model_list", "Model", "Model", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "cars_data": {"columns": [[0, "Id", "INTEGER", 0, null, 1], [1, "MPG", "TEXT", 0, null, 0], [2, "Cylinders", "INTEGER", 0, null, 0], [3, "Edispl", "REAL", 0, null, 0], [4, "Horsepower", "TEXT", 0, null, 0], [5, "Weight", "INTEGER", 0, null, 0], [6, "Accelerate", "REAL", 0, null, 0], [7, "Year", "INTEGER", 0, null, 0]], "primary_keys": ["Id"], "foreign_keys": [[0, 0, "car_names", "Id", "MakeId", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE continents (
    ContId INTEGER   PRIMARY KEY,
    Continent TEXT
);

CREATE TABLE countries (
    CountryId INTEGER   PRIMARY KEY,
    CountryName TEXT,
    Continent INTEGER,
    FOREIGN KEY (Continent) REFERENCES continents(ContId)
);

CREATE TABLE car_makers (
    Id INTEGER   PRIMARY KEY,
    Maker TEXT,
    FullName TEXT,
    Country TEXT,
    FOREIGN KEY (Country) REFERENCES countries(CountryId)
);

CREATE TABLE model_list (
    ModelId INTEGER   PRIMARY KEY,
    Maker INTEGER,
    Model TEXT,
    UNIQUE (Model),
    FOREIGN KEY (Maker) REFERENCES car_makers(Id)
);

CREATE TABLE car_names (
    MakeId INTEGER   PRIMARY KEY,
    Model TEXT,
    Make TEXT,
    FOREIGN KEY (Model) REFERENCES model_list(Model)
);

CREATE TABLE cars_data (
    Id INTEGER   PRIMARY KEY,
    MPG TEXT,
    Cylinders INTEGER,
    Edispl REAL,
    Horsepower TEXT,
    Weight INTEGER,
    Accelerate REAL,
    Year INTEGER,
    FOREIGN KEY (Id) REFERENCES car_names(MakeId)
);