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,
"Cylinders" INT,
"Horsepower" TEXT,
PRIMARY KEY ("Id"),
FOREIGN KEY ("Id") REFERENCES "car_names"("MakeId")
);





INSERT INTO "car_names" VALUES ("1", "Model S", "Tesla");
INSERT INTO "car_names" VALUES ("2", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("3", "Camaro", "Chevrolet");
INSERT INTO "car_names" VALUES ("4", "Civic", "Honda");
INSERT INTO "car_names" VALUES ("5", "Charger", "Dodge");
INSERT INTO "car_names" VALUES ("6", "Corvette", "Chevrolet");
INSERT INTO "car_names" VALUES ("7", "F-150", "Ford");
INSERT INTO "car_names" VALUES ("8", "Wrangler", "Jeep");
INSERT INTO "car_names" VALUES ("9", "Accord", "Honda");
INSERT INTO "car_names" VALUES ("10", "Challenger", "Dodge");
INSERT INTO "cars_data" VALUES ("1", "0", "670");
INSERT INTO "cars_data" VALUES ("2", "8", "450");
INSERT INTO "cars_data" VALUES ("3", "6", "455");
INSERT INTO "cars_data" VALUES ("4", "4", "158");
INSERT INTO "cars_data" VALUES ("5", "8", "485");
INSERT INTO "cars_data" VALUES ("6", "8", "495");
INSERT INTO "cars_data" VALUES ("7", "6", "400");
INSERT INTO "cars_data" VALUES ("8", "6", "285");
INSERT INTO "cars_data" VALUES ("9", "4", "192");
INSERT INTO "cars_data" VALUES ("10", "8", "717");