MongoDB stores data as BSON documents (binary represenatation of JSON) in collections. MongoDB databases hold collections of documents.

// mongoDB 查询示例,其使用的是自己专有的查询语言

db.inventory.find( {} )

db.inventory.find( { status: "D" } )

db.inventory.find( { size: { h: 14, w: 21, uom: "cm" } } )

db.inventory.find( { "size.uom": "in" } )

db.inventory.find( { tags: "red" } )

db.inventory.find( { tags: ["red", "blank"] } )