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,
"Title" TEXT,
PRIMARY KEY ("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 "Cartoon" VALUES ("1", "Adventure Time");
INSERT INTO "Cartoon" VALUES ("2", "Rick and Morty");
INSERT INTO "Cartoon" VALUES ("3", "The Simpsons");
INSERT INTO "Cartoon" VALUES ("4", "Peppa Pig");
INSERT INTO "Cartoon" VALUES ("5", "Naruto");
INSERT INTO "TV_Channel" VALUES ("CH001", "English");
INSERT INTO "TV_Channel" VALUES ("CH002", "Spanish");
INSERT INTO "TV_Channel" VALUES ("CH003", "English");
INSERT INTO "TV_Channel" VALUES ("CH004", "French");
INSERT INTO "TV_Channel" VALUES ("CH005", "English");
INSERT INTO "TV_Channel" VALUES ("CH006", "German");
INSERT INTO "TV_Channel" VALUES ("CH007", "English");
INSERT INTO "TV_Channel" VALUES ("CH008", "Japanese");
INSERT INTO "TV_Channel" VALUES ("CH009", "English");
INSERT INTO "TV_Channel" VALUES ("CH010", "Chinese");
INSERT INTO "TV_series" VALUES ("101", "2023-01-15", "CH001");
INSERT INTO "TV_series" VALUES ("102", "2023-02-20", "CH002");
INSERT INTO "TV_series" VALUES ("103", "2023-03-10", "CH003");
INSERT INTO "TV_series" VALUES ("104", "2023-04-05", "CH004");
INSERT INTO "TV_series" VALUES ("105", "2023-05-12", "CH005");
INSERT INTO "TV_series" VALUES ("106", "2023-06-18", "CH006");
INSERT INTO "TV_series" VALUES ("107", "2023-07-22", "CH007");
INSERT INTO "TV_series" VALUES ("108", "2023-08-30", "CH008");
INSERT INTO "TV_series" VALUES ("109", "2023-09-14", "CH009");
INSERT INTO "TV_series" VALUES ("110", "2023-10-01", "CH010");