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 ("SKY_RADIO_UK", "Sky Radio", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("BBC_KIDS", "BBC Kids", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("CARTOON_NET", "Cartoon Network", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("DISNEY_JR", "Disney Junior", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("NICK_JR", "Nick Jr.", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("SKY_RADIO_DE", "Sky Radio", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("FRANCE_TV", "France TV", "France", "French");
INSERT INTO "Cartoon" VALUES ("1.0", "Peppa Pig", "BBC_KIDS");
INSERT INTO "Cartoon" VALUES ("2.0", "Paw Patrol", "NICK_JR");
INSERT INTO "Cartoon" VALUES ("3.0", "Mickey Mouse Clubhouse", "DISNEY_JR");
INSERT INTO "Cartoon" VALUES ("4.0", "Tom and Jerry", "CARTOON_NET");
INSERT INTO "Cartoon" VALUES ("5.0", "SpongeBob SquarePants", "NICK_JR");
INSERT INTO "Cartoon" VALUES ("6.0", "The Amazing World of Gumball", "CARTOON_NET");
INSERT INTO "Cartoon" VALUES ("7.0", "Bob the Builder", "SKY_RADIO_UK");
INSERT INTO "Cartoon" VALUES ("8.0", "Fireman Sam", "SKY_RADIO_UK");
INSERT INTO "Cartoon" VALUES ("9.0", "Ben and Hollys Little Kingdom", "SKY_RADIO_UK");
INSERT INTO "Cartoon" VALUES ("10.0", "Shaun the Sheep", "SKY_RADIO_DE");
INSERT INTO "Cartoon" VALUES ("11.0", "Trotro", "FRANCE_TV");
INSERT INTO "TV_series" VALUES ("1.0", "The New Toy");
INSERT INTO "TV_series" VALUES ("2.0", "Pups Save a Friend");
INSERT INTO "TV_series" VALUES ("3.0", "Mickeys Great Clubhouse Hunt");
INSERT INTO "TV_series" VALUES ("4.0", "The Cat Concerto");
INSERT INTO "TV_series" VALUES ("5.0", "Pizza Delivery");
INSERT INTO "TV_series" VALUES ("6.0", "The Responsible");
INSERT INTO "TV_series" VALUES ("7.0", "Bobs Big Plan");
INSERT INTO "TV_series" VALUES ("8.0", "The Great Fire of Pontypandy");
INSERT INTO "TV_series" VALUES ("9.0", "The Royal Fairy Picnic");
INSERT INTO "TV_series" VALUES ("10.0", "Off the Baa!");
INSERT INTO "TV_series" VALUES ("11.0", "Trotro and the Rain");