-- !preview conn=db
--               ^^ requires object to be created beforehand

-- Create Table Schema for Grades

CREATE TABLE Grades (
   student_id INTEGER,
   course_id TEXT,
   grade TEXT,
   FOREIGN KEY (student_id) REFERENCES Students(id),
   FOREIGN KEY (course_id) REFERENCES Courses(course_id),
   PRIMARY KEY (student_id, course_id)
);

