Throwing database-related "messy" code into Database (cont)