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

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

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





INSERT INTO "car_makers" VALUES ("1", "Toyota");
INSERT INTO "car_makers" VALUES ("2", "Ford");
INSERT INTO "car_makers" VALUES ("3", "Chevrolet");
INSERT INTO "car_makers" VALUES ("4", "Honda");
INSERT INTO "car_makers" VALUES ("5", "BMW");
INSERT INTO "car_makers" VALUES ("6", "Tesla");
INSERT INTO "car_makers" VALUES ("7", "Dodge");
INSERT INTO "car_makers" VALUES ("8", "Volkswagen");
INSERT INTO "car_makers" VALUES ("9", "Subaru");
INSERT INTO "car_makers" VALUES ("10", "Audi");
INSERT INTO "car_names" VALUES ("101", "Corolla");
INSERT INTO "car_names" VALUES ("102", "Mustang");
INSERT INTO "car_names" VALUES ("103", "Camaro");
INSERT INTO "car_names" VALUES ("104", "Civic");
INSERT INTO "car_names" VALUES ("105", "3 Series");
INSERT INTO "car_names" VALUES ("106", "Model S");
INSERT INTO "car_names" VALUES ("107", "Charger");
INSERT INTO "car_names" VALUES ("108", "Golf");
INSERT INTO "car_names" VALUES ("109", "Impreza");
INSERT INTO "car_names" VALUES ("110", "A4");
INSERT INTO "cars_data" VALUES ("101", "132", "2800", "2018");
INSERT INTO "cars_data" VALUES ("102", "450", "3700", "2018");
INSERT INTO "cars_data" VALUES ("103", "455", "3705", "2018");
INSERT INTO "cars_data" VALUES ("104", "158", "2700", "2018");
INSERT INTO "cars_data" VALUES ("105", "255", "3500", "2018");
INSERT INTO "cars_data" VALUES ("106", "670", "4800", "2018");
INSERT INTO "cars_data" VALUES ("107", "485", "4200", "2018");
INSERT INTO "cars_data" VALUES ("108", "147", "2900", "2018");
INSERT INTO "cars_data" VALUES ("109", "152", "3100", "2018");
INSERT INTO "cars_data" VALUES ("110", "188", "3400", "2018");
INSERT INTO "car_names" VALUES ("201", "Camry");
INSERT INTO "car_names" VALUES ("202", "F-150");
INSERT INTO "car_names" VALUES ("203", "Silverado");
INSERT INTO "car_names" VALUES ("204", "Accord");
INSERT INTO "car_names" VALUES ("205", "5 Series");
INSERT INTO "car_names" VALUES ("206", "Model 3");
INSERT INTO "car_names" VALUES ("207", "Durango");
INSERT INTO "car_names" VALUES ("208", "Passat");
INSERT INTO "car_names" VALUES ("209", "Outback");
INSERT INTO "car_names" VALUES ("210", "Q5");
INSERT INTO "cars_data" VALUES ("201", "203", "3300", "2019");
INSERT INTO "cars_data" VALUES ("202", "400", "4500", "2019");
INSERT INTO "cars_data" VALUES ("203", "355", "4600", "2019");
INSERT INTO "cars_data" VALUES ("204", "192", "3100", "2019");
INSERT INTO "cars_data" VALUES ("205", "248", "3700", "2019");
INSERT INTO "cars_data" VALUES ("206", "283", "3600", "2019");
INSERT INTO "cars_data" VALUES ("207", "295", "4700", "2019");
INSERT INTO "cars_data" VALUES ("208", "174", "3200", "2019");
INSERT INTO "cars_data" VALUES ("209", "182", "2800", "2019");
INSERT INTO "cars_data" VALUES ("210", "261", "3900", "2019");
INSERT INTO "car_names" VALUES ("301", "Yaris");
INSERT INTO "car_names" VALUES ("302", "Explorer");
INSERT INTO "car_names" VALUES ("303", "Trailblazer");
INSERT INTO "car_names" VALUES ("304", "Fit");
INSERT INTO "car_names" VALUES ("305", "X1");
INSERT INTO "car_names" VALUES ("306", "Model X");
INSERT INTO "car_names" VALUES ("307", "Ram 1500");
INSERT INTO "car_names" VALUES ("308", "Tiguan");
INSERT INTO "car_names" VALUES ("309", "Forester");
INSERT INTO "car_names" VALUES ("310", "Q7");
INSERT INTO "cars_data" VALUES ("301", "106", "2400", "2020");
INSERT INTO "cars_data" VALUES ("302", "300", "4200", "2020");
INSERT INTO "cars_data" VALUES ("303", "308", "4300", "2020");
INSERT INTO "cars_data" VALUES ("304", "130", "2500", "2020");
INSERT INTO "cars_data" VALUES ("305", "228", "3600", "2020");
INSERT INTO "cars_data" VALUES ("306", "670", "5400", "2020");
INSERT INTO "cars_data" VALUES ("307", "395", "5200", "2020");
INSERT INTO "cars_data" VALUES ("308", "184", "3100", "2020");
INSERT INTO "cars_data" VALUES ("309", "182", "2900", "2020");
INSERT INTO "cars_data" VALUES ("310", "335", "4500", "2020");
INSERT INTO "car_names" VALUES ("401", "Prius");
INSERT INTO "car_names" VALUES ("402", "Bronco");
INSERT INTO "car_names" VALUES ("403", "Colorado");
INSERT INTO "car_names" VALUES ("404", "Insight");
INSERT INTO "car_names" VALUES ("405", "Z4");
INSERT INTO "car_names" VALUES ("406", "Roadster");
INSERT INTO "car_names" VALUES ("407", "Journey");
INSERT INTO "car_names" VALUES ("408", "Jetta");
INSERT INTO "car_names" VALUES ("409", "Legacy");
INSERT INTO "car_names" VALUES ("410", "TT");
INSERT INTO "cars_data" VALUES ("401", "121", "2900", "2021");
INSERT INTO "cars_data" VALUES ("402", "310", "4300", "2021");
INSERT INTO "cars_data" VALUES ("403", "308", "4100", "2021");
INSERT INTO "cars_data" VALUES ("404", "151", "2800", "2021");
INSERT INTO "cars_data" VALUES ("405", "382", "3500", "2021");
INSERT INTO "cars_data" VALUES ("406", "288", "2800", "2021");
INSERT INTO "cars_data" VALUES ("407", "283", "4300", "2021");
INSERT INTO "cars_data" VALUES ("408", "147", "3000", "2021");
INSERT INTO "cars_data" VALUES ("409", "182", "3200", "2021");
INSERT INTO "cars_data" VALUES ("410", "228", "3400", "2021");
INSERT INTO "car_names" VALUES ("501", "Echo");
INSERT INTO "car_names" VALUES ("502", "Expedition");
INSERT INTO "car_names" VALUES ("503", "Avalanche");
INSERT INTO "car_names" VALUES ("504", "CR-V");
INSERT INTO "car_names" VALUES ("505", "M3");
INSERT INTO "car_names" VALUES ("506", "Cybertruck");
INSERT INTO "car_names" VALUES ("507", "Viper");
INSERT INTO "car_names" VALUES ("508", "Beetle");
INSERT INTO "car_names" VALUES ("509", "Crosstrek");
INSERT INTO "car_names" VALUES ("510", "R8");
INSERT INTO "cars_data" VALUES ("501", "108", "2600", "2022");
INSERT INTO "cars_data" VALUES ("502", "375", "5600", "2022");
INSERT INTO "cars_data" VALUES ("503", "355", "5200", "2022");
INSERT INTO "cars_data" VALUES ("504", "190", "2800", "2022");
INSERT INTO "cars_data" VALUES ("505", "473", "3700", "2022");
INSERT INTO "cars_data" VALUES ("506", "800", "6000", "2022");
INSERT INTO "cars_data" VALUES ("507", "645", "4500", "2022");
INSERT INTO "cars_data" VALUES ("508", "158", "2900", "2022");
INSERT INTO "cars_data" VALUES ("509", "152", "3100", "2022");
INSERT INTO "cars_data" VALUES ("510", "562", "3800", "2022");