Wojciech Sznapka
13.05.2011
MongoDB document oriented databaseDoes NoSQL make sense?
Agenda
NoSQL definition and solutions,
MongoDB description and feautres,
MongoDB usage,
Who uses it?
Schema-free,
Some live examples,
Does NoSQL make sense?
NoSQL
Its a class of database management systems, the alternative for
relational databases (RDBM). Sometimes people call they next
generation databases,
NoSQL databases havent got schema like relational systems, theres
no table joining and have good scalling facilities.
NoSQL solutions
Document oriented:
MongoDB
Apache CouchDB
Key Value storage:
Big Table (Google App Engine)
Dynamo (Amazon Web Services)
Apache Cassandra (Facebook)
Project Voldemort (LinkedIn)
MongoDB
Document Oriented stores JSON documetns ,
Very efficient (written in C++),
High scallable,
Schema-free high flexibility,
Supports many software platform and has plenty programming language
drivers (PHP, .NET, Java, Python, Ruby, etc.),
Developping since August 2007, first release in 2009,
Open Source (GNU AGPL).
MongoDB features
Stores dynamic JSON documents (internally represented as BSON
Binary JSON),
Full support for indicies,
Replication and high availability,
Complex queries (which are also represented as JSONs),
Map/Reduce mechanism handy way of aggregation and processing data
(combination of SQLs Group By and stored procedures),
GridFS mongos file system, which allows to store files in
database.
Where it applies?
Web appliactions (logging, caching, processing huge amount of
data),
High load / high scalabillity,
GIS solutions (it supports 2d geospatial indicies
longitude/latitude)
Where it shouldnt be used?
High transactional operations (no support for ACID
principle),
Cases which needs SQL (many joins for example)
Who uses it?
MongoDB vs. SQL
Schema-free no migrations!
MongoDB (as every NoSQL solution) is schema-free, so if we need to
put new field into existing document, we dont need to do extra
things, like Alter Table in SQL database. We just start using
document with new field,
It means, that we dont need to care about an migrations its done
transparently.