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

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





INSERT INTO "TV_Channel" VALUES ("C1", "USA");
INSERT INTO "TV_Channel" VALUES ("C2", "UK");
INSERT INTO "TV_Channel" VALUES ("C3", "Canada");
INSERT INTO "TV_Channel" VALUES ("C4", "Australia");
INSERT INTO "TV_Channel" VALUES ("C5", "Germany");
INSERT INTO "TV_series" VALUES ("101", "8.5", "5.2", "C1");
INSERT INTO "TV_series" VALUES ("102", "7.0", "3.8", "C1");
INSERT INTO "TV_series" VALUES ("103", "9.1", "6.5", "C2");
INSERT INTO "TV_series" VALUES ("104", "6.3", "2.1", "C2");
INSERT INTO "TV_series" VALUES ("105", "8.0", "4.0", "C3");
INSERT INTO "TV_series" VALUES ("106", "7.5", "3.5", "C3");
INSERT INTO "TV_series" VALUES ("107", "9.5", "7.0", "C4");
INSERT INTO "TV_series" VALUES ("108", "5.9", "1.8", "C4");
INSERT INTO "TV_series" VALUES ("109", "8.8", "5.0", "C5");
INSERT INTO "TV_series" VALUES ("110", "6.0", "2.0", "C5");