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

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

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





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", "Germany");
INSERT INTO "countries" VALUES ("2", "Japan");
INSERT INTO "countries" VALUES ("3", "USA");
INSERT INTO "countries" VALUES ("4", "Italy");
INSERT INTO "countries" VALUES ("5", "France");
INSERT INTO "countries" VALUES ("6", "South Korea");
INSERT INTO "countries" VALUES ("7", "UK");
INSERT INTO "countries" VALUES ("8", "Sweden");
INSERT INTO "countries" VALUES ("9", "China");
INSERT INTO "countries" VALUES ("10", "India");
INSERT INTO "car_makers" VALUES ("1", "1");
INSERT INTO "car_makers" VALUES ("2", "2");
INSERT INTO "car_makers" VALUES ("3", "3");
INSERT INTO "car_makers" VALUES ("4", "4");
INSERT INTO "car_makers" VALUES ("5", "5");
INSERT INTO "car_makers" VALUES ("6", "2");
INSERT INTO "car_makers" VALUES ("7", "1");
INSERT INTO "car_makers" VALUES ("8", "6");
INSERT INTO "car_makers" VALUES ("9", "7");
INSERT INTO "car_makers" VALUES ("10", "8");
INSERT INTO "car_makers" VALUES ("11", "3");
INSERT INTO "car_makers" VALUES ("12", "9");
INSERT INTO "car_makers" VALUES ("13", "10");