Commit b44d39dd authored by Donald H. (Donnie) Pinkston, III's avatar Donald H. (Donnie) Pinkston, III
Browse files

Design docs, new exception for HW2

This commit includes the HW2 design document and logistics document.

It also includes the InvalidSQLException to throw when a SQL query has
a semantic error.
parent ceec8c9f
No related merge requests found
Showing with 149 additions and 0 deletions
+149 -0
CS122 Assignment 2 - SQL Translation and Joins - Design Document
================================================================
Fill in answers for all questions based on your team's work on Assignment 2.
A: Simple Planner
------------------
A1. Without going into the details of how you handle grouping and
aggregation or joins, list the general sequence of steps that your
planner's makePlan() method follows to translate a SQL query into
an execution plan.
A2. Does your planner try to simplify plans in specific circumstances,
e.g. when a "trivial project" is used (i.e. "SELECT * FROM ...") in
your planner? Briefly enumerate all simplifications and optimizations
your planner employs.
A3. Describe how you generate the execution-plan fragment for the query's
FromClause. Make sure to touch on what you do in the three cases your
planner is expected to handle - tables, subqueries in the FROM clause,
and joins.
A4. Describe how you implemented support for grouping and aggregation.
Be sure to note any variations from the approach outlined in class,
if there are any.
B: Nested-Loop Join
--------------------
B1. The join algorithm stated in class is really only suitable for
materialized evaluation, where the entire result is generated by the
algorithm. It is completely unsuitable for pipelined evaluation,
where results are generated row by row.
Summarize how your implementation works for inner joins, using
pseudocode to show how rows are considered and returned as the
algorithm executes, and what state must be saved so that the
operation can resume at the appropriate place when the next row
must be returned.
B2. What tweaks did you need to introduce into the implementation for
left outer joins? Keep your answer brief, but please also be specific.
B3. Enumerate your nested-loop join test cases, following this form:
* <test-case class name>.<test function>
<brief one-sentence description of what the test exercises>
C: Extra Credit [OPTIONAL]
---------------------------
If you implemented any extra-credit tasks for this assignment, describe
them here. The description should be like this, with stuff in "<>" replaced.
(The value i starts at 1 and increments...)
D<i>: <one-line description>
<brief summary of what you did, including the specific classes that
we should look at for your implementation>
<brief summary of test-cases that demonstrate/exercise your extra work>
E: Feedback [OPTIONAL]
-----------------------
WE NEED YOUR FEEDBACK! Thoughtful and constructive input will help us to
improve future versions of the course. These questions are OPTIONAL, and
your answers will not affect your grade in any way (including if you hate
everything about the assignment and databases in general, or Donnie and/or
the TAs in particular). Feel free to answer as many or as few of them as
you wish.
E1. What parts of the assignment were most time-consuming? Why?
E2. Did you find any parts of the assignment particularly instructive?
Correspondingly, did any parts feel like unnecessary busy-work?
E3. Did you particularly enjoy any parts of the assignment? Were there
any parts that you particularly disliked?
E4. Were there any critical details that you wish had been provided with the
assignment, that we should consider including in subsequent versions of
the assignment?
E5. Do you have any other suggestions for how future versions of the
assignment can be improved?
CS122 Assignment 2 - SQL Translation and Joins - Logistics
==========================================================
Please completely fill out this document so that we know who participated on
the assignment, any late extensions received, and how much time the assignment
took for your team. Thank you!
L1. List your team name and the people who worked on this assignment.
<team name>
<name>
<name>
...
L2. Specify the tag and commit-hash of the Git commit you are submitting for
your assignment. (You can list the hashes of all tags with the command
"git show-ref --tags".)
Tag: <tag>
Commit hash: <hash>
L3. Specify how many late tokens you are applying to this assignment, if any.
Similarly, if your team received an extension from Donnie then please
indicate how many days extension you received. You may leave this blank
if it is not relevant to this submission.
<tokens / extension>
L4. For each teammate, briefly describe what parts of the assignment each
teammate focused on, along with the total hours spent on the assignment.
package edu.caltech.nanodb.queryeval;
import edu.caltech.nanodb.server.NanoDBException;
/**
* This exception is used to signal when a SQL query contains a semantic error
* that prevents its evaluation. For example, an expression like
* "<tt>MAX(AVG(a))</tt>" is invalid and cannot be evaluated.
*/
public class InvalidSQLException extends NanoDBException {
public InvalidSQLException() {
super();
}
public InvalidSQLException(String msg) {
super(msg);
}
public InvalidSQLException(Throwable cause) {
super(cause);
}
public InvalidSQLException(String msg, Throwable cause) {
super(msg, cause);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment