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 ("France24", "France", "French");
INSERT INTO "TV_Channel" VALUES ("DW", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("NHK", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("CCTV", "China", "Mandarin");
INSERT INTO "TV_Channel" VALUES ("AlJazeera", "Qatar", "Arabic");
INSERT INTO "TV_Channel" VALUES ("RT", "Russia", "Russian");
INSERT INTO "TV_Channel" VALUES ("TVN", "Poland", "Polish");
INSERT INTO "TV_Channel" VALUES ("Rai", "Italy", "Italian");
INSERT INTO "TV_Channel" VALUES ("ZDF", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("TF1", "France", "French");
INSERT INTO "TV_Channel" VALUES ("ABC", "Australia", "English");
INSERT INTO "TV_Channel" VALUES ("Globo", "Brazil", "Portuguese");
INSERT INTO "TV_Channel" VALUES ("ZeeTV", "India", "Hindi");
INSERT INTO "Cartoon" VALUES ("1.0", "CNN");
INSERT INTO "Cartoon" VALUES ("2.0", "BBC");
INSERT INTO "Cartoon" VALUES ("3.0", "France24");
INSERT INTO "Cartoon" VALUES ("4.0", "DW");
INSERT INTO "Cartoon" VALUES ("5.0", "NHK");
INSERT INTO "Cartoon" VALUES ("6.0", "CCTV");
INSERT INTO "Cartoon" VALUES ("7.0", "AlJazeera");
INSERT INTO "Cartoon" VALUES ("8.0", "RT");
INSERT INTO "Cartoon" VALUES ("9.0", "TVN");
INSERT INTO "Cartoon" VALUES ("10.0", "Rai");
INSERT INTO "TV_series" VALUES ("101.0", "CNN");
INSERT INTO "TV_series" VALUES ("102.0", "BBC");
INSERT INTO "TV_series" VALUES ("103.0", "France24");
INSERT INTO "TV_series" VALUES ("104.0", "DW");
INSERT INTO "TV_series" VALUES ("105.0", "NHK");
INSERT INTO "TV_series" VALUES ("106.0", "CCTV");
INSERT INTO "TV_series" VALUES ("107.0", "AlJazeera");
INSERT INTO "TV_series" VALUES ("108.0", "RT");
INSERT INTO "TV_series" VALUES ("109.0", "TVN");
INSERT INTO "TV_series" VALUES ("110.0", "Rai");
INSERT INTO "TV_series" VALUES ("111.0", "ZDF");
INSERT INTO "TV_series" VALUES ("112.0", "TF1");
INSERT INTO "TV_series" VALUES ("113.0", "ABC");
INSERT INTO "TV_series" VALUES ("114.0", "Globo");
INSERT INTO "TV_series" VALUES ("115.0", "ZeeTV");