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 ("SKY001", "Sky Radio", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("BBC002", "BBC One", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("CNN003", "CNN News", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("FRT004", "France 2", "France", "French");
INSERT INTO "TV_Channel" VALUES ("SKY005", "Sky Sports", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("SKY006", "Sky Radio", "Germany", "German");
INSERT INTO "Cartoon" VALUES ("1.0", "Tom and Jerry", "SKY001");
INSERT INTO "Cartoon" VALUES ("2.0", "Looney Tunes", "BBC002");
INSERT INTO "Cartoon" VALUES ("3.0", "Scooby Doo", "SKY001");
INSERT INTO "Cartoon" VALUES ("4.0", "The Flintstones", "CNN003");
INSERT INTO "Cartoon" VALUES ("5.0", "SpongeBob SquarePants", "SKY005");
INSERT INTO "Cartoon" VALUES ("6.0", "The Simpsons", "SKY001");
INSERT INTO "Cartoon" VALUES ("7.0", "Family Guy", "BBC002");
INSERT INTO "Cartoon" VALUES ("8.0", "Dora the Explorer", "FRT004");
INSERT INTO "Cartoon" VALUES ("9.0", "Paw Patrol", "SKY006");
INSERT INTO "Cartoon" VALUES ("10.0", "Peppa Pig", "SKY001");
INSERT INTO "TV_series" VALUES ("101.0", "Pilot Episode");
INSERT INTO "TV_series" VALUES ("102.0", "The Big Race");
INSERT INTO "TV_series" VALUES ("103.0", "Mystery of the Haunted House");
INSERT INTO "TV_series" VALUES ("104.0", "Stone Age Adventures");
INSERT INTO "TV_series" VALUES ("105.0", "Under the Sea");
INSERT INTO "TV_series" VALUES ("106.0", "Homer at Bat");
INSERT INTO "TV_series" VALUES ("107.0", "Road to Rhode Island");
INSERT INTO "TV_series" VALUES ("108.0", "Map Adventure");
INSERT INTO "TV_series" VALUES ("109.0", "Pups Save the Day");
INSERT INTO "TV_series" VALUES ("110.0", "Muddy Puddles");