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")
);

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





INSERT INTO "course" VALUES ("1", "Mathematics");
INSERT INTO "course" VALUES ("2", "Physics");
INSERT INTO "course" VALUES ("3", "Chemistry");
INSERT INTO "course" VALUES ("4", "Biology");
INSERT INTO "course" VALUES ("5", "History");
INSERT INTO "teacher" VALUES ("1", "Alice Johnson", "32", "New York");
INSERT INTO "teacher" VALUES ("2", "Bob Smith", "33", "Los Angeles");
INSERT INTO "teacher" VALUES ("3", "Charlie Lee", "31", "Chicago");
INSERT INTO "teacher" VALUES ("4", "Diana King", "34", "Houston");
INSERT INTO "teacher" VALUES ("5", "Evan Davis", "32", "Phoenix");
INSERT INTO "teacher" VALUES ("6", "Fiona Clark", "29", "Philadelphia");
INSERT INTO "teacher" VALUES ("7", "George Hall", "33", "San Antonio");
INSERT INTO "teacher" VALUES ("8", "Hannah Scott", "35", "San Diego");
INSERT INTO "course_arrange" VALUES ("1", "1", "10");
INSERT INTO "course_arrange" VALUES ("2", "2", "11");
INSERT INTO "course_arrange" VALUES ("3", "3", "10");
INSERT INTO "course_arrange" VALUES ("4", "4", "12");
INSERT INTO "course_arrange" VALUES ("5", "5", "11");
INSERT INTO "course_arrange" VALUES ("1", "6", "12");
INSERT INTO "course_arrange" VALUES ("2", "7", "10");
INSERT INTO "course_arrange" VALUES ("3", "8", "11");