Database connectivity with mongodb