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,
"Edispl" FLOAT,
"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", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("4", "Camry", "Toyota");
INSERT INTO "car_names" VALUES ("5", "Accord", "Honda");
INSERT INTO "car_names" VALUES ("6", "F-150", "Ford");
INSERT INTO "car_names" VALUES ("7", "Model 3", "Tesla");
INSERT INTO "car_names" VALUES ("8", "Golf", "Volkswagen");
INSERT INTO "car_names" VALUES ("9", "Impreza", "Subaru");
INSERT INTO "car_names" VALUES ("10", "CX-5", "Mazda");
INSERT INTO "car_names" VALUES ("11", "Mirage", "Mitsubishi");
INSERT INTO "car_names" VALUES ("12", "Spark", "Chevrolet");
INSERT INTO "car_names" VALUES ("13", "Smart Fortwo", "Smart");
INSERT INTO "cars_data" VALUES ("1", "4", "1.8", "140");
INSERT INTO "cars_data" VALUES ("2", "4", "1.8", "132");
INSERT INTO "cars_data" VALUES ("3", "8", "5.0", "460");
INSERT INTO "cars_data" VALUES ("4", "4", "2.5", "203");
INSERT INTO "cars_data" VALUES ("5", "4", "2.0", "192");
INSERT INTO "cars_data" VALUES ("6", "6", "3.5", "375");
INSERT INTO "cars_data" VALUES ("7", "0", "0.0", "283");
INSERT INTO "cars_data" VALUES ("8", "4", "1.4", "147");
INSERT INTO "cars_data" VALUES ("9", "4", "2.5", "182");
INSERT INTO "cars_data" VALUES ("10", "4", "2.5", "187");
INSERT INTO "cars_data" VALUES ("11", "3", "1.2", "78");
INSERT INTO "cars_data" VALUES ("12", "3", "1.4", "98");
INSERT INTO "cars_data" VALUES ("13", "3", "1.0", "89");
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", "1");
INSERT INTO "model_list" VALUES ("6", "3");
INSERT INTO "model_list" VALUES ("7", "7");
INSERT INTO "model_list" VALUES ("8", "8");
INSERT INTO "model_list" VALUES ("9", "9");
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", "13");