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 "course" (
"Course_ID" INT,
"Course" TEXT,
PRIMARY KEY ("Course_ID")
);

CREATE TABLE "course_arrange" (
"Course_ID" INT,
"Teacher_ID" INT,
"Grade" INT,
PRIMARY KEY ("Course_ID", "Teacher_ID", "Grade"),
FOREIGN KEY ("Course_ID") REFERENCES "course"("Course_ID")
);

CREATE TABLE "teacher" (
"Teacher_ID" INT UNIQUE,
"Hometown" TEXT,
PRIMARY KEY ("Teacher_ID")
);





INSERT INTO "teacher" VALUES ("1", "Springfield");
INSERT INTO "teacher" VALUES ("2", "Shelbyville");
INSERT INTO "teacher" VALUES ("3", "Springfield");
INSERT INTO "teacher" VALUES ("4", "Ogdenville");
INSERT INTO "teacher" VALUES ("5", "North Haverbrook");
INSERT INTO "teacher" VALUES ("6", "Springfield");
INSERT INTO "teacher" VALUES ("7", "Shelbyville");
INSERT INTO "teacher" VALUES ("8", "Capital City");
INSERT INTO "teacher" VALUES ("9", "Ogdenville");
INSERT INTO "teacher" VALUES ("10", "North Haverbrook");
INSERT INTO "teacher" VALUES ("11", "Springfield");
INSERT INTO "teacher" VALUES ("12", "Capital City");
INSERT INTO "teacher" VALUES ("13", "Springfield");
INSERT INTO "teacher" VALUES ("14", "Shelbyville");
INSERT INTO "teacher" VALUES ("15", "Ogdenville");
INSERT INTO "teacher" VALUES ("16", "North Haverbrook");
INSERT INTO "teacher" VALUES ("17", "Capital City");
INSERT INTO "teacher" VALUES ("18", "Springfield");
INSERT INTO "teacher" VALUES ("19", "Shelbyville");
INSERT INTO "teacher" VALUES ("20", "Ogdenville");
INSERT INTO "teacher" VALUES ("21", "North Haverbrook");
INSERT INTO "teacher" VALUES ("22", "Capital City");
INSERT INTO "teacher" VALUES ("23", "Springfield");
INSERT INTO "teacher" VALUES ("24", "Shelbyville");
INSERT INTO "teacher" VALUES ("25", "Ogdenville");
INSERT INTO "teacher" VALUES ("26", "North Haverbrook");
INSERT INTO "teacher" VALUES ("27", "Capital City");
INSERT INTO "teacher" VALUES ("28", "Springfield");
INSERT INTO "teacher" VALUES ("29", "Shelbyville");
INSERT INTO "teacher" VALUES ("30", "Ogdenville");
INSERT INTO "teacher" VALUES ("31", "North Haverbrook");
INSERT INTO "teacher" VALUES ("32", "Capital City");
INSERT INTO "teacher" VALUES ("33", "Springfield");
INSERT INTO "teacher" VALUES ("34", "Shelbyville");
INSERT INTO "teacher" VALUES ("35", "Ogdenville");
INSERT INTO "teacher" VALUES ("36", "North Haverbrook");
INSERT INTO "teacher" VALUES ("37", "Capital City");
INSERT INTO "teacher" VALUES ("38", "Springfield");
INSERT INTO "teacher" VALUES ("39", "Shelbyville");
INSERT INTO "teacher" VALUES ("40", "Ogdenville");
INSERT INTO "teacher" VALUES ("41", "North Haverbrook");
INSERT INTO "teacher" VALUES ("42", "Capital City");
INSERT INTO "teacher" VALUES ("43", "Springfield");
INSERT INTO "teacher" VALUES ("44", "Shelbyville");
INSERT INTO "teacher" VALUES ("45", "Ogdenville");
INSERT INTO "teacher" VALUES ("46", "North Haverbrook");
INSERT INTO "teacher" VALUES ("47", "Capital City");
INSERT INTO "teacher" VALUES ("48", "Springfield");
INSERT INTO "teacher" VALUES ("49", "Shelbyville");
INSERT INTO "teacher" VALUES ("50", "Ogdenville");