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

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





INSERT INTO "TV_Channel" VALUES ("CH1", "Sky Radio", "USA");
INSERT INTO "TV_Channel" VALUES ("CH2", "Ocean View", "UK");
INSERT INTO "TV_Channel" VALUES ("CH3", "Sky Radio", "Canada");
INSERT INTO "TV_Channel" VALUES ("CH4", "Mountain TV", "USA");
INSERT INTO "TV_Channel" VALUES ("CH5", "Sky Radio", "Australia");
INSERT INTO "Cartoon" VALUES ("101", "Space Adventures", "CH1");
INSERT INTO "Cartoon" VALUES ("102", "Jungle Quest", "CH2");
INSERT INTO "Cartoon" VALUES ("103", "Sky High", "CH3");
INSERT INTO "Cartoon" VALUES ("104", "Desert Tales", "CH4");
INSERT INTO "Cartoon" VALUES ("105", "Cloud Riders", "CH1");
INSERT INTO "Cartoon" VALUES ("106", "Ocean Mysteries", "CH5");
INSERT INTO "Cartoon" VALUES ("107", "Mountain Heroes", "CH4");
INSERT INTO "Cartoon" VALUES ("108", "Sky Legends", "CH5");
INSERT INTO "Cartoon" VALUES ("109", "Urban Pioneers", "CH2");
INSERT INTO "Cartoon" VALUES ("110", "Star Voyagers", "CH3");
INSERT INTO "TV_series" VALUES ("201", "Episode 1", "2023-01-10");
INSERT INTO "TV_series" VALUES ("202", "Episode 2", "2023-01-17");
INSERT INTO "TV_series" VALUES ("203", "Episode 3", "2023-01-24");
INSERT INTO "TV_series" VALUES ("204", "Episode 4", "2023-01-31");
INSERT INTO "TV_series" VALUES ("205", "Episode 5", "2023-02-07");
INSERT INTO "TV_series" VALUES ("206", "Episode 6", "2023-02-14");
INSERT INTO "TV_series" VALUES ("207", "Episode 7", "2023-02-21");
INSERT INTO "TV_series" VALUES ("208", "Episode 8", "2023-02-28");
INSERT INTO "TV_series" VALUES ("209", "Episode 9", "2023-03-07");
INSERT INTO "TV_series" VALUES ("210", "Episode 10", "2023-03-14");