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

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

CREATE TABLE "TV_series" (
"id" FLOAT,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);





INSERT INTO "TV_Channel" VALUES ("CH1", "Adventure Series");
INSERT INTO "TV_Channel" VALUES ("CH2", "Comedy Central");
INSERT INTO "TV_Channel" VALUES ("CH3", "Kids Fun");
INSERT INTO "TV_Channel" VALUES ("CH4", "Drama Hub");
INSERT INTO "TV_Channel" VALUES ("CH5", "SciFi World");
INSERT INTO "TV_series" VALUES ("101", "CH1");
INSERT INTO "TV_series" VALUES ("102", "CH2");
INSERT INTO "TV_series" VALUES ("103", "CH3");
INSERT INTO "TV_series" VALUES ("104", "CH4");
INSERT INTO "TV_series" VALUES ("105", "CH5");
INSERT INTO "Cartoon" VALUES ("1", "Jungle Quest", "Ben Jones", "CH1");
INSERT INTO "Cartoon" VALUES ("2", "Funny Bones", "Alice Smith", "CH2");
INSERT INTO "Cartoon" VALUES ("3", "Space Adventures", "Ben Jones", "CH5");
INSERT INTO "Cartoon" VALUES ("4", "Happy Days", "John Doe", "CH3");
INSERT INTO "Cartoon" VALUES ("5", "Mystery Island", "Ben Jones", "CH1");
INSERT INTO "Cartoon" VALUES ("6", "Laugh Out Loud", "Mary Jane", "CH2");
INSERT INTO "Cartoon" VALUES ("7", "Ocean Tales", "Chris Ray", "CH3");
INSERT INTO "Cartoon" VALUES ("8", "Future World", "Ben Jones", "CH5");
INSERT INTO "Cartoon" VALUES ("9", "Drama Kids", "Anna Bell", "CH4");
INSERT INTO "Cartoon" VALUES ("10", "Comedy Nights", "Tom Hardy", "CH2");