Mar 05: Review Weeks 1–7
Learning Objectives
After today's class, you should be able to:
- Summarize the types of questions that will be asked on the midterm.
- Practice writing and answering questions based on homeworks 1–6.
Announcements¶
- HW2–HW5 scores available on Gradescope
- HW6 solution available tomorrow at 8:00am
Lesson Outline¶
HW6 Q&A [15 min]
- Review of set operations
UNIONvsUNION ALL
- Review of subqueries
- Purpose of
DISTINCT
- Purpose of
JOIN ONvsJOIN USING
Review [15 min]
- See table below
- Reading highlights
Activity [45 min]
- Instructor: give feedback on HW2 and HW3
- Students: write exam questions & answers
- Each team assigned a row of the table below
- Your Q&A will be shared with the other class!
Midterm Outline¶
| Question | Points | Homework | Readings | Class Days |
|---|---|---|---|---|
| 1. Short answer | 10 | HW4 (create) | 1.1–1.5, 2.1–2.5 | Jan 18, Feb 13 |
| 2. Short answer | 10 | N/A | 3.8 | Feb 29 |
| 3. EER diagram | 15 | HW1 and HW2 | 4.1–4.6, 11.1–11.3 | Jan 23, Jan 25 |
| 4. Relational DB | 15 | HW3 (Workbench) | 4.7–4.9, 11.4–11.6 | Feb 01, Feb 08 |
| 5. INS/UPD/DEL | 12.5 | HW4 (modify) | 2.6–2.8, 2.9–2.12 | Feb 15, Jan 30 |
| 6. SELECT | 12.5 | HW5 (aggregation) | 3.1–3.3 | Feb 20 |
| 7. SELECT | 12.5 | HW6 (join/union) | 3.4–3.5 | Feb 22 |
| 8. SELECT | 12.5 | HW6 (subquery) | 3.6–3.7 | Feb 27 |
Clarifications:
- Question 3 will require Chen attribute ovals and Crow's foot connectors.
- Question 4 will just require arrows from PK to FK, with keys underlined.
- You will also need to write
PK,FK, andNOT NULLnext to columns.
- You will also need to write
- The only database we will use for Questions 5–7 queries will be
air.- We will provide you with the diagram (you don't need to memorize).
Not on the exam:
Your To-Do List¶
- Finish and submit Homework 6
- Study for the midterm exam