15

Possible Duplicate:
When would someone use MongoDB (or similar) over traditional RDMS?

How well the SQL and NoSQL go head-to-head. I read somewhere that SQL databases are not well for data that is well structured or has some graph-iness associated with it. Is it really the case?

Apart form Facebook, Google, and some other big players on the web, I don't know how well small-players and start-ups have used these tools. I found another similar question about the same here. But I couldn't gather much stats from here. These are certain specific cases, and is there a general pattern (like the one mentioned above) for which these NoSQL databases can be used?

How wise will it be for a start-up to go for a NoSQL database if the developers know that the amount of data involved will be a little large and is well structured, but requires frequent CRUD operations?

Here on stackoverflow, one can find questions about when not to use SQL, but are there any scenarios when one should avoid using NoSQL databases? Also, how effective will it be to use both in parallel so that we get the best of them both?

One last question, do these distributed NoSQL databases perform equally well when they are used in a single-node setup?

c0da
  • 1,526

2 Answers2

8

Here are some pros for classical SQL databases like Oracle, MS SQL, Sybase, DB/2 against NO/SQL:

  • very mature
  • existing ecosystem (documentation, tools, lots of third party vendors, bindings to different programming languages etc.)
  • extensive security models
  • easy ad-hoc-queries, with very powerful query languages
  • most of them are scalable for hundreds of users/connections
  • Views and stored procedures
  • trustworthy transaction models
  • different indexing capapatibilities
  • different goodies like replication mechanisms, geographic datatypes, etc.

Those features are really good if you are going to develop some enterprise software system, where you don't know exactly what applications will work with these data in a few years. I don't think there are any No/SQL databases available today which can compete in the listed features with any of the "big" SQL databases.

On the other hand, NO/SQL-databases show benefits when you don't need many of those things, for example, as a backend db of a web application you won't need a complex security model, because there may be mostly just one user (the application server process) connected to you db at production time. Of course, you could also use some lightweight SQL database like SQLlite for those kind of applications (and many people do this), but then there's also to consider the structure of the data you are going to store. For example, a blog system, a QA forum, a content management system, a Wiki: there is a lot of text or html code or xml code to store, and less adminstrative data. That may be systems where NO/SQL can show it's benefits.

Doc Brown
  • 218,378
7

There is only one scenario where NoSQL is the way to go. And that is when you need to be very very flexible regarding database traffic.

That means you have to expect that all of a sudden the database-requests explode by a factor of - let's say - 10 or 100. The ability to react to such situations is called elasticity.

Here you have a problem with classic relational databases, cause due to their specialization on optimizing for JOINs they cannot just be copied to another server while still guaranteeing relational integrity. And even then copying those huge databases takes a lot of time.

So to deal with those explosion of request situations companies came up with different database-concepts that are specialized for that.

If you don't have to expect such extreme flucutations in your request-load, then relational is the way to go. And that maybe forever, cause what many people don't understand is that relationality is not just some tech-buzz-word from last century - information is almost always inherently of vectorial and therefore relational nature.

Raffael
  • 505