/* Remove tables if they are already here */

CREATE TABLE Courses (
cid CHAR(20), 
name CHAR(20), 
credits FLOAT,
PRIMARY KEY (cid)
);

CREATE TABLE Enrolled (
sid INT,
cid CHAR(20),
grade CHAR(2),
PRIMARY KEY (sid,cid),
FOREIGN KEY (sid) REFERENCES Students,
FOREIGN KEY (cid) REFERENCES Courses
);

INSERT INTO Courses VALUES ("CS 133","Databases",3); 
INSERT INTO Courses VALUES ("CS 60","Principles of Computer Science",3); 
INSERT INTO Courses VALUES ("CS 105","Introduction to Systems",3); 
INSERT INTO Courses VALUES ("CS 121","Software Engineering",3); 

INSERT INTO Enrolled VALUES (45,"CS 133","A"); 
INSERT INTO Enrolled VALUES (67,"CS 133","A");
INSERT INTO Enrolled VALUES (78,"CS 133","B"); 
INSERT INTO Enrolled VALUES (42,"CS 133","B-");
INSERT INTO Enrolled VALUES (67,"CS 60","B+");
INSERT INTO Enrolled VALUES (45,"CS 105","A"); 


