Various Notes on Project #1. 1. select ... from tab1 tab2 ... Looks at EVERY pair of rows, one from tab1 and one from tab2. If tab1 has N rows and tab2 has M, this is N x M pairs. 2. The pattern /\*.*\*/ (in String form "/\\*.*\\*/") matches too much. It matches ALL of /* foo */ load bar ; /* baz */ for example, rather than just the first comment. You want to use .*? (the "reluctant quantifier") instead of .* (the "greedy quantifier"). X* matches as many X's as it can, while X*? matches as few as it can get away with (and have the rest of the input match). 3. I recommend against inp.useDelimiter (";"); to read entire commands. Literals can contain ;'s, and this will cause confusion. The project was designed to allow you to use just .next() and .hasNext() with the default delimiters, with a little special-casing for comments and literals. So use .hasNext(patn) to detect when you have a comment or literal next, and otherwise just use .next (). To get an entire command, then, you use do a bunch of .next()'s (special-casing the literals, since they can contain blanks), until you get a ";". To read a literal once you see that it's coming up with hasNext, people have either 1. Read the next token (which starts with "'"), 2. If the that token does not contain the closing "'", then a. Change the delimiter to "'", b. Read the next token, c. Change the delimiter back. d. Check that the token after that is a "'" e. Concatenate the pieces into a literal. OR (easier) 1. Use findWithinHorizon to match ' followed by any number of characters other than "'", ",", "\n", or "\r", followed by an optional "'" (optional for the case where the user left off the closing "'"). 4. You don't need to write "[\\s]"; plain "\\s" is equivalent. Likewise, you can just use ";" for "[;]", since ; is not a special character in patterns. 5. Beware: .startsWith, .endsWith, and .equals do NOT take patterns; they match literal strings. 6. A number of people have had this problem for the same reason: > When i run "gmake check" I do not pass any tests. > But, if I run "java db61b < testing/test1.in" I get the same output as > test1.out. The reason is that you have hard-wired in the directory "testing" in your load command. You require that all database files ever used go into a directory called "testing", which is a bit odd. To test things as 'gmake check' does, 1. Change to the subdirectory testing (cd testing). 2. Run Java with java -classpath .. db61b You can also use gjdb in the same way: 1. Change to the subdirectory testing (cd testing) in your Emacs shell. 2. Start gjdb from there, and when it prompts you with the "Run gjdb (like this) " line, enter gjdb -classpath db61b instead of gjdb db61b 7. The message Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. probably means that you wrote, e.g., ArrayList instead of ArrayList. Change the line in your Makefile that reads javac -g $< to javac -g -Xlint:unchecked $< to see where you've made this error.