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,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);

CREATE TABLE "TV_Channel" (
"id" TEXT UNIQUE,
"series_name" TEXT,
"Content" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "TV_series" (
"id" FLOAT,
"Episode" TEXT,
PRIMARY KEY ("id")
);





INSERT INTO "TV_Channel" VALUES ("CH001", "Sky Radio", "Music and entertainment channel");
INSERT INTO "TV_Channel" VALUES ("CH002", "Sky Radio", "News and weather updates");
INSERT INTO "TV_Channel" VALUES ("CH003", "Ocean View", "Documentaries and nature shows");
INSERT INTO "TV_Channel" VALUES ("CH004", "Star Network", "Drama and reality TV");
INSERT INTO "TV_Channel" VALUES ("CH005", "Sky Radio", "Classic hits and talk shows");
INSERT INTO "TV_Channel" VALUES ("CH006", "Night Owl", "Late night movies and series");
INSERT INTO "TV_Channel" VALUES ("CH007", "Sky Radio", "Live concerts and interviews");
INSERT INTO "TV_Channel" VALUES ("CH008", "Kids Fun", "Cartoons and kids shows");
INSERT INTO "TV_Channel" VALUES ("CH009", "Sky Radio", "Variety shows and specials");
INSERT INTO "TV_Channel" VALUES ("CH010", "Empty Channel", "NULL");
INSERT INTO "Cartoon" VALUES ("1", "Funny Bunnies", "CH008");
INSERT INTO "Cartoon" VALUES ("2", "Space Adventures", "CH004");
INSERT INTO "Cartoon" VALUES ("3", "Ocean Tales", "CH003");
INSERT INTO "Cartoon" VALUES ("4", "Night Shadows", "CH006");
INSERT INTO "Cartoon" VALUES ("5", "Sky Tunes", "CH001");
INSERT INTO "Cartoon" VALUES ("6", "Sky Tunes Special", "CH007");
INSERT INTO "Cartoon" VALUES ("7", "Classic Cartoons", "CH008");
INSERT INTO "Cartoon" VALUES ("8", "Morning Fun", "CH010");
INSERT INTO "TV_series" VALUES ("1", "Episode 1: The Beginning");
INSERT INTO "TV_series" VALUES ("2", "Episode 2: The Mystery");
INSERT INTO "TV_series" VALUES ("3", "Episode 3: The Finale");
INSERT INTO "TV_series" VALUES ("4", "Episode 4: The Return");
INSERT INTO "TV_series" VALUES ("5", "Episode 5: The Secret");
INSERT INTO "TV_series" VALUES ("6", "Episode 6: The Chase");
INSERT INTO "TV_series" VALUES ("7", "Episode 7: The Escape");
INSERT INTO "TV_series" VALUES ("8", "Episode 8: The Reunion");