MongoDB
I am learning MongoDB trying to understand which tool I should pick for making Global Names about 10 times faster than now. I am going to try Elastic Search, MongoDB, and Hadoop and pick one of them.
This file is going to be my cheatsheet for Mongodb information.
General
db.help()
helper | JS |
---|---|
use dd | db.getSisterDB(“dd”) |
show dbs | db.getMongo.getDBs() |
show collections | db.getMongo.getCollectionNames() |
Shell mongo
action | method |
---|---|
drop db | db.dropDatabase() |
watch long event | db.currentOp() |
Queries
action | method |
---|---|
distinct | db.blog.distinct(“rating”) |