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 ("C1", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("C2", "USA", "Spanish");
INSERT INTO "TV_Channel" VALUES ("C3", "USA", "French");
INSERT INTO "TV_Channel" VALUES ("C4", "Canada", "English");
INSERT INTO "TV_Channel" VALUES ("C5", "Canada", "French");
INSERT INTO "TV_Channel" VALUES ("C6", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("C7", "UK", "Welsh");
INSERT INTO "TV_Channel" VALUES ("C8", "France", "French");
INSERT INTO "TV_Channel" VALUES ("C9", "France", "English");
INSERT INTO "TV_Channel" VALUES ("C10", "Germany", "German");
INSERT INTO "Cartoon" VALUES ("101", "C1");
INSERT INTO "Cartoon" VALUES ("102", "C2");
INSERT INTO "Cartoon" VALUES ("103", "C4");
INSERT INTO "Cartoon" VALUES ("104", "C6");
INSERT INTO "Cartoon" VALUES ("105", "C8");
INSERT INTO "Cartoon" VALUES ("106", "C3");
INSERT INTO "Cartoon" VALUES ("107", "C7");
INSERT INTO "TV_series" VALUES ("201", "C1");
INSERT INTO "TV_series" VALUES ("202", "C2");
INSERT INTO "TV_series" VALUES ("203", "C3");
INSERT INTO "TV_series" VALUES ("204", "C4");
INSERT INTO "TV_series" VALUES ("205", "C5");
INSERT INTO "TV_series" VALUES ("206", "C6");
INSERT INTO "TV_series" VALUES ("207", "C7");
INSERT INTO "TV_series" VALUES ("208", "C8");
INSERT INTO "TV_series" VALUES ("209", "C9");
INSERT INTO "TV_series" VALUES ("210", "C10");