Added db interfaces

And back to 78% coverage