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 "museum" (
"Museum_ID" INT UNIQUE,
"Num_of_Staff" INT,
"Open_Year" TEXT,
PRIMARY KEY ("Museum_ID")
);

CREATE TABLE "visit" (
"Museum_ID" INT,
"visitor_ID" TEXT,
"Num_of_Ticket" INT,
"Total_spent" FLOAT,
PRIMARY KEY ("Museum_ID", "visitor_ID")
);





INSERT INTO "museum" VALUES ("1", "150", "2005");
INSERT INTO "museum" VALUES ("2", "200", "2010");
INSERT INTO "museum" VALUES ("3", "120", "1998");
INSERT INTO "museum" VALUES ("4", "80", "2007");
INSERT INTO "museum" VALUES ("5", "300", "2012");
INSERT INTO "museum" VALUES ("6", "90", "2009");
INSERT INTO "museum" VALUES ("7", "180", "1995");
INSERT INTO "museum" VALUES ("8", "250", "2008");
INSERT INTO "museum" VALUES ("9", "110", "2011");
INSERT INTO "museum" VALUES ("10", "130", "2006");
INSERT INTO "visit" VALUES ("1", "V001", "5", "75.50");
INSERT INTO "visit" VALUES ("1", "V002", "2", "30.00");
INSERT INTO "visit" VALUES ("2", "V003", "3", "45.00");
INSERT INTO "visit" VALUES ("3", "V004", "1", "15.00");
INSERT INTO "visit" VALUES ("4", "V005", "4", "60.00");
INSERT INTO "visit" VALUES ("5", "V006", "6", "90.00");
INSERT INTO "visit" VALUES ("6", "V007", "2", "30.00");
INSERT INTO "visit" VALUES ("7", "V008", "3", "45.00");
INSERT INTO "visit" VALUES ("8", "V009", "5", "75.00");
INSERT INTO "visit" VALUES ("9", "V010", "1", "15.00");
INSERT INTO "visit" VALUES ("10", "V011", "4", "60.00");
INSERT INTO "visit" VALUES ("1", "V012", "3", "45.00");
INSERT INTO "visit" VALUES ("3", "V013", "2", "30.00");
INSERT INTO "visit" VALUES ("4", "V014", "1", "15.00");
INSERT INTO "visit" VALUES ("7", "V015", "5", "75.00");
INSERT INTO "visit" VALUES ("8", "V016", "2", "30.00");