The most recent craze in databases appears to become focused on non-relational databases. Why? It appears type of detrimental. For instance, it can make a lot more sense in my experience to convey my data inside a relational way (example code in Django + SQL for tables):
class Post(models.Model): name = models.CharField() created = models.DateTimeField(auto_now_create = True) class Comment(models.Model): text = models.TextField() post = models.ForeignKey('Post') created = models.DateTimeField(auto_now_create = True)
create table post (id int primary key auto_increment, name varchar, created datetime); create table comment(id int primary key auto_increment, text text, post_id int, created datetime, foreign key post_id references post(id));
The energy of SQL is this fact information could be expressed in so many different ways. Sure, the entire object-relational-mapping problem is available, however i consider it as an element and never as being an issue. With SQL, I'm able to fetch all distinct comments of the given publish that are over the age of yesterday, collate all individuals together, and generate statistics. Can exactly the same be accomplished for non-relational databases?
Additionally, it would appear to actually impact performance to utilize a non-relational database like MongoDB since you would immediately grab a whole object graph, instead of that which you minimally need.
Can someone show me exactly what the benefits are of utilizing a non-relational database?
Have a look in the CAP Theorem
And also the PACELC interpretation
Relational databases often to create a bouquet of trade-offs, and non-relational makes another group of trade-offs. For massive distributed datasets, non-relational sometimes will work better.
There's additionally a sense by which non-relational databases can eliminate many of the ORM discomfort, however you will find always tradeoffs. In certain use cases, non-relational storage could be faster, because all of the data for the hierarchy could be saved closer together around the disk. Also observe that non-relational databases still have query abilities.
Ultimately, it comes down to making the right group of trade-offs for the particular use-situation.
Take a look at Nosql : http://en.wikipedia.org/wiki/NoSQL
It's essentially due to scalibility and gratifaction.