some more work on db support