Homework 2 for Database Systems