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,
"Country" TEXT,
"Language" 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 ("CNN", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("BBC", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("ZDF", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("TF1", "France", "French");
INSERT INTO "TV_Channel" VALUES ("Rai1", "Italy", "Italian");
INSERT INTO "TV_Channel" VALUES ("NHK", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("CCTV", "China", "Mandarin");
INSERT INTO "TV_Channel" VALUES ("TVN", "Poland", "Polish");
INSERT INTO "TV_Channel" VALUES ("Antena3", "Spain", "Spanish");
INSERT INTO "TV_Channel" VALUES ("Globo", "Brazil", "Portuguese");
INSERT INTO "TV_Channel" VALUES ("AlJazeera", "Qatar", "Arabic");
INSERT INTO "TV_Channel" VALUES ("TRT", "Turkey", "Turkish");
INSERT INTO "TV_Channel" VALUES ("KBS", "South Korea", "Korean");
INSERT INTO "TV_Channel" VALUES ("RTL", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("France2", "France", "French");
INSERT INTO "TV_Channel" VALUES ("Mediaset", "Italy", "Italian");
INSERT INTO "TV_Channel" VALUES ("TVP", "Poland", "Polish");
INSERT INTO "TV_Channel" VALUES ("La1", "Spain", "Spanish");
INSERT INTO "TV_Channel" VALUES ("SBT", "Brazil", "Portuguese");
INSERT INTO "TV_Channel" VALUES ("MBC", "UAE", "Arabic");
INSERT INTO "TV_Channel" VALUES ("ShowTV", "Turkey", "Turkish");
INSERT INTO "TV_Channel" VALUES ("SBS", "South Korea", "Korean");
INSERT INTO "TV_Channel" VALUES ("Fox", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("ITV", "UK", "English");
INSERT INTO "Cartoon" VALUES ("101", "CNN");
INSERT INTO "Cartoon" VALUES ("102", "BBC");
INSERT INTO "Cartoon" VALUES ("103", "ZDF");
INSERT INTO "Cartoon" VALUES ("104", "TF1");
INSERT INTO "Cartoon" VALUES ("105", "Rai1");
INSERT INTO "Cartoon" VALUES ("106", "NHK");
INSERT INTO "Cartoon" VALUES ("107", "CCTV");
INSERT INTO "Cartoon" VALUES ("108", "TVN");
INSERT INTO "Cartoon" VALUES ("109", "Antena3");
INSERT INTO "Cartoon" VALUES ("110", "Globo");
INSERT INTO "Cartoon" VALUES ("111", "AlJazeera");
INSERT INTO "Cartoon" VALUES ("112", "TRT");
INSERT INTO "Cartoon" VALUES ("113", "KBS");
INSERT INTO "TV_series" VALUES ("201", "CNN");
INSERT INTO "TV_series" VALUES ("202", "BBC");
INSERT INTO "TV_series" VALUES ("203", "ZDF");
INSERT INTO "TV_series" VALUES ("204", "TF1");
INSERT INTO "TV_series" VALUES ("205", "Rai1");
INSERT INTO "TV_series" VALUES ("206", "NHK");
INSERT INTO "TV_series" VALUES ("207", "CCTV");
INSERT INTO "TV_series" VALUES ("208", "TVN");
INSERT INTO "TV_series" VALUES ("209", "Antena3");
INSERT INTO "TV_series" VALUES ("210", "Globo");
INSERT INTO "TV_series" VALUES ("211", "AlJazeera");
INSERT INTO "TV_series" VALUES ("212", "TRT");
INSERT INTO "TV_series" VALUES ("213", "KBS");