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,
"Language" 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 ("ANI", "Animax", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("NHK", "NHK", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("TF1", "TF1", "France", "French");
INSERT INTO "TV_Channel" VALUES ("M6", "M6", "France", "French");
INSERT INTO "TV_Channel" VALUES ("BBC", "BBC One", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("ITV", "ITV", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("ZDF", "ZDF", "Germany", "German");
INSERT INTO "Cartoon" VALUES ("1.0", "CN");
INSERT INTO "Cartoon" VALUES ("2.0", "DIS");
INSERT INTO "Cartoon" VALUES ("3.0", "NICK");
INSERT INTO "Cartoon" VALUES ("4.0", "ANI");
INSERT INTO "Cartoon" VALUES ("5.0", "NHK");
INSERT INTO "Cartoon" VALUES ("6.0", "TF1");
INSERT INTO "Cartoon" VALUES ("7.0", "M6");
INSERT INTO "Cartoon" VALUES ("8.0", "BBC");
INSERT INTO "Cartoon" VALUES ("9.0", "ITV");
INSERT INTO "Cartoon" VALUES ("10.0", "ZDF");
INSERT INTO "Cartoon" VALUES ("11.0", "CN");
INSERT INTO "Cartoon" VALUES ("12.0", "DIS");
INSERT INTO "Cartoon" VALUES ("13.0", "NICK");