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





INSERT INTO "TV_Channel" VALUES ("CH1", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("CH2", "Canada", "English");
INSERT INTO "TV_Channel" VALUES ("CH3", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("CH4", "France", "French");
INSERT INTO "TV_Channel" VALUES ("CH5", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("CH6", "Germany", "German");
INSERT INTO "TV_Channel" VALUES ("CH7", "Australia", "English");
INSERT INTO "TV_Channel" VALUES ("CH8", "Mexico", "Spanish");
INSERT INTO "TV_Channel" VALUES ("CH9", "India", "Hindi");
INSERT INTO "TV_Channel" VALUES ("CH10", "Brazil", "Portuguese");
INSERT INTO "Cartoon" VALUES ("101", "Todd Casey", "CH1");
INSERT INTO "Cartoon" VALUES ("102", "Todd Casey", "CH3");
INSERT INTO "Cartoon" VALUES ("103", "Alice Monroe", "CH2");
INSERT INTO "Cartoon" VALUES ("104", "Todd Casey", "CH7");
INSERT INTO "Cartoon" VALUES ("105", "John Smith", "CH4");
INSERT INTO "Cartoon" VALUES ("106", "Todd Casey", "CH9");
INSERT INTO "Cartoon" VALUES ("107", "Mary Johnson", "CH5");
INSERT INTO "Cartoon" VALUES ("108", "Todd Casey", "CH8");
INSERT INTO "Cartoon" VALUES ("109", "Todd Casey", "CH10");
INSERT INTO "Cartoon" VALUES ("110", "Alice Monroe", "CH6");
INSERT INTO "TV_series" VALUES ("201", "2023-01-15");
INSERT INTO "TV_series" VALUES ("202", "2022-05-20");
INSERT INTO "TV_series" VALUES ("203", "2021-11-30");
INSERT INTO "TV_series" VALUES ("204", "2020-07-10");
INSERT INTO "TV_series" VALUES ("205", "2019-03-25");
INSERT INTO "TV_series" VALUES ("206", "2018-12-05");
INSERT INTO "TV_series" VALUES ("207", "2017-08-14");
INSERT INTO "TV_series" VALUES ("208", "2016-04-22");
INSERT INTO "TV_series" VALUES ("209", "2015-09-17");
INSERT INTO "TV_series" VALUES ("210", "2014-02-28");