ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably.
Questions tagged [acid]
38 questions
27
votes
3 answers
Consistency in ACID and CAP theorem, are they the same?
From my understanding, the consistency in ACID is ensuring the data integrity.
However, the consistency in CAP means the data can appear quickly in distributed system.
Does that mean: they are not the same concept?
Yang Xia
- 373
- 1
- 3
- 4
11
votes
1 answer
Synchronization using triggers
I have a requirement similar to previous discussions at:
Writing a simple bank schema: How should I keep my balances in sync with their transaction history?
Trigger in combination with transaction
I have two tables, [Account].[Balance] and…
Yiping
- 227
- 2
- 8
9
votes
3 answers
Is Mysql ACID Compliant?
Is Mysql not an ACID compliant according to Postgresql? In some blogs I see Mysql is not ACID compliant. How true is that?
Let't not consider the replication here, lets consider a standalone and how efficient is Mysql ACID?
In my understanding for…
Mannoj
- 1,581
- 3
- 15
- 36
7
votes
1 answer
Transaction and data consistency during a failure
When a database begins a transaction, all statements executed in that transaction are isolated and atomic (and consistent and durable). These are pretty much the definition of a transaction.
Wikipedia states that there are some databases that…
Richard
- 1
- 8
- 42
- 62
4
votes
2 answers
Half of a transaction completes, when the other half fails?
I have done some searching on SO, MSDN, and various other sources, and I found plenty of questions about transactions, but none that seem to be exactly what I'm dealing with.
Admittedly I'm still very much a junior DBA, though I do understand the…
Daniel F
- 41
- 3
4
votes
3 answers
Can You Drop Consistency from ACID?
In his book "An Introduction to Database Systems" C.J.Date wrote a chapter about the ACID principles called "Dropping ACID". In this chapter he calls Correctness(Consistency) "essentially meaningless" and the other principles at most "a…
Martin
- 87
- 6
4
votes
0 answers
Does Serializable isolation eliminate the need for explicit locks?
Postgres documentation on Serializable isolation level counterposes Serializable with explicit locking, and makes it sound as though explicit locking should not be needed when using Serializable. I'm looking to understand
Am I misunderstanding the…
Kit Isaev
- 141
- 4
4
votes
2 answers
Transaction atomicity implies consistency
Transactions are said to need both atomicity and consistency. But, what is the point of consistency?
Once you ensure that you either update both accounts on money transfer, you are consistent. Wikipedia article on consistency says that consistency…
3
votes
0 answers
Git as distributed and decentralized storrage with regard to ACID and CAP
When using Git to store documents distributed and decentralized it can be considered as a database.
How would the ACID properties and the CAP theorem correspond to git in this case?
I think one has to distinguish between a single repository and the…
white_gecko
- 139
- 3
2
votes
1 answer
Reference implementation of a scalable storage system with strong consistency?
Is there a storage system with these properties?
horizontally scalable - can handle arbitrary read and write throughput if you add enough nodes to the cluster
consistent, in the sense that all reads will reflect the latest successful writes
[edit]…
Daniel
- 21
- 2
2
votes
2 answers
row locking within ACID transaction innodb
I have a financial transaction that looks something like this (pseudo):
begin
select record for update
update record(same record as selected)
insert another record into another table
commit
If I call SELECT ... FOR UPDATE within the…
tommo
- 135
- 1
- 6
2
votes
1 answer
Transaction level difference between using a large IN filter VS. "BEGIN TRAN/COMMIT"
I would like to delete about 100,000 records with minimal server overhead. I've had a few nagging questions I haven't been able to test properly so I figured I'd ask some experts here. Which would be better:
1-
BEGIN TRAN
DELETE FROM dbo.x
WHERE…
Ali Razeghi - AWS
- 7,566
- 1
- 26
- 38
2
votes
1 answer
Making sure balance field is always consistently updated with triggers
This is my database schema, related to the problem.
This is one of the triggers:
CREATE OR REPLACE FUNCTION "public"."update_balance_bet"()
RETURNS "pg_catalog"."trigger" AS $BODY$
DECLARE
currentBalance INTEGER;
BEGIN
…
Pablo
- 121
- 4
2
votes
1 answer
Postgres: Are secondary indexes included in ACID?
Are non-unique indexes / indices covered under the Consistency clause in aCid? (same for other attributes of an index that do not place constraints on the data) I am seeing certain performance issues (benefits, actually) in Postgres that make me…
Mark Gerolimatos
- 247
- 3
- 12
1
vote
2 answers
ACID violation in Postgres 9.1?
I am using a Postgres DB to implement a scheduling of jobs for a large number of computers/processes. To make the story short, every job has its id, all scheduling is implemented with three tabes: all jobs, currently running jobs, and already…
arthur
- 888
- 4
- 13
- 29