DB integration part 1

new classes added
DB integration part 2

changes in DB providers and classes. May cause code to fail in
compilation.