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 ("CH1", "Sky Radio", "Music and entertainment programs");
INSERT INTO "TV_Channel" VALUES ("CH2", "Ocean View", "Documentaries and nature shows");
INSERT INTO "TV_Channel" VALUES ("CH3", "City Lights", "Drama and reality TV");
INSERT INTO "TV_Channel" VALUES ("CH4", "Sky Radio", "Live concerts and radio shows");
INSERT INTO "TV_Channel" VALUES ("CH5", "Mountain Peak", "Adventure and travel content");
INSERT INTO "Cartoon" VALUES ("101", "Funny Tunes", "CH1");
INSERT INTO "Cartoon" VALUES ("102", "Ocean Adventures", "CH2");
INSERT INTO "Cartoon" VALUES ("103", "Urban Tales", "CH3");
INSERT INTO "Cartoon" VALUES ("104", "Radio Waves", "CH4");
INSERT INTO "Cartoon" VALUES ("105", "Mountain Mysteries", "CH5");
INSERT INTO "TV_series" VALUES ("201", "Episode 1: The Beginning");
INSERT INTO "TV_series" VALUES ("202", "Episode 2: The Journey");
INSERT INTO "TV_series" VALUES ("203", "Episode 3: The Challenge");
INSERT INTO "TV_series" VALUES ("204", "Episode 4: The Finale");
INSERT INTO "TV_series" VALUES ("205", "Special Episode: Behind the Scenes");