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_makers" (
"Id" INT,
"Maker" TEXT,
"FullName" TEXT,
PRIMARY KEY ("Id")
);

CREATE TABLE "car_names" (
"MakeId" INT UNIQUE,
"Model" TEXT,
PRIMARY KEY ("MakeId"),
FOREIGN KEY ("Model") REFERENCES "model_list"("Model")
);

CREATE TABLE "cars_data" (
"Id" INT,
PRIMARY KEY ("Id"),
FOREIGN KEY ("Id") REFERENCES "car_names"("MakeId")
);

CREATE TABLE "model_list" (
"ModelId" INT,
"Model" TEXT UNIQUE,
PRIMARY KEY ("ModelId")
);





INSERT INTO "car_makers" VALUES ("1", "Honda", "Honda Motor Co.");
INSERT INTO "car_makers" VALUES ("2", "Toyota", "Toyota Motor Corporation");
INSERT INTO "car_makers" VALUES ("3", "Ford", "Ford Motor Company");
INSERT INTO "car_makers" VALUES ("4", "BMW", "Bayerische Motoren Werke AG");
INSERT INTO "car_makers" VALUES ("5", "Mercedes-Benz", "Mercedes-Benz Group AG");
INSERT INTO "car_makers" VALUES ("6", "Audi", "Audi AG");
INSERT INTO "car_makers" VALUES ("7", "Nissan", "Nissan Motor Corporation");
INSERT INTO "car_makers" VALUES ("8", "Hyundai", "Hyundai Motor Company");
INSERT INTO "car_makers" VALUES ("9", "Kia", "Kia Corporation");
INSERT INTO "car_makers" VALUES ("10", "Volkswagen", "Volkswagen AG");
INSERT INTO "model_list" VALUES ("1", "Civic");
INSERT INTO "model_list" VALUES ("2", "Corolla");
INSERT INTO "model_list" VALUES ("3", "F-150");
INSERT INTO "model_list" VALUES ("4", "3 Series");
INSERT INTO "model_list" VALUES ("5", "C-Class");
INSERT INTO "model_list" VALUES ("6", "A4");
INSERT INTO "model_list" VALUES ("7", "Altima");
INSERT INTO "model_list" VALUES ("8", "Elantra");
INSERT INTO "model_list" VALUES ("9", "Sportage");
INSERT INTO "model_list" VALUES ("10", "Golf");
INSERT INTO "model_list" VALUES ("11", "Accord");
INSERT INTO "model_list" VALUES ("12", "Camry");
INSERT INTO "model_list" VALUES ("13", "Mustang");
INSERT INTO "model_list" VALUES ("14", "X5");
INSERT INTO "model_list" VALUES ("15", "E-Class");
INSERT INTO "model_list" VALUES ("16", "Q5");
INSERT INTO "model_list" VALUES ("17", "Titan");
INSERT INTO "model_list" VALUES ("18", "Sonata");
INSERT INTO "model_list" VALUES ("19", "Sorento");
INSERT INTO "model_list" VALUES ("20", "Passat");
INSERT INTO "model_list" VALUES ("21", "CR-V");
INSERT INTO "model_list" VALUES ("22", "RAV4");
INSERT INTO "model_list" VALUES ("23", "Explorer");
INSERT INTO "model_list" VALUES ("24", "5 Series");
INSERT INTO "model_list" VALUES ("25", "GLC");
INSERT INTO "model_list" VALUES ("26", "A6");
INSERT INTO "model_list" VALUES ("27", "Rogue");
INSERT INTO "model_list" VALUES ("28", "Tucson");
INSERT INTO "model_list" VALUES ("29", "Telluride");
INSERT INTO "model_list" VALUES ("30", "Jetta");
INSERT INTO "car_names" VALUES ("1", "Civic");
INSERT INTO "car_names" VALUES ("2", "Civic");
INSERT INTO "car_names" VALUES ("3", "Civic");
INSERT INTO "car_names" VALUES ("4", "Corolla");
INSERT INTO "car_names" VALUES ("5", "Corolla");
INSERT INTO "car_names" VALUES ("6", "F-150");
INSERT INTO "car_names" VALUES ("7", "F-150");
INSERT INTO "car_names" VALUES ("8", "F-150");
INSERT INTO "car_names" VALUES ("9", "F-150");
INSERT INTO "car_names" VALUES ("10", "3 Series");
INSERT INTO "car_names" VALUES ("11", "3 Series");
INSERT INTO "car_names" VALUES ("12", "C-Class");
INSERT INTO "car_names" VALUES ("13", "A4");
INSERT INTO "car_names" VALUES ("14", "Altima");
INSERT INTO "car_names" VALUES ("15", "Altima");
INSERT INTO "car_names" VALUES ("16", "Elantra");
INSERT INTO "car_names" VALUES ("17", "Sportage");
INSERT INTO "car_names" VALUES ("18", "Golf");
INSERT INTO "car_names" VALUES ("19", "Accord");
INSERT INTO "car_names" VALUES ("20", "Camry");
INSERT INTO "car_names" VALUES ("21", "Mustang");
INSERT INTO "car_names" VALUES ("22", "X5");
INSERT INTO "car_names" VALUES ("23", "E-Class");
INSERT INTO "car_names" VALUES ("24", "Q5");
INSERT INTO "car_names" VALUES ("25", "Titan");
INSERT INTO "car_names" VALUES ("26", "Sonata");
INSERT INTO "car_names" VALUES ("27", "Sorento");
INSERT INTO "car_names" VALUES ("28", "Passat");
INSERT INTO "car_names" VALUES ("29", "CR-V");
INSERT INTO "car_names" VALUES ("30", "RAV4");
INSERT INTO "car_names" VALUES ("31", "Explorer");
INSERT INTO "car_names" VALUES ("32", "5 Series");
INSERT INTO "car_names" VALUES ("33", "GLC");
INSERT INTO "car_names" VALUES ("34", "A6");
INSERT INTO "car_names" VALUES ("35", "Rogue");
INSERT INTO "car_names" VALUES ("36", "Tucson");
INSERT INTO "car_names" VALUES ("37", "Telluride");
INSERT INTO "car_names" VALUES ("38", "Jetta");
INSERT INTO "car_names" VALUES ("39", "Civic");
INSERT INTO "car_names" VALUES ("40", "F-150");
INSERT INTO "car_names" VALUES ("41", "Civic");
INSERT INTO "car_names" VALUES ("42", "F-150");
INSERT INTO "car_names" VALUES ("43", "Civic");
INSERT INTO "car_names" VALUES ("44", "F-150");
INSERT INTO "car_names" VALUES ("45", "Civic");
INSERT INTO "car_names" VALUES ("46", "F-150");
INSERT INTO "car_names" VALUES ("47", "Civic");
INSERT INTO "car_names" VALUES ("48", "F-150");
INSERT INTO "car_names" VALUES ("49", "Civic");
INSERT INTO "car_names" VALUES ("50", "F-150");
INSERT INTO "cars_data" VALUES ("1");
INSERT INTO "cars_data" VALUES ("2");
INSERT INTO "cars_data" VALUES ("3");
INSERT INTO "cars_data" VALUES ("4");
INSERT INTO "cars_data" VALUES ("5");
INSERT INTO "cars_data" VALUES ("6");
INSERT INTO "cars_data" VALUES ("7");
INSERT INTO "cars_data" VALUES ("8");
INSERT INTO "cars_data" VALUES ("9");
INSERT INTO "cars_data" VALUES ("10");
INSERT INTO "cars_data" VALUES ("11");
INSERT INTO "cars_data" VALUES ("12");
INSERT INTO "cars_data" VALUES ("13");
INSERT INTO "cars_data" VALUES ("14");
INSERT INTO "cars_data" VALUES ("15");
INSERT INTO "cars_data" VALUES ("16");
INSERT INTO "cars_data" VALUES ("17");
INSERT INTO "cars_data" VALUES ("18");
INSERT INTO "cars_data" VALUES ("19");
INSERT INTO "cars_data" VALUES ("20");
INSERT INTO "cars_data" VALUES ("21");
INSERT INTO "cars_data" VALUES ("22");
INSERT INTO "cars_data" VALUES ("23");
INSERT INTO "cars_data" VALUES ("24");
INSERT INTO "cars_data" VALUES ("25");
INSERT INTO "cars_data" VALUES ("26");
INSERT INTO "cars_data" VALUES ("27");
INSERT INTO "cars_data" VALUES ("28");
INSERT INTO "cars_data" VALUES ("29");
INSERT INTO "cars_data" VALUES ("30");
INSERT INTO "cars_data" VALUES ("31");
INSERT INTO "cars_data" VALUES ("32");
INSERT INTO "cars_data" VALUES ("33");
INSERT INTO "cars_data" VALUES ("34");
INSERT INTO "cars_data" VALUES ("35");
INSERT INTO "cars_data" VALUES ("36");
INSERT INTO "cars_data" VALUES ("37");
INSERT INTO "cars_data" VALUES ("38");
INSERT INTO "cars_data" VALUES ("39");
INSERT INTO "cars_data" VALUES ("40");
INSERT INTO "cars_data" VALUES ("41");
INSERT INTO "cars_data" VALUES ("42");
INSERT INTO "cars_data" VALUES ("43");
INSERT INTO "cars_data" VALUES ("44");
INSERT INTO "cars_data" VALUES ("45");
INSERT INTO "cars_data" VALUES ("46");
INSERT INTO "cars_data" VALUES ("47");
INSERT INTO "cars_data" VALUES ("48");
INSERT INTO "cars_data" VALUES ("49");
INSERT INTO "cars_data" VALUES ("50");