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

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





INSERT INTO "car_makers" VALUES ("1", "Ford");
INSERT INTO "car_makers" VALUES ("2", "Chevrolet");
INSERT INTO "car_makers" VALUES ("3", "Dodge");
INSERT INTO "car_makers" VALUES ("4", "Plymouth");
INSERT INTO "car_makers" VALUES ("5", "Pontiac");
INSERT INTO "car_makers" VALUES ("6", "Buick");
INSERT INTO "car_makers" VALUES ("7", "Cadillac");
INSERT INTO "car_makers" VALUES ("8", "AMC");
INSERT INTO "car_makers" VALUES ("9", "Chrysler");
INSERT INTO "car_makers" VALUES ("10", "Oldsmobile");
INSERT INTO "car_names" VALUES ("1", "Mustang");
INSERT INTO "car_names" VALUES ("2", "Camaro");
INSERT INTO "car_names" VALUES ("3", "Charger");
INSERT INTO "car_names" VALUES ("4", "Barracuda");
INSERT INTO "car_names" VALUES ("5", "GTO");
INSERT INTO "car_names" VALUES ("6", "Skylark");
INSERT INTO "car_names" VALUES ("7", "Eldorado");
INSERT INTO "car_names" VALUES ("8", "Javelin");
INSERT INTO "car_names" VALUES ("9", "Newport");
INSERT INTO "car_names" VALUES ("10", "Cutlass");
INSERT INTO "cars_data" VALUES ("1", "8", "300", "3500", "1974");
INSERT INTO "cars_data" VALUES ("2", "8", "350", "3600", "1974");
INSERT INTO "cars_data" VALUES ("3", "8", "370", "3700", "1974");
INSERT INTO "cars_data" VALUES ("4", "6", "250", "3200", "1974");
INSERT INTO "cars_data" VALUES ("5", "8", "360", "3400", "1974");
INSERT INTO "cars_data" VALUES ("6", "6", "200", "3100", "1974");
INSERT INTO "cars_data" VALUES ("7", "8", "425", "4100", "1974");
INSERT INTO "cars_data" VALUES ("8", "8", "290", "3300", "1974");
INSERT INTO "cars_data" VALUES ("9", "8", "305", "3550", "1974");
INSERT INTO "cars_data" VALUES ("10", "6", "180", "3000", "1974");
INSERT INTO "car_names" VALUES ("11", "Corvette");
INSERT INTO "car_names" VALUES ("12", "Firebird");
INSERT INTO "car_names" VALUES ("13", "Impala");
INSERT INTO "car_names" VALUES ("14", "Grand Prix");
INSERT INTO "car_names" VALUES ("15", "Cutlass Supreme");
INSERT INTO "car_names" VALUES ("16", "Toronado");
INSERT INTO "car_names" VALUES ("17", "Gremlin");
INSERT INTO "car_names" VALUES ("18", "LeBaron");
INSERT INTO "car_names" VALUES ("19", "Fury");
INSERT INTO "car_names" VALUES ("20", "Delta 88");
INSERT INTO "cars_data" VALUES ("11", "8", "350", "3450", "1974");
INSERT INTO "cars_data" VALUES ("12", "8", "310", "3250", "1974");
INSERT INTO "cars_data" VALUES ("13", "8", "300", "3650", "1974");
INSERT INTO "cars_data" VALUES ("14", "8", "310", "3550", "1974");
INSERT INTO "cars_data" VALUES ("15", "6", "250", "3300", "1974");
INSERT INTO "cars_data" VALUES ("16", "8", "385", "4000", "1974");
INSERT INTO "cars_data" VALUES ("17", "6", "150", "2800", "1974");
INSERT INTO "cars_data" VALUES ("18", "8", "300", "3350", "1974");
INSERT INTO "cars_data" VALUES ("19", "8", "360", "3700", "1974");
INSERT INTO "cars_data" VALUES ("20", "6", "200", "3200", "1974");
INSERT INTO "car_names" VALUES ("21", "Nova");
INSERT INTO "car_names" VALUES ("22", "Monte Carlo");
INSERT INTO "car_names" VALUES ("23", "Satellite");
INSERT INTO "car_names" VALUES ("24", "Road Runner");
INSERT INTO "car_names" VALUES ("25", "Duster");
INSERT INTO "car_names" VALUES ("26", "LeMans");
INSERT INTO "car_names" VALUES ("27", "Torino");
INSERT INTO "car_names" VALUES ("28", "Cutlass Salon");
INSERT INTO "car_names" VALUES ("29", "Skylark GS");
INSERT INTO "car_names" VALUES ("30", "Grand Am");
INSERT INTO "cars_data" VALUES ("21", "8", "275", "3150", "1974");
INSERT INTO "cars_data" VALUES ("22", "8", "305", "3500", "1974");
INSERT INTO "cars_data" VALUES ("23", "8", "340", "3600", "1974");
INSERT INTO "cars_data" VALUES ("24", "8", "370", "3750", "1974");
INSERT INTO "cars_data" VALUES ("25", "6", "180", "2900", "1974");
INSERT INTO "cars_data" VALUES ("26", "8", "310", "3450", "1974");
INSERT INTO "cars_data" VALUES ("27", "8", "335", "3650", "1974");
INSERT INTO "cars_data" VALUES ("28", "6", "250", "3300", "1974");
INSERT INTO "cars_data" VALUES ("29", "6", "230", "3200", "1974");
INSERT INTO "cars_data" VALUES ("30", "6", "200", "3100", "1974");