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

CREATE TABLE "TV_Channel" (
"id" TEXT UNIQUE,
"series_name" TEXT,
"Package_Option" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "TV_series" (
"id" FLOAT,
"Episode" TEXT,
"Air_Date" TEXT,
PRIMARY KEY ("id")
);





INSERT INTO "TV_Channel" VALUES ("C1", "Nature Wonders", "Basic");
INSERT INTO "TV_Channel" VALUES ("C2", "Kids Fun", "Premium");
INSERT INTO "TV_Channel" VALUES ("C3", "Cartoon World", "Standard");
INSERT INTO "TV_Channel" VALUES ("C4", "History Channel", "Basic");
INSERT INTO "TV_Channel" VALUES ("C5", "Empty Channel", "Premium");
INSERT INTO "TV_Channel" VALUES ("C6", "Mixed Cartoons", "Standard");
INSERT INTO "TV_Channel" VALUES ("C7", "No Cartoons", "Basic");
INSERT INTO "Cartoon" VALUES ("101", "Ben Jones", "C2");
INSERT INTO "Cartoon" VALUES ("102", "Ben Jones", "C3");
INSERT INTO "Cartoon" VALUES ("103", "Alice Smith", "C3");
INSERT INTO "Cartoon" VALUES ("104", "John Doe", "C1");
INSERT INTO "Cartoon" VALUES ("105", "Ben Jones", "C6");
INSERT INTO "Cartoon" VALUES ("106", "Mary Jane", "C6");
INSERT INTO "Cartoon" VALUES ("107", "Tom Lee", "C4");