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 "Cartoon" (
"id" FLOAT,
"Title" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "TV_Channel" (
"id" TEXT,
"series_name" TEXT,
"Hight_definition_TV" 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 "Cartoon" VALUES ("1", "Tom and Jerry");
INSERT INTO "Cartoon" VALUES ("2", "Looney Tunes");
INSERT INTO "Cartoon" VALUES ("3", "The Flintstones");
INSERT INTO "Cartoon" VALUES ("4", "Scooby-Doo");
INSERT INTO "Cartoon" VALUES ("5", "SpongeBob SquarePants");
INSERT INTO "Cartoon" VALUES ("6", "The Simpsons");
INSERT INTO "Cartoon" VALUES ("7", "Family Guy");
INSERT INTO "Cartoon" VALUES ("8", "South Park");
INSERT INTO "Cartoon" VALUES ("9", "Adventure Time");
INSERT INTO "Cartoon" VALUES ("10", "Rick and Morty");
INSERT INTO "TV_Channel" VALUES ("CH001", "Cartoon Network", "Yes", "Kids Pack");
INSERT INTO "TV_Channel" VALUES ("CH002", "HBO", "Yes", "Premium Pack");
INSERT INTO "TV_Channel" VALUES ("CH003", "Discovery Channel", "No", "Basic Pack");
INSERT INTO "TV_Channel" VALUES ("CH004", "National Geographic", "Yes", "Nature Pack");
INSERT INTO "TV_Channel" VALUES ("CH005", "ESPN", "No", "Sports Pack");
INSERT INTO "TV_Channel" VALUES ("CH006", "Netflix", "Yes", "Streaming Pack");
INSERT INTO "TV_Channel" VALUES ("CH007", "BBC One", "Yes", "Standard Pack");
INSERT INTO "TV_Channel" VALUES ("CH008", "ABC", "No", "Local Pack");
INSERT INTO "TV_Channel" VALUES ("CH009", "FX", "Yes", "Entertainment Pack");
INSERT INTO "TV_Channel" VALUES ("CH010", "AMC", "No", "Movie Pack");
INSERT INTO "TV_series" VALUES ("101", "Episode 1", "CH001");
INSERT INTO "TV_series" VALUES ("102", "Episode 2", "CH001");
INSERT INTO "TV_series" VALUES ("201", "Pilot", "CH002");
INSERT INTO "TV_series" VALUES ("202", "Season 1, Episode 2", "CH002");
INSERT INTO "TV_series" VALUES ("301", "Documentary Part 1", "CH003");
INSERT INTO "TV_series" VALUES ("401", "Wild Animals", "CH004");
INSERT INTO "TV_series" VALUES ("501", "Game Highlights", "CH005");
INSERT INTO "TV_series" VALUES ("601", "Stranger Things S1E1", "CH006");
INSERT INTO "TV_series" VALUES ("701", "Doctor Who S1E1", "CH007");
INSERT INTO "TV_series" VALUES ("801", "Local News", "CH008");
INSERT INTO "TV_series" VALUES ("901", "The Americans S1E1", "CH009");
INSERT INTO "TV_series" VALUES ("1001", "The Walking Dead S1E1", "CH010");
INSERT INTO "TV_series" VALUES ("103", "Episode 3", "CH001");
INSERT INTO "TV_series" VALUES ("203", "Season 1, Episode 3", "CH002");
INSERT INTO "TV_series" VALUES ("402", "Ocean Life", "CH004");
INSERT INTO "TV_series" VALUES ("602", "The Crown S1E1", "CH006");
INSERT INTO "TV_series" VALUES ("702", "Sherlock S1E1", "CH007");
INSERT INTO "TV_series" VALUES ("902", "Atlanta S1E1", "CH009");