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")
);

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

CREATE TABLE "cars_data" (
"Id" INT,
"Horsepower" TEXT,
"Weight" INT,
"Year" INT,
PRIMARY KEY ("Id")
);





INSERT INTO "car_makers" VALUES ("1", "Japan");
INSERT INTO "car_makers" VALUES ("2", "Germany");
INSERT INTO "car_makers" VALUES ("3", "USA");
INSERT INTO "car_makers" VALUES ("4", "South Korea");
INSERT INTO "car_makers" VALUES ("5", "Italy");
INSERT INTO "car_names" VALUES ("1", "Civic");
INSERT INTO "car_names" VALUES ("2", "Golf");
INSERT INTO "car_names" VALUES ("3", "Mustang");
INSERT INTO "car_names" VALUES ("4", "Sonata");
INSERT INTO "car_names" VALUES ("5", "Punto");
INSERT INTO "cars_data" VALUES ("1", "158", "2800", "2018");
INSERT INTO "cars_data" VALUES ("2", "170", "2900", "2018");
INSERT INTO "cars_data" VALUES ("3", "450", "3700", "2019");
INSERT INTO "cars_data" VALUES ("4", "190", "3200", "2019");
INSERT INTO "cars_data" VALUES ("5", "130", "2700", "2020");
INSERT INTO "cars_data" VALUES ("6", "140", "2750", "2020");
INSERT INTO "cars_data" VALUES ("7", "200", "3300", "2020");
INSERT INTO "cars_data" VALUES ("8", "300", "4000", "2021");
INSERT INTO "cars_data" VALUES ("9", "310", "4100", "2021");
INSERT INTO "cars_data" VALUES ("10", "320", "4200", "2021");
INSERT INTO "cars_data" VALUES ("11", "100", "2500", "2022");
INSERT INTO "cars_data" VALUES ("12", "110", "2600", "2022");
INSERT INTO "cars_data" VALUES ("13", "120", "2550", "2022");
INSERT INTO "cars_data" VALUES ("14", "130", "2650", "2022");
INSERT INTO "cars_data" VALUES ("15", "140", "2700", "2022");