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,
"series_name" TEXT,
"Hight_definition_TV" TEXT,
"Package_Option" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "TV_series" (
"id" FLOAT,
"Rating" TEXT,
"Channel" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("Channel") REFERENCES "TV_Channel"("id")
);





INSERT INTO "TV_Channel" VALUES ("CH1", "Nature Wonders", "Yes", "Premium");
INSERT INTO "TV_Channel" VALUES ("CH2", "History Vault", "No", "Basic");
INSERT INTO "TV_Channel" VALUES ("CH3", "Sci-Fi Central", "Yes", "Standard");
INSERT INTO "TV_Channel" VALUES ("CH4", "Comedy Hub", "No", "Premium");
INSERT INTO "TV_Channel" VALUES ("CH5", "Kids Zone", "Yes", "Basic");
INSERT INTO "TV_Channel" VALUES ("CH6", "Drama World", "Yes", "Premium");
INSERT INTO "TV_Channel" VALUES ("CH7", "Sports Live", "No", "Standard");
INSERT INTO "Cartoon" VALUES ("101", "CH5");
INSERT INTO "Cartoon" VALUES ("102", "CH5");
INSERT INTO "Cartoon" VALUES ("103", "CH4");
INSERT INTO "Cartoon" VALUES ("104", "CH3");
INSERT INTO "Cartoon" VALUES ("105", "CH1");
INSERT INTO "TV_series" VALUES ("201", "8.5", "CH1");
INSERT INTO "TV_series" VALUES ("202", "7.0", "CH2");
INSERT INTO "TV_series" VALUES ("203", "9.0", "CH3");
INSERT INTO "TV_series" VALUES ("204", "6.5", "CH4");
INSERT INTO "TV_series" VALUES ("205", "8.0", "CH5");
INSERT INTO "TV_series" VALUES ("206", "7.5", "CH6");
INSERT INTO "TV_series" VALUES ("207", "8.2", "CH7");