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,
"Language" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "TV_series" (
"id" FLOAT,
"Rating" TEXT,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);





INSERT INTO "TV_Channel" VALUES ("C1", "English");
INSERT INTO "TV_Channel" VALUES ("C2", "Spanish");
INSERT INTO "TV_Channel" VALUES ("C3", "French");
INSERT INTO "TV_Channel" VALUES ("C4", "German");
INSERT INTO "TV_Channel" VALUES ("C5", "English");
INSERT INTO "TV_Channel" VALUES ("C6", "Spanish");
INSERT INTO "TV_Channel" VALUES ("C7", "Italian");
INSERT INTO "TV_Channel" VALUES ("C8", "Italian");
INSERT INTO "TV_Channel" VALUES ("C9", "Russian");
INSERT INTO "TV_Channel" VALUES ("C10", "Russian");
INSERT INTO "TV_Channel" VALUES ("C11", "Japanese");
INSERT INTO "TV_Channel" VALUES ("C12", "Japanese");
INSERT INTO "TV_Channel" VALUES ("C13", "Japanese");
INSERT INTO "TV_Channel" VALUES ("C14", "Korean");
INSERT INTO "Cartoon" VALUES ("1", "C1");
INSERT INTO "Cartoon" VALUES ("2", "C2");
INSERT INTO "Cartoon" VALUES ("3", "C3");
INSERT INTO "Cartoon" VALUES ("4", "C4");
INSERT INTO "Cartoon" VALUES ("5", "C5");
INSERT INTO "Cartoon" VALUES ("6", "C6");
INSERT INTO "Cartoon" VALUES ("7", "C7");
INSERT INTO "Cartoon" VALUES ("8", "C8");
INSERT INTO "Cartoon" VALUES ("9", "C9");
INSERT INTO "Cartoon" VALUES ("10", "C10");
INSERT INTO "Cartoon" VALUES ("11", "C11");
INSERT INTO "Cartoon" VALUES ("12", "C12");
INSERT INTO "Cartoon" VALUES ("13", "C13");
INSERT INTO "Cartoon" VALUES ("14", "C14");
INSERT INTO "TV_series" VALUES ("101", "8.5", "C1");
INSERT INTO "TV_series" VALUES ("102", "7.2", "C2");
INSERT INTO "TV_series" VALUES ("103", "9.0", "C3");
INSERT INTO "TV_series" VALUES ("104", "6.8", "C4");
INSERT INTO "TV_series" VALUES ("105", "8.1", "C5");
INSERT INTO "TV_series" VALUES ("106", "7.5", "C6");
INSERT INTO "TV_series" VALUES ("107", "8.3", "C7");
INSERT INTO "TV_series" VALUES ("108", "7.9", "C8");
INSERT INTO "TV_series" VALUES ("109", "8.7", "C9");
INSERT INTO "TV_series" VALUES ("110", "7.4", "C10");
INSERT INTO "TV_series" VALUES ("111", "9.1", "C11");
INSERT INTO "TV_series" VALUES ("112", "8.8", "C12");
INSERT INTO "TV_series" VALUES ("113", "9.3", "C13");
INSERT INTO "TV_series" VALUES ("114", "7.0", "C14");