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 "cars_data" VALUES ("1", "35", "180");
INSERT INTO "cars_data" VALUES ("2", "40", "158");
INSERT INTO "cars_data" VALUES ("3", "20", "395");
INSERT INTO "cars_data" VALUES ("4", "18", "355");
INSERT INTO "cars_data" VALUES ("5", "30", "255");
INSERT INTO "cars_data" VALUES ("6", "28", "200");
INSERT INTO "cars_data" VALUES ("7", "32", "188");
INSERT INTO "cars_data" VALUES ("8", "33", "147");
INSERT INTO "cars_data" VALUES ("9", "38", "150");
INSERT INTO "cars_data" VALUES ("10", "29", "201");
INSERT INTO "cars_data" VALUES ("11", "54", "121");
INSERT INTO "cars_data" VALUES ("12", "36", "139");
INSERT INTO "cars_data" VALUES ("13", "34", "192");
INSERT INTO "cars_data" VALUES ("14", "25", "310");
INSERT INTO "cars_data" VALUES ("15", "30", "153");
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");