Db updates

Tools updates to the db layer interface.