Show databases


In [1]:
show dbs


learn      0.440GB
local      0.000GB
meta       0.004GB
px         4.118GB
rna        1.062GB
test       0.000GB

Choose database


In [2]:
use test


switched to db test

Insert


In [6]:
db.hoge.insert({'foo': 'bar'})


WriteResult({ "nInserted" : 1 })

Query


In [7]:
db.hoge.find()


{ "_id" : ObjectId("586aa4e95fa469152d0454d9"), "foo" : "bar" }