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,
"Name" TEXT,
"Num_of_Staff" INT,
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")
);

CREATE TABLE "visitor" (
"ID" INT,
"Name" TEXT,
PRIMARY KEY ("ID")
);





INSERT INTO "museum" VALUES ("101", "The Louvre", "2500");
INSERT INTO "museum" VALUES ("102", "British Museum", "1800");
INSERT INTO "museum" VALUES ("103", "Metropolitan Museum of Art", "3000");
INSERT INTO "museum" VALUES ("104", "Smithsonian National Museum of Natural History", "2200");
INSERT INTO "museum" VALUES ("105", "Uffizi Gallery", "1200");
INSERT INTO "museum" VALUES ("106", "Rijksmuseum", "1500");
INSERT INTO "museum" VALUES ("107", "Prado Museum", "1000");
INSERT INTO "museum" VALUES ("108", "Acropolis Museum", "900");
INSERT INTO "museum" VALUES ("109", "Vatican Museums", "2800");
INSERT INTO "museum" VALUES ("110", "Hermitage Museum", "2700");
INSERT INTO "visit" VALUES ("101", "V001", "2", "40.0");
INSERT INTO "visit" VALUES ("101", "V002", "1", "20.0");
INSERT INTO "visit" VALUES ("102", "V003", "3", "45.0");
INSERT INTO "visit" VALUES ("103", "V004", "1", "25.0");
INSERT INTO "visit" VALUES ("103", "V005", "4", "100.0");
INSERT INTO "visit" VALUES ("104", "V006", "2", "30.0");
INSERT INTO "visit" VALUES ("105", "V007", "1", "18.0");
INSERT INTO "visit" VALUES ("106", "V008", "2", "35.0");
INSERT INTO "visit" VALUES ("107", "V009", "3", "50.0");
INSERT INTO "visit" VALUES ("108", "V010", "1", "15.0");
INSERT INTO "visit" VALUES ("103", "V011", "2", "50.0");
INSERT INTO "visit" VALUES ("101", "V012", "3", "60.0");
INSERT INTO "visit" VALUES ("109", "V013", "1", "22.0");
INSERT INTO "visit" VALUES ("110", "V014", "2", "40.0");
INSERT INTO "visitor" VALUES ("1", "Alice Smith");
INSERT INTO "visitor" VALUES ("2", "Bob Johnson");
INSERT INTO "visitor" VALUES ("3", "Charlie Brown");
INSERT INTO "visitor" VALUES ("4", "Diana Prince");
INSERT INTO "visitor" VALUES ("5", "Eve Adams");
INSERT INTO "visitor" VALUES ("6", "Frank White");
INSERT INTO "visitor" VALUES ("7", "Grace Lee");
INSERT INTO "visitor" VALUES ("8", "Henry Green");
INSERT INTO "visitor" VALUES ("9", "Ivy King");
INSERT INTO "visitor" VALUES ("10", "Jack Black");
INSERT INTO "visitor" VALUES ("11", "Karen Miller");
INSERT INTO "visitor" VALUES ("12", "Liam Davis");
INSERT INTO "visitor" VALUES ("13", "Mia Wilson");
INSERT INTO "visitor" VALUES ("14", "Noah Taylor");