further work on db support