Questions tagged [acid]

ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably.

29 questions
20
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
  • 303
  • 1
  • 2
  • 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
7
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,479
  • 2
  • 14
  • 34
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
3
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
  • 77
  • 5
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
  • 129
  • 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
  • 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
  • 7,315
  • 1
  • 21
  • 36
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
  • 3
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…
2
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…
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
  • 820
  • 2
  • 10
  • 21
1
vote
1 answer

Is it possible that records are changed while a read query is still executing?

Suppose a read (select) query R is reading some 100 records from a table, 50 records are read so far, could in the meanwhile a write query W change some of the unread records? We didn't take any locks on the table (or to be read records). I think it…
user40602
  • 111
  • 2
1
vote
1 answer

How to configure read transactions to never cause other write serialization transactions to fail

I am protecting critical transactions with application mutexes and SERIALIZABLE. I presume that this makes these operations as acid as possible, but now I'm concerned that reads might cause failures to those write transactions because of…
user32234
1
2