In the last article mongodb query operation detailed method, recently someone private chat ME, want to roughly understand the difference between mysql and mongodb operation, this detailed start two in the concept and operation of the difference.

A comparison of terms and concepts is shown below:

The following is an example:

For example, MYSQL has a table named people.

MongoDB has a collection called People that contains documentation for the following archetypes:

{

_id: ObjectId(“509a8fb2f3f4948bd2f983a0”),

user_id: “abc123”,

age: 55,

status: ‘A’

}

DDL (Data Definition Language) comparison

Insert Record statement comparison:

Update Comparison of record changes:

Delete Comparison of delete statements:

Select query statement comparison: