Fill in DB pseudo code