CS357: Database Systems Implementation
Homework Assignment 10


Given: Wednesday, 16 April
Due Date: Monday, 28 April



Do Exercise 18.11 and 19.9(a) of the text.  These exercises have you modify the SimpleDB version of SQL so that it understands range variables.  Section 4.3.1 of the text explains range variables in detail.  Not only does it explain the syntax, but it also shows how range variables can be implemented using the rename operator of relational algebra.

Your code should work with any mixture of range variables and non-range variables.  For example, the following query returns the name and major of everyone having the same graduation year as Joe:

select s2.SName, dname
from STUDENT s1, DEPT, STUDENT s2
where s1.GradYear = s2.GradYear
and s1.SName = 'joe'
and s2.MajorId = DId

Standard SQL has a wrinkle that you do not have to implement.  If a table is not defined with an explicit range variable, it allows you to use the table name as the "default" range variable.  You don't have to implement this.

This code depends on a working version of RenamePlan and RenameScan from HW7.  If you need a copy of my code, email me.

As this is the final assignment of the semester, I'm not telling you what you need to do.  Please submit a piece of paper that describes what you did, and what design decisions you made.  Also submit a printout of any files you created or modified.  Modifications must be explicitly indicated, so that I can easily tell what you did.