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,
"Written_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", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("2", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("3", "Anna Smith");
INSERT INTO "Cartoon" VALUES ("4", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("5", "Michael Lee");
INSERT INTO "Cartoon" VALUES ("6", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("7", "Anna Smith");
INSERT INTO "Cartoon" VALUES ("8", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("9", "David Brown");
INSERT INTO "Cartoon" VALUES ("10", "Joseph Kuhr");
INSERT INTO "TV_Channel" VALUES ("C1", "Adventure Time");
INSERT INTO "TV_Channel" VALUES ("C2", "Cartoon Network");
INSERT INTO "TV_Channel" VALUES ("C3", "Nickelodeon");
INSERT INTO "TV_Channel" VALUES ("C4", "Disney Channel");
INSERT INTO "TV_Channel" VALUES ("C5", "PBS Kids");
INSERT INTO "TV_series" VALUES ("101", "C1");
INSERT INTO "TV_series" VALUES ("102", "C2");
INSERT INTO "TV_series" VALUES ("103", "C3");
INSERT INTO "TV_series" VALUES ("104", "C4");
INSERT INTO "TV_series" VALUES ("105", "C5");
INSERT INTO "TV_series" VALUES ("106", "C1");
INSERT INTO "TV_series" VALUES ("107", "C2");
INSERT INTO "TV_series" VALUES ("108", "C3");
INSERT INTO "TV_series" VALUES ("109", "C4");
INSERT INTO "TV_series" VALUES ("110", "C5");