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 ("ch1", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("ch2", "France", "French");
INSERT INTO "TV_Channel" VALUES ("ch3", "Canada", "English");
INSERT INTO "TV_Channel" VALUES ("ch4", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("ch5", "Belgium", "French");
INSERT INTO "TV_Channel" VALUES ("ch6", "Switzerland", "German");
INSERT INTO "TV_Channel" VALUES ("ch7", "Spain", "Spanish");
INSERT INTO "TV_Channel" VALUES ("ch8", "Mexico", "Spanish");
INSERT INTO "TV_Channel" VALUES ("ch9", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("ch10", "USA", "Spanish");
INSERT INTO "Cartoon" VALUES ("101", "ch1");
INSERT INTO "Cartoon" VALUES ("102", "ch2");
INSERT INTO "Cartoon" VALUES ("103", "ch3");
INSERT INTO "Cartoon" VALUES ("104", "ch4");
INSERT INTO "Cartoon" VALUES ("105", "ch5");
INSERT INTO "Cartoon" VALUES ("106", "ch6");
INSERT INTO "Cartoon" VALUES ("107", "ch7");
INSERT INTO "Cartoon" VALUES ("108", "ch8");
INSERT INTO "Cartoon" VALUES ("109", "ch9");
INSERT INTO "Cartoon" VALUES ("110", "ch10");
INSERT INTO "TV_series" VALUES ("201", "ch1");
INSERT INTO "TV_series" VALUES ("202", "ch2");
INSERT INTO "TV_series" VALUES ("203", "ch3");
INSERT INTO "TV_series" VALUES ("204", "ch4");
INSERT INTO "TV_series" VALUES ("205", "ch5");
INSERT INTO "TV_series" VALUES ("206", "ch6");
INSERT INTO "TV_series" VALUES ("207", "ch7");
INSERT INTO "TV_series" VALUES ("208", "ch8");
INSERT INTO "TV_series" VALUES ("209", "ch9");
INSERT INTO "TV_series" VALUES ("210", "ch10");