PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "car_makers" (
"Id" INT,
"Maker" TEXT,
PRIMARY KEY ("Id")
);

CREATE TABLE "car_names" (
"MakeId" INT UNIQUE,
"Model" TEXT,
PRIMARY KEY ("MakeId")
);

CREATE TABLE "cars_data" (
"Id" INT,
"MPG" TEXT,
"Horsepower" TEXT,
PRIMARY KEY ("Id"),
FOREIGN KEY ("Id") REFERENCES "car_names"("MakeId")
);

CREATE TABLE "model_list" (
"ModelId" INT,
PRIMARY KEY ("ModelId")
);





INSERT INTO "car_makers" VALUES ("1", "Toyota");
INSERT INTO "car_makers" VALUES ("2", "Honda");
INSERT INTO "car_makers" VALUES ("3", "Ford");
INSERT INTO "car_makers" VALUES ("4", "Chevrolet");
INSERT INTO "car_makers" VALUES ("5", "BMW");
INSERT INTO "car_makers" VALUES ("6", "Mercedes-Benz");
INSERT INTO "car_makers" VALUES ("7", "Nissan");
INSERT INTO "car_makers" VALUES ("8", "Hyundai");
INSERT INTO "car_makers" VALUES ("9", "Volkswagen");
INSERT INTO "car_makers" VALUES ("10", "Audi");
INSERT INTO "car_names" VALUES ("1", "Camry");
INSERT INTO "car_names" VALUES ("2", "Civic");
INSERT INTO "car_names" VALUES ("3", "F-150");
INSERT INTO "car_names" VALUES ("4", "Silverado");
INSERT INTO "car_names" VALUES ("5", "3 Series");
INSERT INTO "car_names" VALUES ("6", "C-Class");
INSERT INTO "car_names" VALUES ("7", "Altima");
INSERT INTO "car_names" VALUES ("8", "Elantra");
INSERT INTO "car_names" VALUES ("9", "Jetta");
INSERT INTO "car_names" VALUES ("10", "A4");
INSERT INTO "car_names" VALUES ("11", "Prius");
INSERT INTO "car_names" VALUES ("12", "Corolla");
INSERT INTO "car_names" VALUES ("13", "Accord");
INSERT INTO "car_names" VALUES ("14", "Mustang");
INSERT INTO "car_names" VALUES ("15", "Cruze");
INSERT INTO "car_names" VALUES ("16", "X5");
INSERT INTO "car_names" VALUES ("17", "E-Class");
INSERT INTO "car_names" VALUES ("18", "Titan");
INSERT INTO "car_names" VALUES ("19", "Sonata");
INSERT INTO "car_names" VALUES ("20", "Passat");
INSERT INTO "car_names" VALUES ("21", "Q5");
INSERT INTO "cars_data" VALUES ("1", "35", "203");
INSERT INTO "cars_data" VALUES ("2", "38", "158");
INSERT INTO "cars_data" VALUES ("3", "25", "325");
INSERT INTO "cars_data" VALUES ("4", "24", "310");
INSERT INTO "cars_data" VALUES ("5", "30", "255");
INSERT INTO "cars_data" VALUES ("6", "31", "201");
INSERT INTO "cars_data" VALUES ("7", "34", "188");
INSERT INTO "cars_data" VALUES ("8", "33", "147");
INSERT INTO "cars_data" VALUES ("9", "39", "158");
INSERT INTO "cars_data" VALUES ("10", "32", "201");
INSERT INTO "cars_data" VALUES ("11", "54", "121");
INSERT INTO "cars_data" VALUES ("12", "36", "139");
INSERT INTO "cars_data" VALUES ("13", "33", "192");
INSERT INTO "cars_data" VALUES ("14", "28", "310");
INSERT INTO "cars_data" VALUES ("15", "37", "153");
INSERT INTO "cars_data" VALUES ("16", "26", "335");
INSERT INTO "cars_data" VALUES ("17", "29", "255");
INSERT INTO "cars_data" VALUES ("18", "23", "390");
INSERT INTO "cars_data" VALUES ("19", "32", "185");
INSERT INTO "cars_data" VALUES ("20", "36", "174");
INSERT INTO "cars_data" VALUES ("21", "28", "248");
INSERT INTO "model_list" VALUES ("1");
INSERT INTO "model_list" VALUES ("2");
INSERT INTO "model_list" VALUES ("3");
INSERT INTO "model_list" VALUES ("4");
INSERT INTO "model_list" VALUES ("5");
INSERT INTO "model_list" VALUES ("6");
INSERT INTO "model_list" VALUES ("7");
INSERT INTO "model_list" VALUES ("8");
INSERT INTO "model_list" VALUES ("9");
INSERT INTO "model_list" VALUES ("10");
INSERT INTO "model_list" VALUES ("11");
INSERT INTO "model_list" VALUES ("12");
INSERT INTO "model_list" VALUES ("13");
INSERT INTO "model_list" VALUES ("14");
INSERT INTO "model_list" VALUES ("15");
INSERT INTO "model_list" VALUES ("16");
INSERT INTO "model_list" VALUES ("17");
INSERT INTO "model_list" VALUES ("18");
INSERT INTO "model_list" VALUES ("19");
INSERT INTO "model_list" VALUES ("20");
INSERT INTO "model_list" VALUES ("21");