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 ("101", "Alice Smith");
INSERT INTO "teacher" VALUES ("102", "Bob Johnson");
INSERT INTO "teacher" VALUES ("103", "Charlie Brown");
INSERT INTO "teacher" VALUES ("104", "Diana Prince");
INSERT INTO "teacher" VALUES ("105", "Eve Adams");
INSERT INTO "teacher" VALUES ("106", "Frank White");
INSERT INTO "teacher" VALUES ("107", "Grace Lee");
INSERT INTO "course_arrange" VALUES ("1", "101", "10");
INSERT INTO "course_arrange" VALUES ("2", "102", "11");
INSERT INTO "course_arrange" VALUES ("3", "103", "12");
INSERT INTO "course_arrange" VALUES ("4", "101", "11");
INSERT INTO "course_arrange" VALUES ("5", "104", "10");
INSERT INTO "course_arrange" VALUES ("6", "105", "12");
INSERT INTO "course_arrange" VALUES ("7", "102", "10");
INSERT INTO "course_arrange" VALUES ("8", "106", "11");
INSERT INTO "course_arrange" VALUES ("9", "107", "12");
INSERT INTO "course_arrange" VALUES ("10", "103", "10");