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", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("4", "Joseph Kuhr and Anna Smith");
INSERT INTO "Cartoon" VALUES ("5", "Anna Smith and Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("6", "Anna Smith");
INSERT INTO "Cartoon" VALUES ("7", "Joseph Kuhr Jr.");
INSERT INTO "Cartoon" VALUES ("8", "Jo Kuhr");
INSERT INTO "Cartoon" VALUES ("9", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("10", "Michael Brown");
INSERT INTO "Cartoon" VALUES ("11", "NULL");
INSERT INTO "Cartoon" VALUES ("12", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("13", "Joseph Kuhr and Michael Brown");
INSERT INTO "Cartoon" VALUES ("14", "Michael Brown and Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("15", "Anna Smith");
INSERT INTO "Cartoon" VALUES ("16", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("17", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("18", "Anna Smith");
INSERT INTO "Cartoon" VALUES ("19", "Joseph Kuhr");
INSERT INTO "Cartoon" VALUES ("20", "Joseph Kuhr and Joseph Kuhr Jr.");