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

CREATE TABLE "TV_Channel" (
"id" TEXT,
"series_name" TEXT,
PRIMARY KEY ("id")
);

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





INSERT INTO "Cartoon" VALUES ("1", "The Adventures of Tintin", "Steven Spielberg", "1991-03-01");
INSERT INTO "Cartoon" VALUES ("2", "Avatar: The Last Airbender", "Michael Dante DiMartino", "2005-02-21");
INSERT INTO "Cartoon" VALUES ("3", "Rick and Morty", "Dan Harmon", "2013-12-02");
INSERT INTO "Cartoon" VALUES ("4", "BoJack Horseman", "Raphael Bob-Waksberg", "2014-08-22");
INSERT INTO "Cartoon" VALUES ("5", "Gravity Falls", "Alex Hirsch", "2012-06-15");
INSERT INTO "Cartoon" VALUES ("6", "Adventure Time", "Pendleton Ward", "2010-04-05");
INSERT INTO "Cartoon" VALUES ("7", "Futurama", "Matt Groening", "1999-03-28");
INSERT INTO "Cartoon" VALUES ("8", "The Simpsons", "Matt Groening", "1989-12-17");
INSERT INTO "Cartoon" VALUES ("9", "South Park", "Trey Parker", "1997-08-13");
INSERT INTO "Cartoon" VALUES ("10", "Archer", "Adam Reed", "2009-09-17");
INSERT INTO "TV_Channel" VALUES ("C1", "The Adventures of Tintin");
INSERT INTO "TV_Channel" VALUES ("C2", "Avatar: The Last Airbender");
INSERT INTO "TV_Channel" VALUES ("C3", "Rick and Morty");
INSERT INTO "TV_Channel" VALUES ("C4", "BoJack Horseman");
INSERT INTO "TV_Channel" VALUES ("C5", "Gravity Falls");
INSERT INTO "TV_Channel" VALUES ("C6", "Adventure Time");
INSERT INTO "TV_Channel" VALUES ("C7", "Futurama");
INSERT INTO "TV_Channel" VALUES ("C8", "The Simpsons");
INSERT INTO "TV_Channel" VALUES ("C9", "South Park");
INSERT INTO "TV_Channel" VALUES ("C10", "Archer");
INSERT INTO "TV_series" VALUES ("101", "Episode 1", "1991-03-01");
INSERT INTO "TV_series" VALUES ("102", "Episode 2", "1991-03-08");
INSERT INTO "TV_series" VALUES ("201", "Episode 1", "2005-02-21");
INSERT INTO "TV_series" VALUES ("202", "Episode 2", "2005-02-28");
INSERT INTO "TV_series" VALUES ("301", "Episode 1", "2013-12-02");
INSERT INTO "TV_series" VALUES ("302", "Episode 2", "2013-12-09");
INSERT INTO "TV_series" VALUES ("401", "Episode 1", "2014-08-22");
INSERT INTO "TV_series" VALUES ("402", "Episode 2", "2014-08-29");
INSERT INTO "TV_series" VALUES ("501", "Episode 1", "2012-06-15");
INSERT INTO "TV_series" VALUES ("502", "Episode 2", "2012-06-22");
INSERT INTO "TV_series" VALUES ("601", "Episode 1", "2010-04-05");
INSERT INTO "TV_series" VALUES ("602", "Episode 2", "2010-04-12");
INSERT INTO "TV_series" VALUES ("701", "Episode 1", "1999-03-28");
INSERT INTO "TV_series" VALUES ("702", "Episode 2", "1999-04-04");
INSERT INTO "TV_series" VALUES ("801", "Episode 1", "1989-12-17");
INSERT INTO "TV_series" VALUES ("802", "Episode 2", "1990-01-07");
INSERT INTO "TV_series" VALUES ("901", "Episode 1", "1997-08-13");
INSERT INTO "TV_series" VALUES ("902", "Episode 2", "1997-08-20");
INSERT INTO "TV_series" VALUES ("1001", "Episode 1", "2009-09-17");
INSERT INTO "TV_series" VALUES ("1002", "Episode 2", "2009-09-24");