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

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





INSERT INTO "car_makers" VALUES ("1", "Toyota", "Toyota Motor Corporation", "Japan");
INSERT INTO "car_makers" VALUES ("2", "Ford", "Ford Motor Company", "USA");
INSERT INTO "car_makers" VALUES ("3", "BMW", "Bayerische Motoren Werke AG", "Germany");
INSERT INTO "car_makers" VALUES ("4", "Hyundai", "Hyundai Motor Company", "South Korea");
INSERT INTO "car_makers" VALUES ("5", "Fiat", "Fiat Chrysler Automobiles", "Italy");
INSERT INTO "car_makers" VALUES ("6", "Tesla", "Tesla, Inc.", "USA");
INSERT INTO "car_makers" VALUES ("7", "Renault", "Renault S.A.", "France");
INSERT INTO "car_makers" VALUES ("8", "Volvo", "Volvo Car Corporation", "Sweden");
INSERT INTO "car_makers" VALUES ("9", "Nissan", "Nissan Motor Corporation", "Japan");
INSERT INTO "car_makers" VALUES ("10", "Chevrolet", "Chevrolet Division of General Motors", "USA");
INSERT INTO "model_list" VALUES ("101", "1", "Corolla");
INSERT INTO "model_list" VALUES ("102", "1", "Camry");
INSERT INTO "model_list" VALUES ("103", "1", "Prius");
INSERT INTO "model_list" VALUES ("104", "2", "F-150");
INSERT INTO "model_list" VALUES ("105", "2", "Mustang");
INSERT INTO "model_list" VALUES ("106", "3", "3 Series");
INSERT INTO "model_list" VALUES ("107", "3", "X5");
INSERT INTO "model_list" VALUES ("108", "4", "Elantra");
INSERT INTO "model_list" VALUES ("109", "4", "Santa Fe");
INSERT INTO "model_list" VALUES ("110", "5", "500");
INSERT INTO "model_list" VALUES ("111", "5", "Panda");
INSERT INTO "model_list" VALUES ("112", "6", "Model S");
INSERT INTO "model_list" VALUES ("113", "6", "Model 3");
INSERT INTO "model_list" VALUES ("114", "7", "Clio");
INSERT INTO "model_list" VALUES ("115", "7", "Megane");
INSERT INTO "model_list" VALUES ("116", "8", "XC90");
INSERT INTO "model_list" VALUES ("117", "8", "S60");
INSERT INTO "model_list" VALUES ("118", "9", "Altima");
INSERT INTO "model_list" VALUES ("119", "9", "Leaf");
INSERT INTO "model_list" VALUES ("120", "10", "Silverado");
INSERT INTO "model_list" VALUES ("121", "10", "Camaro");
INSERT INTO "model_list" VALUES ("122", "10", "Bolt EV");