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 ("CN", "Cartoon Network");
INSERT INTO "TV_Channel" VALUES ("DIS", "Disney Channel");
INSERT INTO "TV_Channel" VALUES ("NICK", "Nickelodeon");
INSERT INTO "TV_Channel" VALUES ("WB", "Warner Bros. Kids");
INSERT INTO "TV_Channel" VALUES ("PBS", "PBS Kids");
INSERT INTO "TV_Channel" VALUES ("FOX", "Fox Kids");
INSERT INTO "Cartoon" VALUES ("101", "Dexters Laboratory", "Genndy Tartakovsky", "CN");
INSERT INTO "Cartoon" VALUES ("102", "Powerpuff Girls", "Craig McCracken", "CN");
INSERT INTO "Cartoon" VALUES ("103", "Ben 10", "Man of Action", "CN");
INSERT INTO "Cartoon" VALUES ("104", "Kim Possible", "Steve Loter", "DIS");
INSERT INTO "Cartoon" VALUES ("105", "Phineas and Ferb", "Dan Povenmire", "DIS");
INSERT INTO "Cartoon" VALUES ("106", "SpongeBob SquarePants", "Stephen Hillenburg", "NICK");
INSERT INTO "Cartoon" VALUES ("107", "Fairly OddParents", "Butch Hartman", "NICK");
INSERT INTO "Cartoon" VALUES ("108", "Looney Tunes", "Chuck Jones", "WB");
INSERT INTO "Cartoon" VALUES ("109", "Scooby-Doo", "William Hanna", "WB");
INSERT INTO "Cartoon" VALUES ("110", "Arthur", "Greg Bailey", "PBS");
INSERT INTO "Cartoon" VALUES ("111", "The Simpsons", "Matt Groening", "FOX");
INSERT INTO "Cartoon" VALUES ("112", "Teen Titans", "Ben Jones", "WB");
INSERT INTO "Cartoon" VALUES ("113", "Justice League", "Ben Jones", "CN");
INSERT INTO "Cartoon" VALUES ("114", "Static Shock", "Ben Jones", "WB");
INSERT INTO "Cartoon" VALUES ("115", "Recess", "Paul Germain", "DIS");
INSERT INTO "Cartoon" VALUES ("116", "Hey Arnold!", "Craig Bartlett", "NICK");
INSERT INTO "Cartoon" VALUES ("117", "Fosters Home for Imaginary Friends", "Craig McCracken", "CN");
INSERT INTO "Cartoon" VALUES ("118", "X-Men: Evolution", "Boyd Kirkland", "WB");
INSERT INTO "Cartoon" VALUES ("119", "The Batman", "Duane Capizzi", "WB");
INSERT INTO "Cartoon" VALUES ("120", "Danny Phantom", "Butch Hartman", "NICK");
INSERT INTO "TV_series" VALUES ("201", "CN");
INSERT INTO "TV_series" VALUES ("202", "DIS");
INSERT INTO "TV_series" VALUES ("203", "NICK");
INSERT INTO "TV_series" VALUES ("204", "WB");
INSERT INTO "TV_series" VALUES ("205", "PBS");
INSERT INTO "TV_series" VALUES ("206", "FOX");
INSERT INTO "TV_series" VALUES ("207", "CN");
INSERT INTO "TV_series" VALUES ("208", "DIS");