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,
"Directed_by" TEXT,
"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,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);





INSERT INTO "TV_Channel" VALUES ("C1", "USA", "English");
INSERT INTO "TV_Channel" VALUES ("C2", "Canada", "English");
INSERT INTO "TV_Channel" VALUES ("C3", "UK", "English");
INSERT INTO "TV_Channel" VALUES ("C4", "France", "French");
INSERT INTO "TV_Channel" VALUES ("C5", "Japan", "Japanese");
INSERT INTO "TV_Channel" VALUES ("C6", "Germany", "German");
INSERT INTO "Cartoon" VALUES ("101", "Alice Johnson", "Todd Casey", "C1");
INSERT INTO "Cartoon" VALUES ("102", "Bob Smith", "Mary Lee", "C2");
INSERT INTO "Cartoon" VALUES ("103", "Carol White", "Todd Casey", "C3");
INSERT INTO "Cartoon" VALUES ("104", "David Black", "John Doe", "C4");
INSERT INTO "Cartoon" VALUES ("105", "Eve Green", "Anna Bell", "C5");
INSERT INTO "Cartoon" VALUES ("106", "Frank Blue", "Todd Casey", "C1");
INSERT INTO "Cartoon" VALUES ("107", "Grace Red", "Mary Lee", "C6");
INSERT INTO "TV_series" VALUES ("201", "C1");
INSERT INTO "TV_series" VALUES ("202", "C2");
INSERT INTO "TV_series" VALUES ("203", "C3");
INSERT INTO "TV_series" VALUES ("204", "C4");
INSERT INTO "TV_series" VALUES ("205", "C5");
INSERT INTO "TV_series" VALUES ("206", "C6");