views:

129

answers:

4

The more I read/use non-sql databases, the more I love it.

It's so for the OOP world and it's easy to use, like Rails for Frameworks.

I know the disadvantages. The major concern seems to be the no-transaction and no-concurrency part. Am I correct?

Are these the only features making it hard for developers to choose to use non-sql databases entirely, even for transactions?

If these features were fixed, would it be more OK to only use document-based databases for an application?

Cause now it seems like you still have to use a RDBMS for customer billing data while your content could be in document-based databases like MongoDB/CouchDB/Cassandra.

Could someone shed a light on this.

+1  A: 

No.

They do not seem to be appropriate for fixed-schema, high-volume, mostly numerical data. Think data warehousing. Think ad-hoc analytical queries. They could take over all (or some of the) areas where RDBMS have not been a good fit in the first place (areas where people came up with XML databases, and object-oriented databases, and graph databases, and so on).

This is just like Excel not being able to replace Word (also admittedly, most Excel files I see these days are more presentation than spreadsheet). Different tools for different tasks.

Thilo
@Thilo. Sorry for my previous misleading title making it sounded that I was asking if they could replace the RDBMS. That was not what I meant, what I meant is if one could just use a document-based database throughout the application in the future, even for transactions and operations that must comply to ACID. I have updated my post.
never_had_a_name
+2  A: 

Yes of course you can build entire applications on non-relational data models. As a general rule though most people don't want to do that. The problem is that hierarchical/graph based data models (ie. any model that depends on navigational data structures) significantly increase the complexity and reduce the effectiveness of queries and data integrity in the database. The relational model was invented 40 years ago precisely to overcome those disadvantages inherent in navigation-based databases.

dportas
+1  A: 

In short, many NoSql solutions don't have cascading updates so if your application's data schema requires this, you will either update multiple documents (ie columns whatever) programatically, or stick with a sql based solution to handle this.

Concurrency is handled differently for different solutions.

I think this blog does a good job at explaining some of the trade-offs using a NoSQL solution http://blog.mongodb.org/post/475279604/on-distributed-consistency-part-1

CountCet
and this blog may be of help too http://kylebanker.com/blog/2010/04/30/mongodb-and-ecommerce/
CountCet
+1  A: 

It depends also on the development of new, faster hardware.

You can distribute your database over multiple cheap computers (scaling out) if you use Cassandra and MongoDB. There will always be data sets that are too large for one computer because people collect and keep more data when it is possible to collect and keep more data.

However most data sets fit on one computer and can be stored in a SQL database. It is also possible to scale out a SQL database but foreign keys and complex transactions become slow when you distribute your data over multiple machines.

You have to make some tough choices when you distribute your data over multiple machines: http://dbmsmusings.blogspot.com/2010/04/problems-with-cap-and-yahoos-little.html, you don't have to worry about the CAP theorem if all your data is on one machine.

TTT