Questions tagged [acid]

Guaranteed properties of many database systems - This is an acronym for Atomicity, Consistency, Isolation, Durability.

ACID (atomicity, consistency, isolation, durability) is a set of properties that guarantees that database transactions are processed reliably. This means that a database server that is ACID compliant can guarantee that it has not violated any constraints, even when a transaction fails to complete.

Most SQL-based systems are intended to be ACID-compliant. NoSQL systems, however, typically do not guarantee this. (They are usually attempting for This database terminology makes assurances about the data state which are BASE (Basically Available, Soft state, Eventual consistency).

  1. Atomicity : (All at Once) A transaction is completely executed, or if a part of the transaction fails, no changes are made.

  2. Consistency : (Never Breaks Rules) At no point is the database violating any of the constraints that exist in the system. This means that the system cannot implement constraints to occur after the data is written - it must guarantee that the current database state is always allowed.

  3. Isolation : (One at a time) If two database operations occur, they must either have a defined order (One transaction occurs before the other), or the order of the operations must be irrelevant to the transactions.

  4. Durability : (When it's done, it's done.) Once a transaction is complete, any modified, new, or removed data is now in the database, and it stays unless further modified. The transaction cannot be undone by, for instance, a power failure.

331 questions
5
votes
2 answers

Why is two-phase commit considered atomic?

Two phase commit is described as an "atomic commitment protocol". I would expect this to mean that all clients see the state of the world from either before a transaction commits, or after it commits -- with no in-between state. It seems though that…
Gavin Wahl
  • 1,193
  • 8
  • 21
5
votes
4 answers

How can I make a stored procedure commit immediately?

EDIT This questions is no longer valid as the issue was something else. Please see my explanation below in my answer. I'm not sure of the etiquette so i'l leave this question in its' current state I have a stored procedure that writes some data to…
chollida
  • 7,834
  • 11
  • 55
  • 85
5
votes
1 answer

Need an efficient way to store/query json in a SQL database

I'm implementing a service where each user must have his own json/document database. Beyond letting the user to query json documents by example, the database must also support ACID transactions involving multiple documents, so I have discarded using…
Thiago Padilha
  • 4,590
  • 5
  • 44
  • 69
5
votes
2 answers

Thread blocked indefinitely - Haskell - Acid State

I was worried about Acid State generating to many event files and checkpoints, and the user "stepcut" told me there were an implementation of the solution in acid called createArchive which delete old events... The problem is that when I use it I…
Illiax
  • 1,002
  • 1
  • 8
  • 21
5
votes
4 answers

NoSQL databases: what about read consistency?

From what I can make out NoSQL databases might be a good option for high intensity data read applications, but are a less good fit if you need to do also do a lot data updates and transactionality is very important to you (what with there being no…
copt
  • 83
  • 1
  • 7
5
votes
1 answer

Transaction ACID properties with Hibernate Search + Infinispan Directory

I have the following setup: JPA (2.0) through Hibernate (4.1) Infinispan as 2nd level cache (5.1) Hibernate Search connected to Hibernate (4.1) Infinispan as Directory for Hibernate Search (Lucene) Connected a JDBC CacheStore for the Infinispan…
Luciano
  • 8,552
  • 5
  • 32
  • 56
4
votes
1 answer

In Acid-state, exactly what does $(deriveSafeCopy 0 'base ''T) mean

For Acid to store values of type T, one must write $(deriveSafeCopy 0 'base ''T) after the definition of T. But what exactly does this command do?
user1023733
  • 805
  • 5
  • 14
4
votes
1 answer

Mysql XA Isolation Level

Does anyone know why Mysql requires serializable isolation level to achieve ACID properties with XA transactions or what would be lost if you used repeatable read and XA? However, for a distributed transaction, you must use the SERIALIZABLE…
benmmurphy
  • 2,503
  • 1
  • 20
  • 30
4
votes
0 answers

What is/how to write multiple tx.run as a single transaction with the neo4j-driver in NODEjs?

I'm trying to sync two databases and for each type of operation I want it to be a whole transaction, I've setup something rather basic but I'm unsure if this will actually run and rollback as a single transaction. I've been looking through the…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
4
votes
2 answers

How to pick transaction isolation levels?

I have a table in database that is responsible for storing ordered/reorderable lists. It has the following shape: | id | listId | index | title | ... | where id is primary key, listId is foreign key that identifies what list the item belongs to,…
Kit Isaev
  • 680
  • 8
  • 19
4
votes
1 answer

Atomic Transactions across web services residing on same server using same database

Our architecture comprises of Web Services developed on JAX-WS specification using Metro. These services are deployed on a single Glass Fish App server as separate war files.All web services internally use a single database.The datatacess layer is…
user398039
  • 143
  • 1
  • 12
4
votes
2 answers

Are there any persistence guarantees when using memory mapped files or plain Stream.Write

I have lots of data which I would like to save to disk in binary form and I would like to get as close to having ACID properties as possible. Since I have lots of data and cannot keep it all in memory, I understand I have two basic approaches: Have…
Lou
  • 4,244
  • 3
  • 33
  • 72
4
votes
1 answer

Does Cosmos DB support cross partition transactions?

I'd like to move a document to another partition by changing the partition key. I have read somewhere that the document would have to be deleted first and a new one with the new partition key would have to be created. If that's the case, can this…
user246392
  • 2,661
  • 11
  • 54
  • 96
4
votes
3 answers

Are there file write functions in Python that have the same safety as ACID does in databases?

I was wondering if there are any functions for writing to files that are like what the ACID properties are for databases. Reason is, I would like to make sure that the file writes I am doing won't mess up and corrupt the file if the power goes out.
Varriount
  • 663
  • 5
  • 18
4
votes
0 answers

Why Mongo is without Acid?

I am beginner in MongoDB but read a lot of stuff on net in last week. What I get is MongoDB does not follow ACID principles in true sense or we can say MongoDB is ACID-compliant at the document level. Now my question is why MongoDB does not…
emilly
  • 10,060
  • 33
  • 97
  • 172