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

CREATE TABLE "TV_series" (
"id" FLOAT,
"Episode" TEXT,
PRIMARY KEY ("id")
);





INSERT INTO "TV_Channel" VALUES ("CN", "Cartoon Network");
INSERT INTO "TV_Channel" VALUES ("DIS", "Disney Channel");
INSERT INTO "TV_Channel" VALUES ("NIC", "Nickelodeon");
INSERT INTO "TV_Channel" VALUES ("WB", "Warner Bros. Animation");
INSERT INTO "TV_Channel" VALUES ("FOX", "Fox Kids");
INSERT INTO "Cartoon" VALUES ("1.0", "Adventure Time", "Pendleton Ward", "CN");
INSERT INTO "Cartoon" VALUES ("2.0", "Regular Show", "J.G. Quintel", "CN");
INSERT INTO "Cartoon" VALUES ("3.0", "Gravity Falls", "Alex Hirsch", "DIS");
INSERT INTO "Cartoon" VALUES ("4.0", "SpongeBob SquarePants", "Stephen Hillenburg", "NIC");
INSERT INTO "Cartoon" VALUES ("5.0", "The Amazing World of Gumball", "Ben Bocquelet", "CN");
INSERT INTO "Cartoon" VALUES ("6.0", "Phineas and Ferb", "Dan Povenmire", "DIS");
INSERT INTO "Cartoon" VALUES ("7.0", "Teen Titans Go!", "Michael Jelenic", "WB");
INSERT INTO "Cartoon" VALUES ("8.0", "Dexters Laboratory", "Genndy Tartakovsky", "CN");
INSERT INTO "Cartoon" VALUES ("9.0", "Samurai Jack", "Genndy Tartakovsky", "CN");
INSERT INTO "Cartoon" VALUES ("10.0", "Kim Possible", "Mark McCorkle", "DIS");
INSERT INTO "Cartoon" VALUES ("11.0", "Fairly OddParents", "Butch Hartman", "NIC");
INSERT INTO "Cartoon" VALUES ("12.0", "Batman: The Animated Series", "Bruce Timm", "WB");
INSERT INTO "Cartoon" VALUES ("13.0", "The Simpsons", "Matt Groening", "FOX");
INSERT INTO "Cartoon" VALUES ("14.0", "Futurama", "Matt Groening", "FOX");
INSERT INTO "Cartoon" VALUES ("15.0", "Steven Universe", "Rebecca Sugar", "CN");
INSERT INTO "Cartoon" VALUES ("16.0", "Over the Garden Wall", "Patrick McHale", "CN");
INSERT INTO "Cartoon" VALUES ("17.0", "Star vs. the Forces of Evil", "Daron Nefcy", "DIS");
INSERT INTO "Cartoon" VALUES ("18.0", "Danny Phantom", "Butch Hartman", "NIC");
INSERT INTO "Cartoon" VALUES ("19.0", "Justice League", "Bruce Timm", "WB");
INSERT INTO "Cartoon" VALUES ("20.0", "Rick and Morty", "Justin Roiland", "CN");
INSERT INTO "TV_series" VALUES ("1.0", "Slumber Party Panic");
INSERT INTO "TV_series" VALUES ("2.0", "The Power");
INSERT INTO "TV_series" VALUES ("3.0", "Tourist Trapped");
INSERT INTO "TV_series" VALUES ("4.0", "Help Wanted");
INSERT INTO "TV_series" VALUES ("5.0", "The Responsible");
INSERT INTO "TV_series" VALUES ("6.0", "Rollercoaster");
INSERT INTO "TV_series" VALUES ("7.0", "Legendary Sandwich");
INSERT INTO "TV_series" VALUES ("8.0", "Dexters Rude Removal");
INSERT INTO "TV_series" VALUES ("9.0", "The Beginning");
INSERT INTO "TV_series" VALUES ("10.0", "Crush");
INSERT INTO "TV_series" VALUES ("11.0", "The Big Problem");
INSERT INTO "TV_series" VALUES ("12.0", "On Leather Wings");
INSERT INTO "TV_series" VALUES ("13.0", "Simpsons Roasting on an Open Fire");
INSERT INTO "TV_series" VALUES ("14.0", "Space Pilot 3000");
INSERT INTO "TV_series" VALUES ("15.0", "Gem Glow");
INSERT INTO "TV_series" VALUES ("16.0", "The Old Grist Mill");
INSERT INTO "TV_series" VALUES ("17.0", "Star Comes to Earth");
INSERT INTO "TV_series" VALUES ("18.0", "Mystery Meat");
INSERT INTO "TV_series" VALUES ("19.0", "Secret Origins");
INSERT INTO "TV_series" VALUES ("20.0", "Pilot");