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

CREATE TABLE "car_names" (
"MakeId" INT,
"Make" TEXT,
PRIMARY KEY ("MakeId")
);

CREATE TABLE "continents" (
"ContId" INT,
"Continent" TEXT,
PRIMARY KEY ("ContId")
);

CREATE TABLE "countries" (
"CountryId" INT UNIQUE,
"CountryName" TEXT,
PRIMARY KEY ("CountryId")
);

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





INSERT INTO "continents" VALUES ("1", "Europe");
INSERT INTO "continents" VALUES ("2", "Asia");
INSERT INTO "continents" VALUES ("3", "North America");
INSERT INTO "continents" VALUES ("4", "South America");
INSERT INTO "continents" VALUES ("5", "Africa");
INSERT INTO "continents" VALUES ("6", "Oceania");
INSERT INTO "countries" VALUES ("1", "France");
INSERT INTO "countries" VALUES ("2", "Germany");
INSERT INTO "countries" VALUES ("3", "Japan");
INSERT INTO "countries" VALUES ("4", "USA");
INSERT INTO "countries" VALUES ("5", "Italy");
INSERT INTO "countries" VALUES ("6", "UK");
INSERT INTO "countries" VALUES ("7", "South Korea");
INSERT INTO "countries" VALUES ("8", "Sweden");
INSERT INTO "countries" VALUES ("9", "China");
INSERT INTO "countries" VALUES ("10", "India");
INSERT INTO "car_makers" VALUES ("1", "Renault", "1");
INSERT INTO "car_makers" VALUES ("2", "Peugeot", "1");
INSERT INTO "car_makers" VALUES ("3", "Citroen", "1");
INSERT INTO "car_makers" VALUES ("4", "Volkswagen", "2");
INSERT INTO "car_makers" VALUES ("5", "BMW", "2");
INSERT INTO "car_makers" VALUES ("6", "Toyota", "3");
INSERT INTO "car_makers" VALUES ("7", "Honda", "3");
INSERT INTO "car_makers" VALUES ("8", "Ford", "4");
INSERT INTO "car_makers" VALUES ("9", "General Motors", "4");
INSERT INTO "car_makers" VALUES ("10", "Fiat", "5");
INSERT INTO "car_makers" VALUES ("11", "Ferrari", "5");
INSERT INTO "car_makers" VALUES ("12", "Mercedes-Benz", "2");
INSERT INTO "car_makers" VALUES ("13", "Nissan", "3");
INSERT INTO "car_makers" VALUES ("14", "Hyundai", "7");
INSERT INTO "car_makers" VALUES ("15", "Volvo", "8");
INSERT INTO "car_makers" VALUES ("16", "Tata Motors", "10");
INSERT INTO "car_makers" VALUES ("17", "BYD", "9");
INSERT INTO "car_makers" VALUES ("18", "MG", "6");
INSERT INTO "car_makers" VALUES ("19", "Bugatti", "1");
INSERT INTO "car_makers" VALUES ("20", "Dacia", "1");
INSERT INTO "car_names" VALUES ("1", "Renault Clio");
INSERT INTO "car_names" VALUES ("2", "Peugeot 208");
INSERT INTO "car_names" VALUES ("3", "Citroen C3");
INSERT INTO "car_names" VALUES ("4", "VW Golf");
INSERT INTO "car_names" VALUES ("5", "BMW 3 Series");
INSERT INTO "car_names" VALUES ("6", "Toyota Corolla");
INSERT INTO "car_names" VALUES ("7", "Honda Civic");
INSERT INTO "car_names" VALUES ("8", "Ford Focus");
INSERT INTO "car_names" VALUES ("9", "Chevy Silverado");
INSERT INTO "car_names" VALUES ("10", "Fiat 500");
INSERT INTO "car_names" VALUES ("11", "Ferrari 488");
INSERT INTO "car_names" VALUES ("12", "Mercedes C-Class");
INSERT INTO "car_names" VALUES ("13", "Nissan Qashqai");
INSERT INTO "car_names" VALUES ("14", "Hyundai Tucson");
INSERT INTO "car_names" VALUES ("15", "Volvo XC60");
INSERT INTO "car_names" VALUES ("16", "Tata Nexon");
INSERT INTO "car_names" VALUES ("17", "BYD Atto 3");
INSERT INTO "car_names" VALUES ("18", "MG ZS");
INSERT INTO "car_names" VALUES ("19", "Bugatti Chiron");
INSERT INTO "car_names" VALUES ("20", "Dacia Sandero");
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", "4");
INSERT INTO "model_list" VALUES ("5", "5");
INSERT INTO "model_list" VALUES ("6", "6");
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");
INSERT INTO "model_list" VALUES ("14", "14");
INSERT INTO "model_list" VALUES ("15", "15");
INSERT INTO "model_list" VALUES ("16", "16");
INSERT INTO "model_list" VALUES ("17", "17");
INSERT INTO "model_list" VALUES ("18", "18");
INSERT INTO "model_list" VALUES ("19", "19");
INSERT INTO "model_list" VALUES ("20", "20");