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 "Other_Available_Features" (
"feature_id" INT UNIQUE,
"feature_type_code" VARCHAR(20),
PRIMARY KEY ("feature_id")
);

CREATE TABLE "Other_Property_Features" (
"feature_id" INT,
"property_feature_description" VARCHAR(80),
FOREIGN KEY ("feature_id") REFERENCES "Other_Available_Features"("feature_id")
);

CREATE TABLE "Properties" (
"property_id" INT UNIQUE,
PRIMARY KEY ("property_id")
);





INSERT INTO "Other_Available_Features" VALUES ("1", "Pool");
INSERT INTO "Other_Available_Features" VALUES ("2", "Garage");
INSERT INTO "Other_Available_Features" VALUES ("3", "Fireplace");
INSERT INTO "Other_Available_Features" VALUES ("4", "Garden");
INSERT INTO "Other_Available_Features" VALUES ("5", "Solar Panels");
INSERT INTO "Other_Available_Features" VALUES ("6", "Security System");
INSERT INTO "Other_Available_Features" VALUES ("7", "Basement");
INSERT INTO "Other_Available_Features" VALUES ("8", "Balcony");
INSERT INTO "Other_Available_Features" VALUES ("9", "Air Conditioning");
INSERT INTO "Other_Available_Features" VALUES ("10", "Hardwood Floors");
INSERT INTO "Other_Property_Features" VALUES ("1", "Outdoor heated pool with lighting");
INSERT INTO "Other_Property_Features" VALUES ("2", "Two-car detached garage with storage");
INSERT INTO "Other_Property_Features" VALUES ("3", "Stone fireplace in living room");
INSERT INTO "Other_Property_Features" VALUES ("4", "Landscaped garden with irrigation system");
INSERT INTO "Other_Property_Features" VALUES ("5", "Roof-mounted solar panels with battery storage");
INSERT INTO "Other_Property_Features" VALUES ("6", "24/7 monitored security system");
INSERT INTO "Other_Property_Features" VALUES ("7", "Finished basement with home theater");
INSERT INTO "Other_Property_Features" VALUES ("8", "Balcony with city skyline view");
INSERT INTO "Other_Property_Features" VALUES ("9", "Central air conditioning system");
INSERT INTO "Other_Property_Features" VALUES ("10", "Refinished hardwood floors throughout");
INSERT INTO "Properties" VALUES ("101");
INSERT INTO "Properties" VALUES ("102");
INSERT INTO "Properties" VALUES ("103");
INSERT INTO "Properties" VALUES ("104");
INSERT INTO "Properties" VALUES ("105");