Wrestling with the database