Non-Graded Exercises/Examples
This page provides exercises and examples for you to try. Since
you'll learn the most in this class by doing rather than
watching, I urge you to try as many of these as possible.
As an incentive, each exam will have at least one question that is
isomorphic (i.e., same form, but possibly different variable names) to
a question in the homework, tutorials, clicker questions, or practice
exercises.
The exercise/examples here take one of two forms: 1. sample questions
and answers or 2. suggested questions from the book. You can find a
solution set to most of the odd numbered exercises here. All suggested questions from the book have
at least partial answers in the above PDF file.
Practice Exams
Questions on transactions and database crash/recovery are no longer part of this course and are now covered in CPSC 404 instead.
- Old Sample Midterm 1s:
- Sample Midterms from terms with only one midterm:
- Old Sample Midterm 2s:
- Sample Final
Database Background (Chapter 1)
Recommended questions from the book:
Database Design (Chapters 2 & 3)
Normal Forms and Functional Dependencies
Recommended exercises from the book. Where the question
calls for decomposition into 3NF, try this as well, but the book will
not provide solutions for this case.
- 19.1
- 19.3
- 19.5
- 19.7: For (c) ignore when it says there's no lossless BCNF decomposition
- this refers to the dependencies that 3NF would keep that BCNF would
not.
- 19.13 - for part 1, ignore the multi-valued dependency part of the question
Additional sample questions and
answers
Formal Relational Languages -
(Relational Algebra)
SQL
The practice movie, sailor, and student data set from class along with instructions
on how to use it can be found here
Datalog
- Suggested exercises from the book:
- 24.1 parts 1, 3, 4, 5, 7 (answers since they're not in the back of
the book. Note that I don't care about the
syntax of the times.)
- For more sample questions + solutions see the tutorial page.
XML
- Suggested exercises from the book:
- 7.1 (part 4 only)
- 27.7 parts 1 and 2 only. Note: there's no answer in the back of
the book for this. Feel free to post to Connect or send e-mail if you'd like your answer
looked over.