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_arrange" (
"Course_ID" INT,
"Teacher_ID" INT,
"Grade" INT,
PRIMARY KEY ("Course_ID", "Teacher_ID", "Grade"),
FOREIGN KEY ("Teacher_ID") REFERENCES "teacher"("Teacher_ID")
);

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





INSERT INTO "teacher" VALUES ("1", "Alice Smith");
INSERT INTO "teacher" VALUES ("2", "Bob Johnson");
INSERT INTO "teacher" VALUES ("3", "Charlie Brown");
INSERT INTO "teacher" VALUES ("4", "Diana Prince");
INSERT INTO "teacher" VALUES ("5", "Eve Adams");
INSERT INTO "teacher" VALUES ("6", "Frank White");
INSERT INTO "teacher" VALUES ("7", "Grace Lee");
INSERT INTO "teacher" VALUES ("8", "Henry Green");
INSERT INTO "teacher" VALUES ("9", "Ivy King");
INSERT INTO "teacher" VALUES ("10", "Jack Black");
INSERT INTO "course_arrange" VALUES ("101", "1", "9");
INSERT INTO "course_arrange" VALUES ("102", "2", "10");
INSERT INTO "course_arrange" VALUES ("103", "3", "8");
INSERT INTO "course_arrange" VALUES ("104", "4", "9");
INSERT INTO "course_arrange" VALUES ("105", "5", "7");
INSERT INTO "course_arrange" VALUES ("106", "1", "10");
INSERT INTO "course_arrange" VALUES ("107", "2", "9");
INSERT INTO "course_arrange" VALUES ("108", "3", "10");
INSERT INTO "course_arrange" VALUES ("109", "6", "8");
INSERT INTO "course_arrange" VALUES ("110", "7", "9");
INSERT INTO "course_arrange" VALUES ("111", "8", "7");
INSERT INTO "course_arrange" VALUES ("112", "9", "10");
INSERT INTO "course_arrange" VALUES ("113", "10", "9");
INSERT INTO "course_arrange" VALUES ("114", "4", "8");
INSERT INTO "course_arrange" VALUES ("115", "5", "9");