MongoDB

MongoDB is a document-oriented database. It stores documents as binary-encoded objects. Each document has a primary key (ID field) and can have up to 40 indexes on non-ID fields to support fast queries.

MongoDB get rid of references between data (NoSQL). Relations in MongoDB can be modeled by using embedded objects and arrays. Therefore, the data model is actually a tree structure.

               PhD

           /           \    

    Article          School

    /        \

Tag       Comment

If the data model cannot be transformed into a tree, it has to be demoralized or implement the join from client side.

Denormalization means data being replicated inside documents (redundancy), so the replicated parts shouldn't involve frequent updates.

The join on client side method involves extra computation and network traffic.

Queries to MongoDB uses JSON like syntax or a variant of MapReduce job.

to continue: