Copy over from branch mongoDB

Contains also the other database adapter.