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")
);





INSERT INTO "car_names" VALUES ("1", "Civic", "Honda");
INSERT INTO "car_names" VALUES ("2", "Accord", "Honda");
INSERT INTO "car_names" VALUES ("3", "Camry", "Toyota");
INSERT INTO "car_names" VALUES ("4", "Corolla", "Toyota");
INSERT INTO "car_names" VALUES ("5", "F-150", "Ford");
INSERT INTO "car_names" VALUES ("6", "Silverado", "Chevrolet");
INSERT INTO "car_names" VALUES ("7", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("8", "Challenger", "Dodge");
INSERT INTO "car_names" VALUES ("9", "911", "Porsche");
INSERT INTO "car_names" VALUES ("10", "M3", "BMW");
INSERT INTO "car_names" VALUES ("11", "A4", "Audi");
INSERT INTO "car_names" VALUES ("12", "C-Class", "Mercedes-Benz");
INSERT INTO "car_names" VALUES ("13", "Model 3", "Tesla");
INSERT INTO "car_names" VALUES ("14", "Leaf", "Nissan");
INSERT INTO "car_names" VALUES ("15", "Prius", "Toyota");
INSERT INTO "cars_data" VALUES ("1", "30", "140");
INSERT INTO "cars_data" VALUES ("2", "28", "190");
INSERT INTO "cars_data" VALUES ("3", "29", "180");
INSERT INTO "cars_data" VALUES ("4", "32", "135");
INSERT INTO "cars_data" VALUES ("5", "18", "300");
INSERT INTO "cars_data" VALUES ("6", "17", "280");
INSERT INTO "cars_data" VALUES ("7", "20", "450");
INSERT INTO "cars_data" VALUES ("8", "19", "485");
INSERT INTO "cars_data" VALUES ("9", "25", "379");
INSERT INTO "cars_data" VALUES ("10", "26", "382");
INSERT INTO "cars_data" VALUES ("11", "27", "201");
INSERT INTO "cars_data" VALUES ("12", "24", "255");
INSERT INTO "cars_data" VALUES ("13", "120", "283");
INSERT INTO "cars_data" VALUES ("14", "110", "147");
INSERT INTO "cars_data" VALUES ("15", "50", "121");