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,
"Air_Date" 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", "Japanese");
INSERT INTO "TV_Channel" VALUES ("C6", "English");
INSERT INTO "TV_Channel" VALUES ("C7", "Spanish");
INSERT INTO "TV_Channel" VALUES ("C8", "French");
INSERT INTO "TV_Channel" VALUES ("C9", "English");
INSERT INTO "TV_Channel" VALUES ("C10", "Italian");
INSERT INTO "Cartoon" VALUES ("101", "C1");
INSERT INTO "Cartoon" VALUES ("102", "C2");
INSERT INTO "Cartoon" VALUES ("103", "C3");
INSERT INTO "Cartoon" VALUES ("104", "C4");
INSERT INTO "Cartoon" VALUES ("105", "C5");
INSERT INTO "Cartoon" VALUES ("106", "C6");
INSERT INTO "Cartoon" VALUES ("107", "C7");
INSERT INTO "Cartoon" VALUES ("108", "C8");
INSERT INTO "Cartoon" VALUES ("109", "C9");
INSERT INTO "Cartoon" VALUES ("110", "C10");
INSERT INTO "TV_series" VALUES ("201", "2023-01-01", "C1");
INSERT INTO "TV_series" VALUES ("202", "2023-02-15", "C2");
INSERT INTO "TV_series" VALUES ("203", "2023-03-10", "C3");
INSERT INTO "TV_series" VALUES ("204", "2023-04-20", "C4");
INSERT INTO "TV_series" VALUES ("205", "2023-05-05", "C5");
INSERT INTO "TV_series" VALUES ("206", "2023-06-15", "C6");
INSERT INTO "TV_series" VALUES ("207", "2023-07-25", "C7");
INSERT INTO "TV_series" VALUES ("208", "2023-08-30", "C8");
INSERT INTO "TV_series" VALUES ("209", "2023-09-10", "C9");
INSERT INTO "TV_series" VALUES ("210", "2023-10-20", "C10");
INSERT INTO "TV_series" VALUES ("211", "2023-11-15", "C1");
INSERT INTO "TV_series" VALUES ("212", "2023-12-01", "C2");