①, CharacteristicsDocument database High performance high availability cluster document is a Bson object A collection is a set of related documents that share the same indexs②, how to useMONGO;//Enter MongoDB JavaScript interactionShow DBS; See which DBUse mydb; Switch to MyDBDB; //Current DB Show Collections; //See what collection var c = db.users.find (); //return cursor
③, Curdcall mode is Db.collection.action
Enquiry:The parameter for find () is JSON, and the operator is converted to the corresponding object representation, such as <18 {$gt: 18} Indicates that the operation words commonly used in a query are: $or $gt $lt $elemMatch $in $exists can use attribute symbols. Parses the performance of a query statement by referencing child elements or sub-attributes. Explain ()
Insert:Method One: The operation words commonly used in analogy Sql:insert are: $set $inc method Two: Specify the Save statement for _id
1 Db.inventory.save ({2 _id:10,3 Type: "Misc",4 Item: "Placard"5 })
Delete:
Analogy sql:
④, transaction processingDoes not provide API-level transaction processing, only through the business code level, in the document to add status, transaction and other fields to simulate transaction processing
⑤, Important API InterpretationUpdate () passes three parameters, first query condition, second action on field, third action Flagfind () pass in one or two parameters, first query condition, second filter which field, query condition supports regular