More work on db.