The NoSQL movement
In the last months there has been a plenty of activity in the non relational (NoSQL) database world.
NoSQL database tries to solve 3 main RDBMS problems:
- Scalability, for example the ability to automatically partitioning data across multiple machines
- Performance, in some case RDBMS can be very slow
- Fixed schema: RDBMS have nice goodness (referential integrity, relationships, triggers…) but force you to store any object to a fixed schema (migrations are a pain!)
Basically there are several different kinds of NoSQL database:
- Key/Value (Scalaris, Tokio Cabinet, Voldemort): store data in key/value pairs: very efficient for performance and higly scalable, but difficult to query and to implement real world problems
- Tabular (Cassandra, HBase, Hypertable, Google BigTable): store data in tabular structures, but columns may vary in time and each row may have only a subset of the columns
- Document Oriented (CouchDb, MongoDb, Riak, Amazon SimpleDb): like Key/Value but they let you nest more values for a key. This is a nice paradigm for programmers as it becomes easy, specially with script languages (Python, Ruby, PHP…), to implement a one to one mapping relation between the code objects and the objects (documents) in the database
- Graph (Neo4J, InfoGrid, AllegroGraph): stores objects and relationships in nodes and edges of a graph. For situations that fit this model, like hierarchical data, this solution can be much much faster than the other ones
MongoDb is a document oriented NoSQL database. With such a database it is very easy to map the programming objects (documents) we want to store to the database. JSON is a very viable standard to do this mapping, and so MongoDb does: it stores JSON documents in the database.
To makes performance better JSON is stored by MongoDb in a efficient binary format called BSON. BSON is a binary serialization of JSON-like documents and stands for Binary JSON.
For getting more information on the topic I highly recommend reading this interesting article: NoSQL Ecosystem