chapter 4 (db creation and migration)