CSE 344: Exam Information
Midterm
Logistics:
- The midterm will be in class (in the usual room, MGH 389) on Wednesday,
February 12, 2025 from 9:30am to 10:20am.
- You may bring one sheet of notes (8.5x11 inches or A4 or smaller, double
sided) in any format (handwritten, typed, printed tablet notes, etc.).
- Bring your Husky card, as we may check it.
Content:
- The midterm will cover material from the first four topics of the
course, including material covered in lecture, in section, and on the
homework.
- Since relational algebra was discussed in class during topic 4, but not
covered on Homework 4, we would only ask very simple questions about
relational algebra. For example, we may ask a question that could be
answered if you attended class or reviewed the lecture recording or slides.
- Tricky things you should probably know how to do:
- How to use joins when the condition is not just equality between attributes
- How to use outer joins
- How
NULL
behaves in expressions, in WHERE
clauses, and in aggregate functions
- How to compute "argmax" in SQL (ie, how to find not just the maximum
value, but find the tuple that maximizes that value)
- Be sure you know at least one way to do this that also works if you
want to find all tuples that achieve the maximum value.
- How to translate predicate-logic-like statements into SQL (exists is easy,
for-all is hard)
- How to translate everything we know in SQL (join, group-by, aggregation, and
subqueries) into Java (not necessarily efficient Java)
- Things not on the midterm: E-R design, functional dependencies,
normalization, BCNF.
Tips:
- The best way to prepare for the midterm is to do the homework, and review any
deductions you received.
- Most questions on the midterm will involve reading and/or writing SQL. You do
not need to memorize all possible operators and functions we have mentioned,
but you should practice translating English descriptions into SQL and vice
versa, as well as SQL to Java.
- If you want more practice problems writing SQL, consider
sql-practice.com. (Content warning: all the
questions involve fake medical data.) You can also practice reading SQL by
reading the solutions.
Final
More information about the final exam will be released later in the quarter.