Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am currently evaluating databases to use for a new project, which will require insertion and querying of large amounts of trading data. Our team is leaning towards Cassandra, but then I read this article that seems to suggest using non-ACID compliant databases can result in occasional data loss:

http://www.dbms2.com/2010/09/21/acid-compliant-transaction-integrity/

I can't find any further information on this on the web and can't understand how non-ACID compliance means that data loss can occur. Can anyone shed some light?

share|improve this question
Neo4j is a NOSQL (graph) database that is actually ACID compliant. It comes with full transaction support and durable persistence. Neo4j also uses transaction-logs to secure write operations before applying them to the datastore. Disclaimer: I work for Neo Technology. – Michael Hunger Nov 18 '11 at 5:55

2 Answers

ACID means

  • Atomicity
  • Consistency
  • Isolation
  • Durability

What this means to you is "every write action will be done only once (no duplicate records) but will be completely stored in the database when the action is done" and that every time you read, you're getting the data you want out.

The thing about the NoSQL databases is that they're often distributed (that's what people want, flat-scalable systems that are cheap), which means that it takes time to replicate the data to all the nodes. Sometimes it's possible to be reading during a write and end up with the old data while the new data is coming out.

You're sacrificing purity for speed.

This is the short version of my answer, and I'm not sure what I need to explain further. Ask me questions!

share|improve this answer
What you're describing sounds like immediate consistency (RDBMS) vs. eventual consistency (NoSQL). However, the linked article talks about actually losing data (not simply having inconsistent data), and I don't understand what ACID compliance has to do with data loss. – del Oct 13 '11 at 3:53
1  
Durability most likely. And that is the case, that's what I'm describing (which makes it seem like data has been lost). The point to ACID is that you can't lose data. Ever. (well it could be lost to damage) – jcolebrand Oct 13 '11 at 3:58
All of the NoSQL databases I've looked (HBase, Cassandra, Redis) use write-ahead logs which can be replayed in case the database crashes before changes have been persisted. Does that mean this criticism doesn't apply to any of these databases? – del Oct 13 '11 at 4:09
I would imagine so. I will revisit this on the morrow, but for now, bedtime. Hopefully you get some other input besides mine before then ;-) – jcolebrand Oct 13 '11 at 4:12

"It depends" is the answer - there are configuration options, mentioned here.

Small nitpick: a database can be durable but not ACID compliant, since ACID is the superset of features (A-C-I-D). I don't think any NoSQL database can claim to be fully ACID, but many of them may claim to pass individual sub-requirements, such as durability.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.