More work on db abstract