Chapter 4, and some rails flavored sql stuff