What is ACID and CAP properties in terms of Databases? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is ACID and CAP properties in terms of Databases?

25th Jul 2017, 1:36 PM
Shishir Shetty
Shishir Shetty - avatar
3 Answers
+ 1
ACID is a well known principle which assures that the data is stored correctly and none is lost, or missplaced even after power shut down. For such thing to happen, transactions are a must. Each query runs on a different session, and the all or nothing (transaction). If the data was not commited, no one will see the change. No data is lost during power failure. A - atomicity (unique transactions) C - consistency (data before commit retrieval) I - each transaction runs alone D - durability - no data loss during power (hardware) or errors (software) failure While acid is about structure and organizing, the CAP is about the server. For fast backup restore, more servers are used to serve as replicas. C - consistency (same data) among replicas A - at least one server is available if one(main) is lost P - partition tollerant, is able to handle low/no connectivity
25th Jul 2017, 11:01 PM
Claudiu Stefan Haidu
Claudiu Stefan Haidu - avatar
+ 1
@Claudiu could you explain these properties in terms of difference between Cassandra and Oracle?
30th Jul 2017, 6:27 AM
Shishir Shetty
Shishir Shetty - avatar
+ 1
Apache Cassandra is a free open source NoSQL database, while Oracle is a SQL paid database :). Cassandra introduced the CQL as an alternative to the structured query language. The data in NoSql is stored as key - value pair such as JSON format.
31st Jul 2017, 4:48 AM
Claudiu Stefan Haidu
Claudiu Stefan Haidu - avatar