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,
"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", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("7", "Silverado", "Chevrolet");
INSERT INTO "car_names" VALUES ("8", "Malibu", "Chevrolet");
INSERT INTO "car_names" VALUES ("9", "Altima", "Nissan");
INSERT INTO "car_names" VALUES ("10", "Titan", "Nissan");
INSERT INTO "car_names" VALUES ("11", "Cherokee", "Jeep");
INSERT INTO "car_names" VALUES ("12", "Wrangler", "Jeep");
INSERT INTO "car_names" VALUES ("13", "A4", "Audi");
INSERT INTO "car_names" VALUES ("14", "Q5", "Audi");
INSERT INTO "car_names" VALUES ("15", "C-Class", "Mercedes-Benz");
INSERT INTO "car_names" VALUES ("16", "E-Class", "Mercedes-Benz");
INSERT INTO "car_names" VALUES ("17", "3 Series", "BMW");
INSERT INTO "car_names" VALUES ("18", "X5", "BMW");
INSERT INTO "car_names" VALUES ("19", "Elantra", "Hyundai");
INSERT INTO "car_names" VALUES ("20", "Sonata", "Hyundai");
INSERT INTO "cars_data" VALUES ("1", "35", "140");
INSERT INTO "cars_data" VALUES ("2", "30", "190");
INSERT INTO "cars_data" VALUES ("3", "32", "180");
INSERT INTO "cars_data" VALUES ("4", "38", "135");
INSERT INTO "cars_data" VALUES ("5", "20", "300");
INSERT INTO "cars_data" VALUES ("6", "25", "450");
INSERT INTO "cars_data" VALUES ("7", "18", "280");
INSERT INTO "cars_data" VALUES ("8", "28", "160");
INSERT INTO "cars_data" VALUES ("9", "31", "170");
INSERT INTO "cars_data" VALUES ("10", "19", "390");
INSERT INTO "cars_data" VALUES ("11", "22", "270");
INSERT INTO "cars_data" VALUES ("12", "21", "285");
INSERT INTO "cars_data" VALUES ("13", "29", "200");
INSERT INTO "cars_data" VALUES ("14", "26", "240");
INSERT INTO "cars_data" VALUES ("15", "27", "250");
INSERT INTO "cars_data" VALUES ("16", "24", "300");
INSERT INTO "cars_data" VALUES ("17", "28", "255");
INSERT INTO "cars_data" VALUES ("18", "23", "335");
INSERT INTO "cars_data" VALUES ("19", "33", "147");
INSERT INTO "cars_data" VALUES ("20", "30", "191");