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,
"Model" TEXT,
"Make" TEXT,
PRIMARY KEY ("MakeId")
);

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





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", "Ram 1500", "Dodge");
INSERT INTO "car_names" VALUES ("8", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("9", "CR-V", "Honda");
INSERT INTO "car_names" VALUES ("10", "Tacoma", "Toyota");
INSERT INTO "car_names" VALUES ("11", "Explorer", "Ford");
INSERT INTO "car_names" VALUES ("12", "Malibu", "Chevrolet");
INSERT INTO "car_names" VALUES ("13", "Wrangler", "Jeep");
INSERT INTO "car_names" VALUES ("14", "Grand Cherokee", "Jeep");
INSERT INTO "car_names" VALUES ("15", "Outback", "Subaru");
INSERT INTO "cars_data" VALUES ("1", "30", "2500", "2010");
INSERT INTO "cars_data" VALUES ("2", "32", "2600", "2010");
INSERT INTO "cars_data" VALUES ("3", "18", "4500", "2010");
INSERT INTO "cars_data" VALUES ("4", "28", "2800", "2011");
INSERT INTO "cars_data" VALUES ("5", "17", "4800", "2011");
INSERT INTO "cars_data" VALUES ("6", "29", "2700", "2011");
INSERT INTO "cars_data" VALUES ("7", "16", "5000", "2012");
INSERT INTO "cars_data" VALUES ("8", "25", "3500", "2012");
INSERT INTO "cars_data" VALUES ("9", "27", "3200", "2012");
INSERT INTO "cars_data" VALUES ("10", "20", "4000", "2013");
INSERT INTO "cars_data" VALUES ("11", "22", "4200", "2013");
INSERT INTO "cars_data" VALUES ("12", "26", "3000", "2013");
INSERT INTO "cars_data" VALUES ("13", "21", "3800", "2014");
INSERT INTO "cars_data" VALUES ("14", "23", "4100", "2014");
INSERT INTO "cars_data" VALUES ("15", "24", "3300", "2014");