More work on the DB interface.