MonoDB is a NoSQL (Not Only SQL) document style database with a query engine to view the stored data.
About MongoDB
- Mongo have a database, which are similar to Oracle schemas
- A database have one or more collections, which are similar to tables in RDBMS
- A Collection can have one or more documents, which are similar to rows in RDBMS
- A document is made up of one or more fields, which are similar to columns in RDBMS
- You can create indexes like RDBMS for fast query performance
- Query results are stored in cursors
- MongoDB have query selector which are similar to where clause in SQL of RDBMS, these selectors are JSON objects
- Update statement takes two argument first selector and then $set value
- No joins can be used like SQL as this database is document style
- Arrays are supported as well as embedded documents
- De-normalization model is most common model
When to use MongoDB
- Schema-less database is required
- Writes: You can send write command and it writes without wait, so if faster write is required
- Journaling: You can control the write behavior
- Durability: Mongo have self healing cluster environment with minimal or no DBA required
- Full Text Search
- Geospatial: Mongo allows you to store x and y co-ordinates with document and then you can use find to find near by or with in circle documents
- Tools and Maturity: this is relatively new database compare to RDBMS however it is widely used and good community support
- Data Processing: Can be done using Map Reduce. It also has some basic aggregation