Wojciech Sznapka<br />13.05.2011<br />MongoDB – document oriented databaseDoes NoSQL make sense?<br />
Agenda<br />NoSQL – definition and solutions,<br />MongoDB – description and feautres,<br />MongoDB usage,<br />Who uses it?<br />Schema-free,<br />Some live examples,<br />Does NoSQL make sense?<br />
NoSQL<br />It’s a class of database management systems, the alternative for relational databases (RDBM). Sometimes people call they „next generation databases”,<br />NoSQL databases haven’t got schema like relational systems, there’s no table joining and have good scalling facilities.<br />
MongoDB<br />Document Oriented – stores JSON documetns ,<br />Very efficient (written in C++),<br />High scallable,<br />Schema-free – high flexibility,<br />Supports many software platform and has plenty programming language drivers (PHP, .NET, Java, Python, Ruby, etc.),<br />Developping since August 2007, first release in 2009,<br />Open Source (GNU AGPL).<br />
MongoDB features<br />Stores dynamic JSON documents (internally represented as BSON – Binary JSON),<br />Full support for indicies,<br />Replication and high availability,<br />Complex queries (which are also represented as JSONs),<br />Map/Reduce mechanism – handy way of aggregation and processing data (combination of SQL’s Group By and stored procedures),<br />GridFS – mongo’s file system, which allows to store files in database.<br />
Where it applies?<br />Web appliactions (logging, caching, processing huge amount of data),<br />High load / high scalabillity,<br />GIS solutions (it supports 2d geospatial indicies – longitude/latitude)<br />Where it shouldn’t be used?<br />High transactional operations (no support for ACID principle),<br />Cases which needs SQL (many joins for example)<br />
Schema-free – no migrations!<br />MongoDB (as every NoSQL solution) is schema-free, so if we need to put new field into existing document, we don’t need to do extra things, like Alter Table in SQL database. We just start using document with new field,<br />It means, that we don’t need to care about an migrations – it’s done transparently.<br />
Does NoSQL make sense?<br />Yes, if we will use NoSQL databases along with SQL, if they are needed. Dropping SQL databases completly isn’t the best idea for huge and complicated applications, but supplementing data model with NoSQL database (like MongoDB), can improve application performance and shorten development process,<br />It should be rather „Not onyl SQL”.<br />
Thank you for an attention<br />Any questions<br />?<br />
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.