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_names" (
"MakeId" INT UNIQUE,
"Model" TEXT,
"Make" 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,
"Maker" INT,
PRIMARY KEY ("ModelId")
);





INSERT INTO "car_names" VALUES ("1", "Civic", "Honda");
INSERT INTO "car_names" VALUES ("2", "Corolla", "Toyota");
INSERT INTO "car_names" VALUES ("3", "F-150", "Ford");
INSERT INTO "car_names" VALUES ("4", "Camry", "Toyota");
INSERT INTO "car_names" VALUES ("5", "Silverado", "Chevrolet");
INSERT INTO "car_names" VALUES ("6", "Accord", "Honda");
INSERT INTO "car_names" VALUES ("7", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("8", "CR-V", "Honda");
INSERT INTO "car_names" VALUES ("9", "RAV4", "Toyota");
INSERT INTO "car_names" VALUES ("10", "Ram 1500", "Ram");
INSERT INTO "car_names" VALUES ("11", "Model 3", "Tesla");
INSERT INTO "car_names" VALUES ("12", "Leaf", "Nissan");
INSERT INTO "car_names" VALUES ("13", "Prius", "Toyota");
INSERT INTO "car_names" VALUES ("14", "Spark", "Chevrolet");
INSERT INTO "car_names" VALUES ("15", "Mirage", "Mitsubishi");
INSERT INTO "cars_data" VALUES ("1", "35", "100");
INSERT INTO "cars_data" VALUES ("2", "32", "120");
INSERT INTO "cars_data" VALUES ("3", "20", "250");
INSERT INTO "cars_data" VALUES ("4", "30", "180");
INSERT INTO "cars_data" VALUES ("5", "18", "300");
INSERT INTO "cars_data" VALUES ("6", "28", "160");
INSERT INTO "cars_data" VALUES ("7", "22", "350");
INSERT INTO "cars_data" VALUES ("8", "27", "140");
INSERT INTO "cars_data" VALUES ("9", "25", "170");
INSERT INTO "cars_data" VALUES ("10", "15", "320");
INSERT INTO "cars_data" VALUES ("11", "100", "280");
INSERT INTO "cars_data" VALUES ("12", "110", "109");
INSERT INTO "cars_data" VALUES ("13", "50", "98");
INSERT INTO "cars_data" VALUES ("14", "38", "84");
INSERT INTO "cars_data" VALUES ("15", "37", "78");
INSERT INTO "model_list" VALUES ("1", "1");
INSERT INTO "model_list" VALUES ("2", "2");
INSERT INTO "model_list" VALUES ("3", "3");
INSERT INTO "model_list" VALUES ("4", "2");
INSERT INTO "model_list" VALUES ("5", "5");
INSERT INTO "model_list" VALUES ("6", "1");
INSERT INTO "model_list" VALUES ("7", "3");
INSERT INTO "model_list" VALUES ("8", "1");
INSERT INTO "model_list" VALUES ("9", "2");
INSERT INTO "model_list" VALUES ("10", "10");
INSERT INTO "model_list" VALUES ("11", "11");
INSERT INTO "model_list" VALUES ("12", "12");
INSERT INTO "model_list" VALUES ("13", "2");
INSERT INTO "model_list" VALUES ("14", "5");
INSERT INTO "model_list" VALUES ("15", "15");