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

CREATE TABLE "TV_Channel" (
"id" TEXT,
"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 "Cartoon" VALUES ("1", "John Smith");
INSERT INTO "Cartoon" VALUES ("2", "John Smith");
INSERT INTO "Cartoon" VALUES ("3", "Alice Johnson");
INSERT INTO "Cartoon" VALUES ("4", "Alice Johnson");
INSERT INTO "Cartoon" VALUES ("5", "Alice Johnson");
INSERT INTO "Cartoon" VALUES ("6", "Bob Lee");
INSERT INTO "Cartoon" VALUES ("7", "Catherine Zeta");
INSERT INTO "Cartoon" VALUES ("8", "Catherine Zeta");
INSERT INTO "Cartoon" VALUES ("9", "David Kim");
INSERT INTO "Cartoon" VALUES ("10", "Emily Clark");
INSERT INTO "TV_Channel" VALUES ("CH1", "Adventure Time");
INSERT INTO "TV_Channel" VALUES ("CH2", "Cartoon Network");
INSERT INTO "TV_Channel" VALUES ("CH3", "Nickelodeon");
INSERT INTO "TV_Channel" VALUES ("CH4", "Disney Channel");
INSERT INTO "TV_Channel" VALUES ("CH5", "PBS Kids");
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");