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,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);

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

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





INSERT INTO "TV_Channel" VALUES ("CN", "Cartoon Network", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("DIS", "Disney Channel", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("NICK", "Nickelodeon", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("WB", "Warner Bros. Kids", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("JP_ANI", "Japan Anime", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("FR_KID", "France Kids", "France", "French");
INSERT INTO "Cartoon" VALUES ("1.0", "The Rise of the Blue Beetle!", "CN");
INSERT INTO "Cartoon" VALUES ("2.0", "SpongeBob SquarePants", "NICK");
INSERT INTO "Cartoon" VALUES ("3.0", "Gravity Falls", "DIS");
INSERT INTO "Cartoon" VALUES ("4.0", "Looney Tunes", "WB");
INSERT INTO "Cartoon" VALUES ("5.0", "Dragon Ball Z", "JP_ANI");
INSERT INTO "Cartoon" VALUES ("6.0", "Miraculous Ladybug", "FR_KID");
INSERT INTO "Cartoon" VALUES ("7.0", "Teen Titans Go!", "CN");
INSERT INTO "Cartoon" VALUES ("8.0", "The Amazing World of Gumball", "CN");
INSERT INTO "Cartoon" VALUES ("9.0", "Phineas and Ferb", "DIS");
INSERT INTO "TV_series" VALUES ("1.0", "Episode 1");
INSERT INTO "TV_series" VALUES ("2.0", "Episode 2");
INSERT INTO "TV_series" VALUES ("3.0", "Episode 3");
INSERT INTO "TV_series" VALUES ("4.0", "Episode 4");
INSERT INTO "TV_series" VALUES ("5.0", "Episode 5");
INSERT INTO "TV_series" VALUES ("6.0", "Episode 6");
INSERT INTO "TV_series" VALUES ("7.0", "Episode 7");
INSERT INTO "TV_series" VALUES ("8.0", "Episode 8");
INSERT INTO "TV_series" VALUES ("9.0", "Episode 9");