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

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

CREATE TABLE "model_list" (
"ModelId" INT,
"Maker" INT,
"Model" TEXT UNIQUE,
PRIMARY KEY ("ModelId"),
FOREIGN KEY ("Maker") REFERENCES "car_makers"("Id")
);





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 Co., Ltd.");
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 "car_names" VALUES ("1", "Civic", "Honda");
INSERT INTO "car_names" VALUES ("2", "CR-V", "Honda");
INSERT INTO "car_names" VALUES ("3", "Accord", "Honda");
INSERT INTO "car_names" VALUES ("4", "Camry", "Toyota");
INSERT INTO "car_names" VALUES ("5", "RAV4", "Toyota");
INSERT INTO "car_names" VALUES ("6", "Corolla", "Toyota");
INSERT INTO "car_names" VALUES ("7", "F-150", "Ford");
INSERT INTO "car_names" VALUES ("8", "Explorer", "Ford");
INSERT INTO "car_names" VALUES ("9", "Mustang", "Ford");
INSERT INTO "car_names" VALUES ("10", "3 Series", "BMW");
INSERT INTO "car_names" VALUES ("11", "X5", "BMW");
INSERT INTO "car_names" VALUES ("12", "C-Class", "Mercedes-Benz");
INSERT INTO "car_names" VALUES ("13", "E-Class", "Mercedes-Benz");
INSERT INTO "car_names" VALUES ("14", "A4", "Audi");
INSERT INTO "car_names" VALUES ("15", "Q5", "Audi");
INSERT INTO "car_names" VALUES ("16", "Altima", "Nissan");
INSERT INTO "car_names" VALUES ("17", "Rogue", "Nissan");
INSERT INTO "car_names" VALUES ("18", "Elantra", "Hyundai");
INSERT INTO "car_names" VALUES ("19", "Tucson", "Hyundai");
INSERT INTO "car_names" VALUES ("20", "Sportage", "Kia");
INSERT INTO "car_names" VALUES ("21", "Telluride", "Kia");
INSERT INTO "car_names" VALUES ("22", "Golf", "Volkswagen");
INSERT INTO "car_names" VALUES ("23", "Passat", "Volkswagen");
INSERT INTO "car_names" VALUES ("24", "Pilot", "Honda");
INSERT INTO "car_names" VALUES ("25", "Tacoma", "Toyota");
INSERT INTO "car_names" VALUES ("26", "Escape", "Ford");
INSERT INTO "car_names" VALUES ("27", "5 Series", "BMW");
INSERT INTO "car_names" VALUES ("28", "GLC", "Mercedes-Benz");
INSERT INTO "car_names" VALUES ("29", "A6", "Audi");
INSERT INTO "car_names" VALUES ("30", "Sentra", "Nissan");
INSERT INTO "car_names" VALUES ("31", "Sonata", "Hyundai");
INSERT INTO "car_names" VALUES ("32", "Sorento", "Kia");
INSERT INTO "car_names" VALUES ("33", "Jetta", "Volkswagen");
INSERT INTO "model_list" VALUES ("1", "1", "Civic");
INSERT INTO "model_list" VALUES ("2", "1", "CR-V");
INSERT INTO "model_list" VALUES ("3", "1", "Accord");
INSERT INTO "model_list" VALUES ("4", "2", "Camry");
INSERT INTO "model_list" VALUES ("5", "2", "RAV4");
INSERT INTO "model_list" VALUES ("6", "2", "Corolla");
INSERT INTO "model_list" VALUES ("7", "3", "F-150");
INSERT INTO "model_list" VALUES ("8", "3", "Explorer");
INSERT INTO "model_list" VALUES ("9", "3", "Mustang");
INSERT INTO "model_list" VALUES ("10", "4", "3 Series");
INSERT INTO "model_list" VALUES ("11", "4", "X5");
INSERT INTO "model_list" VALUES ("12", "5", "C-Class");
INSERT INTO "model_list" VALUES ("13", "5", "E-Class");
INSERT INTO "model_list" VALUES ("14", "6", "A4");
INSERT INTO "model_list" VALUES ("15", "6", "Q5");
INSERT INTO "model_list" VALUES ("16", "7", "Altima");
INSERT INTO "model_list" VALUES ("17", "7", "Rogue");
INSERT INTO "model_list" VALUES ("18", "8", "Elantra");
INSERT INTO "model_list" VALUES ("19", "8", "Tucson");
INSERT INTO "model_list" VALUES ("20", "9", "Sportage");
INSERT INTO "model_list" VALUES ("21", "9", "Telluride");
INSERT INTO "model_list" VALUES ("22", "10", "Golf");
INSERT INTO "model_list" VALUES ("23", "10", "Passat");
INSERT INTO "model_list" VALUES ("24", "1", "Pilot");
INSERT INTO "model_list" VALUES ("25", "2", "Tacoma");
INSERT INTO "model_list" VALUES ("26", "3", "Escape");
INSERT INTO "model_list" VALUES ("27", "4", "5 Series");
INSERT INTO "model_list" VALUES ("28", "5", "GLC");
INSERT INTO "model_list" VALUES ("29", "6", "A6");
INSERT INTO "model_list" VALUES ("30", "7", "Sentra");
INSERT INTO "model_list" VALUES ("31", "8", "Sonata");
INSERT INTO "model_list" VALUES ("32", "9", "Sorento");
INSERT INTO "model_list" VALUES ("33", "10", "Jetta");
INSERT INTO "model_list" VALUES ("34", "1", "Odyssey");
INSERT INTO "model_list" VALUES ("35", "2", "Sienna");
INSERT INTO "model_list" VALUES ("36", "3", "Bronco");
INSERT INTO "model_list" VALUES ("37", "4", "X3");
INSERT INTO "model_list" VALUES ("38", "5", "S-Class");
INSERT INTO "model_list" VALUES ("39", "6", "Q7");
INSERT INTO "model_list" VALUES ("40", "7", "Titan");
INSERT INTO "model_list" VALUES ("41", "8", "Santa Fe");
INSERT INTO "model_list" VALUES ("42", "9", "K5");
INSERT INTO "model_list" VALUES ("43", "10", "Tiguan");
INSERT INTO "model_list" VALUES ("44", "1", "Ridgeline");
INSERT INTO "model_list" VALUES ("45", "2", "4Runner");
INSERT INTO "model_list" VALUES ("46", "3", "Maverick");
INSERT INTO "model_list" VALUES ("47", "4", "7 Series");
INSERT INTO "model_list" VALUES ("48", "5", "GLE");
INSERT INTO "model_list" VALUES ("49", "6", "A8");
INSERT INTO "model_list" VALUES ("50", "7", "Frontier");
INSERT INTO "model_list" VALUES ("51", "8", "Kona");
INSERT INTO "model_list" VALUES ("52", "9", "Carnival");
INSERT INTO "model_list" VALUES ("53", "10", "Atlas");
INSERT INTO "model_list" VALUES ("54", "1", "HR-V");
INSERT INTO "model_list" VALUES ("55", "2", "Supra");
INSERT INTO "model_list" VALUES ("56", "3", "Edge");
INSERT INTO "model_list" VALUES ("57", "4", "Z4");
INSERT INTO "model_list" VALUES ("58", "5", "GLB");
INSERT INTO "model_list" VALUES ("59", "6", "e-tron");
INSERT INTO "model_list" VALUES ("60", "7", "Versa");
INSERT INTO "model_list" VALUES ("61", "8", "Venue");
INSERT INTO "model_list" VALUES ("62", "9", "Niro");
INSERT INTO "model_list" VALUES ("63", "10", "Arteon");
INSERT INTO "model_list" VALUES ("64", "1", "Insight");
INSERT INTO "model_list" VALUES ("65", "2", "Prius");
INSERT INTO "model_list" VALUES ("66", "3", "Ranger");
INSERT INTO "model_list" VALUES ("67", "4", "iX");
INSERT INTO "model_list" VALUES ("68", "5", "EQS");
INSERT INTO "model_list" VALUES ("69", "6", "Q3");
INSERT INTO "model_list" VALUES ("70", "7", "Kicks");
INSERT INTO "model_list" VALUES ("71", "8", "Palisade");
INSERT INTO "model_list" VALUES ("72", "9", "EV6");
INSERT INTO "model_list" VALUES ("73", "10", "ID.4");
INSERT INTO "model_list" VALUES ("74", "1", "Clarity");
INSERT INTO "model_list" VALUES ("75", "2", "Mirai");
INSERT INTO "model_list" VALUES ("76", "3", "Transit");
INSERT INTO "model_list" VALUES ("77", "4", "i4");
INSERT INTO "model_list" VALUES ("78", "5", "EQE");
INSERT INTO "model_list" VALUES ("79", "6", "A3");
INSERT INTO "model_list" VALUES ("80", "7", "Armada");
INSERT INTO "model_list" VALUES ("81", "8", "Kona Electric");
INSERT INTO "model_list" VALUES ("82", "9", "Soul");
INSERT INTO "model_list" VALUES ("83", "10", "Taos");
INSERT INTO "model_list" VALUES ("84", "1", "Passport");
INSERT INTO "model_list" VALUES ("85", "2", "Venza");
INSERT INTO "model_list" VALUES ("86", "3", "EcoSport");
INSERT INTO "model_list" VALUES ("87", "4", "2 Series");
INSERT INTO "model_list" VALUES ("88", "5", "GLS");
INSERT INTO "model_list" VALUES ("89", "6", "Q8");
INSERT INTO "model_list" VALUES ("90", "7", "Murano");
INSERT INTO "model_list" VALUES ("91", "8", "Veloster");
INSERT INTO "model_list" VALUES ("92", "9", "Stinger");
INSERT INTO "model_list" VALUES ("93", "10", "GTI");
INSERT INTO "model_list" VALUES ("94", "1", "CR-Z");
INSERT INTO "model_list" VALUES ("95", "2", "GR86");
INSERT INTO "model_list" VALUES ("96", "3", "GT");
INSERT INTO "model_list" VALUES ("97", "4", "8 Series");
INSERT INTO "model_list" VALUES ("98", "5", "AMG GT");
INSERT INTO "model_list" VALUES ("99", "6", "RS 7");
INSERT INTO "model_list" VALUES ("100", "7", "Z");
INSERT INTO "model_list" VALUES ("101", "8", "Nexo");
INSERT INTO "model_list" VALUES ("102", "9", "Cadenza");
INSERT INTO "model_list" VALUES ("103", "10", "Beetle");