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", "United States", "English");
INSERT INTO "TV_Channel" VALUES ("C2", "United Kingdom", "English");
INSERT INTO "TV_Channel" VALUES ("C3", "Canada", "English");
INSERT INTO "TV_Channel" VALUES ("C4", "France", "French");
INSERT INTO "TV_Channel" VALUES ("C5", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("C6", "Australia", "English");
INSERT INTO "TV_Channel" VALUES ("C7", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("C8", "India", "Hindi");
INSERT INTO "TV_Channel" VALUES ("C9", "Mexico", "Spanish");
INSERT INTO "TV_Channel" VALUES ("C10", "South Africa", "English");
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", "C7");
INSERT INTO "Cartoon" VALUES ("106", "C10");
INSERT INTO "TV_series" VALUES ("201", "C1");
INSERT INTO "TV_series" VALUES ("202", "C3");
INSERT INTO "TV_series" VALUES ("203", "C5");
INSERT INTO "TV_series" VALUES ("204", "C6");
INSERT INTO "TV_series" VALUES ("205", "C8");
INSERT INTO "TV_series" VALUES ("206", "C10");
INSERT INTO "TV_series" VALUES ("207", "C2");
INSERT INTO "TV_series" VALUES ("208", "C9");