implementing database provider