Note of MongoDB

Concept

Structure:

Database -> Collection -> Documents

Compare to Mysql:

  • Collection VS. Table
  • Document VS. Row
  • Field VS. Column

Collection is not strict about what goes in it

Operations

Databases

Collections

Documents

Insert

insert document with bring an extra Field named _id, it’s unique

Query

Update

Delete

Projection

What is Projection

projection in mongodb means selecting necessary data rather than selecting whole of the data of a document

Sort, Skip, Limit

Indexing

Aggregation

What is Aggregation

aggreation operation group multiple documents fields together, return computed results

Mongo Aggregation

Backup && Restore

4 thoughts on “Note of MongoDB”

Leave a Reply

Your email address will not be published. Required fields are marked *