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,
"Content" TEXT,
"Package_Option" 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 ("SKY001", "Sky Radio", "Music", "Basic");
INSERT INTO "TV_Channel" VALUES ("SKY002", "Sky Radio", "News", "Premium");
INSERT INTO "TV_Channel" VALUES ("BBC001", "BBC One", "Drama", "Standard");
INSERT INTO "TV_Channel" VALUES ("CNN001", "CNN News", "News", "Basic");
INSERT INTO "TV_Channel" VALUES ("DIS001", "Discovery Channel", "Documentary", "Premium");
INSERT INTO "TV_Channel" VALUES ("CAR001", "Cartoon Network", "Animation", "Kids");
INSERT INTO "TV_Channel" VALUES ("SKY003", "Sky Sports", "Sports", "Sports Pack");
INSERT INTO "TV_Channel" VALUES ("HBO001", "HBO", "Movies", "Premium");
INSERT INTO "Cartoon" VALUES ("101.0", "CAR001");
INSERT INTO "Cartoon" VALUES ("102.0", "CAR001");
INSERT INTO "Cartoon" VALUES ("103.0", "CAR001");
INSERT INTO "TV_series" VALUES ("201.0", "SKY001");
INSERT INTO "TV_series" VALUES ("202.0", "SKY002");
INSERT INTO "TV_series" VALUES ("203.0", "BBC001");
INSERT INTO "TV_series" VALUES ("204.0", "CNN001");
INSERT INTO "TV_series" VALUES ("205.0", "DIS001");
INSERT INTO "TV_series" VALUES ("206.0", "SKY001");
INSERT INTO "TV_series" VALUES ("207.0", "HBO001");