Initial commit of database provider, need refactoring