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 HP", "2800", "2018");
INSERT INTO "cars_data" VALUES ("2", "170 HP", "2900", "2018");
INSERT INTO "cars_data" VALUES ("3", "450 HP", "3700", "2018");
INSERT INTO "cars_data" VALUES ("4", "190 HP", "3200", "2019");
INSERT INTO "cars_data" VALUES ("5", "200 HP", "3100", "2019");
INSERT INTO "cars_data" VALUES ("6", "460 HP", "3800", "2019");
INSERT INTO "cars_data" VALUES ("7", "160 HP", "2750", "2020");
INSERT INTO "cars_data" VALUES ("8", "180 HP", "2950", "2020");
INSERT INTO "cars_data" VALUES ("9", "470 HP", "3900", "2020");
INSERT INTO "cars_data" VALUES ("10", "155 HP", "2700", "2021");
INSERT INTO "cars_data" VALUES ("11", "185 HP", "3000", "2021");
INSERT INTO "cars_data" VALUES ("12", "480 HP", "4000", "2021");
INSERT INTO "cars_data" VALUES ("13", "150 HP", "2650", "2022");
INSERT INTO "cars_data" VALUES ("14", "190 HP", "3050", "2022");
INSERT INTO "cars_data" VALUES ("15", "490 HP", "4100", "2022");
INSERT INTO "cars_data" VALUES ("16", "0 HP", "0", "2022");
INSERT INTO "cars_data" VALUES ("17", "100 HP", "1500", "2023");
INSERT INTO "cars_data" VALUES ("18", "300 HP", "3500", "2023");
INSERT INTO "cars_data" VALUES ("19", "400 HP", "3600", "2023");
INSERT INTO "cars_data" VALUES ("20", "350 HP", "3400", "2023");