mongo db connection and some db interface methods