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", "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", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("8", "CR-V", "Honda");
INSERT INTO "car_names" VALUES ("9", "Tacoma", "Toyota");
INSERT INTO "car_names" VALUES ("10", "Explorer", "Ford");
INSERT INTO "car_names" VALUES ("11", "Malibu", "Chevrolet");
INSERT INTO "car_names" VALUES ("12", "Impreza", "Subaru");
INSERT INTO "car_names" VALUES ("13", "Cherokee", "Jeep");
INSERT INTO "car_names" VALUES ("14", "Altima", "Nissan");
INSERT INTO "car_names" VALUES ("15", "Elantra", "Hyundai");
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", "6", "3.5", "290");
INSERT INTO "cars_data" VALUES ("4", "4", "2.5", "203");
INSERT INTO "cars_data" VALUES ("5", "8", "5.3", "355");
INSERT INTO "cars_data" VALUES ("6", "4", "2.0", "192");
INSERT INTO "cars_data" VALUES ("7", "8", "5.0", "460");
INSERT INTO "cars_data" VALUES ("8", "4", "2.4", "184");
INSERT INTO "cars_data" VALUES ("9", "6", "3.5", "278");
INSERT INTO "cars_data" VALUES ("10", "4", "2.3", "300");
INSERT INTO "cars_data" VALUES ("11", "4", "1.5", "160");
INSERT INTO "cars_data" VALUES ("12", "4", "2.0", "152");
INSERT INTO "cars_data" VALUES ("13", "4", "2.4", "180");
INSERT INTO "cars_data" VALUES ("14", "4", "2.5", "188");
INSERT INTO "cars_data" VALUES ("15", "4", "2.0", "147");
INSERT INTO "model_list" VALUES ("101", "1");
INSERT INTO "model_list" VALUES ("102", "2");
INSERT INTO "model_list" VALUES ("103", "3");
INSERT INTO "model_list" VALUES ("104", "4");
INSERT INTO "model_list" VALUES ("105", "5");
INSERT INTO "model_list" VALUES ("106", "6");
INSERT INTO "model_list" VALUES ("107", "7");
INSERT INTO "model_list" VALUES ("108", "8");
INSERT INTO "model_list" VALUES ("109", "9");
INSERT INTO "model_list" VALUES ("110", "10");
INSERT INTO "model_list" VALUES ("111", "11");
INSERT INTO "model_list" VALUES ("112", "12");
INSERT INTO "model_list" VALUES ("113", "13");
INSERT INTO "model_list" VALUES ("114", "14");
INSERT INTO "model_list" VALUES ("115", "15");