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 "TV_Channel" (
"id" TEXT,
"series_name" TEXT,
"Content" TEXT,
"Package_Option" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "TV_series" (
"id" FLOAT,
"Episode" TEXT,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);





INSERT INTO "TV_Channel" VALUES ("ch1", "Sky Radio", "Music and entertainment", "Basic");
INSERT INTO "TV_Channel" VALUES ("ch2", "Sky Radio", "News and documentaries", "Premium");
INSERT INTO "TV_Channel" VALUES ("ch3", "Star TV", "Drama and movies", "Basic");
INSERT INTO "TV_Channel" VALUES ("ch4", "Sky Radio", "Sports and live events", "Sports Pack");
INSERT INTO "TV_Channel" VALUES ("ch5", "Global News", "News and weather", "Standard");
INSERT INTO "TV_Channel" VALUES ("ch6", "Sky Radio", "Kids and family shows", "Family Pack");
INSERT INTO "TV_Channel" VALUES ("ch7", "Local TV", "Community programs", "Basic");
INSERT INTO "TV_series" VALUES ("101", "Episode 1", "ch1");
INSERT INTO "TV_series" VALUES ("102", "Episode 2", "ch1");
INSERT INTO "TV_series" VALUES ("103", "Episode 1", "ch2");
INSERT INTO "TV_series" VALUES ("104", "Episode 3", "ch2");
INSERT INTO "TV_series" VALUES ("105", "Episode 1", "ch3");
INSERT INTO "TV_series" VALUES ("106", "Episode 2", "ch4");
INSERT INTO "TV_series" VALUES ("107", "Episode 1", "ch4");
INSERT INTO "TV_series" VALUES ("108", "Episode 1", "ch6");
INSERT INTO "TV_series" VALUES ("109", "Episode 2", "ch6");
INSERT INTO "TV_series" VALUES ("110", "Episode 1", "ch7");