Adds interface for DbInstance to inherit

for better testability