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

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

CREATE TABLE "TV_series" (
"id" FLOAT,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);





INSERT INTO "TV_Channel" VALUES ("Cartoon Network", "Adventure Time", "USA");
INSERT INTO "TV_Channel" VALUES ("Disney Channel", "Phineas and Ferb", "USA");
INSERT INTO "TV_Channel" VALUES ("Nickelodeon", "SpongeBob SquarePants", "USA");
INSERT INTO "TV_Channel" VALUES ("Boomerang", "Tom and Jerry", "USA");
INSERT INTO "TV_Channel" VALUES ("Discovery Kids", "WordGirl", "USA");
INSERT INTO "TV_Channel" VALUES ("PBS Kids", "Arthur", "USA");
INSERT INTO "TV_Channel" VALUES ("Teletoon", "Total Drama Island", "Canada");
INSERT INTO "TV_Channel" VALUES ("YTV", "Spliced!", "Canada");
INSERT INTO "TV_Channel" VALUES ("CBBC", "Shaun the Sheep", "UK");
INSERT INTO "TV_Channel" VALUES ("CITV", "Thunderbirds Are Go", "UK");
INSERT INTO "Cartoon" VALUES ("1", "Cartoon Network");
INSERT INTO "Cartoon" VALUES ("2", "Cartoon Network");
INSERT INTO "Cartoon" VALUES ("3", "Cartoon Network");
INSERT INTO "Cartoon" VALUES ("4", "Disney Channel");
INSERT INTO "Cartoon" VALUES ("5", "Disney Channel");
INSERT INTO "Cartoon" VALUES ("6", "Nickelodeon");
INSERT INTO "Cartoon" VALUES ("7", "Nickelodeon");
INSERT INTO "Cartoon" VALUES ("8", "Nickelodeon");
INSERT INTO "Cartoon" VALUES ("9", "Nickelodeon");
INSERT INTO "Cartoon" VALUES ("10", "Boomerang");
INSERT INTO "Cartoon" VALUES ("11", "Discovery Kids");
INSERT INTO "Cartoon" VALUES ("12", "PBS Kids");
INSERT INTO "Cartoon" VALUES ("13", "Teletoon");
INSERT INTO "Cartoon" VALUES ("14", "Teletoon");
INSERT INTO "Cartoon" VALUES ("15", "YTV");
INSERT INTO "Cartoon" VALUES ("16", "CBBC");
INSERT INTO "Cartoon" VALUES ("17", "CITV");
INSERT INTO "TV_series" VALUES ("101", "Cartoon Network");
INSERT INTO "TV_series" VALUES ("102", "Cartoon Network");
INSERT INTO "TV_series" VALUES ("103", "Disney Channel");
INSERT INTO "TV_series" VALUES ("104", "Nickelodeon");
INSERT INTO "TV_series" VALUES ("105", "Nickelodeon");
INSERT INTO "TV_series" VALUES ("106", "Nickelodeon");
INSERT INTO "TV_series" VALUES ("107", "Boomerang");
INSERT INTO "TV_series" VALUES ("108", "Discovery Kids");
INSERT INTO "TV_series" VALUES ("109", "PBS Kids");
INSERT INTO "TV_series" VALUES ("110", "Teletoon");
INSERT INTO "TV_series" VALUES ("111", "YTV");
INSERT INTO "TV_series" VALUES ("112", "CBBC");
INSERT INTO "TV_series" VALUES ("113", "CITV");
INSERT INTO "TV_series" VALUES ("114", "Cartoon Network");
INSERT INTO "TV_series" VALUES ("115", "Nickelodeon");