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 UNIQUE,
"series_name" TEXT,
"Content" 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", "Sky Adventures");
INSERT INTO "Cartoon" VALUES ("2", "Ocean Quest");
INSERT INTO "Cartoon" VALUES ("3", "Mountain Mysteries");
INSERT INTO "TV_Channel" VALUES ("CH1", "Sky Radio", "Music and entertainment focused on sky-themed shows and radio dramas");
INSERT INTO "TV_Channel" VALUES ("CH2", "Ocean Channel", "Documentaries and series about marine life and ocean exploration");
INSERT INTO "TV_Channel" VALUES ("CH3", "Mountain TV", "Adventure and survival series set in mountainous regions");
INSERT INTO "TV_series" VALUES ("101", "Episode 1: The Sky Awakens", "CH1");
INSERT INTO "TV_series" VALUES ("102", "Episode 2: Clouds and Beyond", "CH1");
INSERT INTO "TV_series" VALUES ("103", "Episode 1: Deep Blue", "CH2");
INSERT INTO "TV_series" VALUES ("104", "Episode 2: Coral Kingdom", "CH2");
INSERT INTO "TV_series" VALUES ("105", "Episode 1: Summit Challenge", "CH3");
INSERT INTO "TV_series" VALUES ("106", "Episode 2: Snowbound", "CH3");