CSC343H1 Lecture 10: CSC343 2012-April EXAM
Document Summary
Do not turn this page until you have received the signal to start. In the meantime, please ll in the identi cation section above and read the instructions below. In the sql questions, you are welcome to use views. Comments are not required, although they may help us mark your answers. There is a blank page at the end for rough work. marked, indicate that clearly there, as well as in the question itself. We used the schema below many times in lecture. A course"s cname attribute gives its full name, such as. Introduction to databases , while it"s cid is a value like csc343 . The wr attribute indicates whether or not the course satis es a writing requirement. Integrity constraints: students(sid, surname, campus, o erings[cid] courses[cid, courses(cid, cname, wr, took[sid] students[sid, o erings(oid, cid, term, instructor, took[oid] o erings[oid, took(sid, oid, grade) The following sql can be input into postgresql without errors.