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
0
votes
3 answers

Transaction doesn't fail even if one of operations fails

So I was playing with transactions, and I have tried to subtract the funds from one transfer it to another. As you can see from the picture, the first update query wasn't successful...Unlike the second one, which executed successfully. Now, what I…
Whirlwind
  • 14,286
  • 11
  • 68
  • 157
0
votes
1 answer

Can we write stored procedures in IBM graph or JanusGraph? Are they ACID compliant?

I know the basics of how IBM graph and JanusGraph works. Can we write stored procedures for these? Also, are they ACID compliant?
rookie
  • 63
  • 1
  • 5
0
votes
1 answer

ACID transactions in HIVE table from pig script

Is it possible to perform ACID transactions in a Hive table from a Pig script? As per the below link we can execute DDL statements on a hive table from a pig script: https://issues.apache.org/jira/browse/PIG-2482
0
votes
1 answer

What is different between ACID and Non-ACID SQL?

i am a student can you help me? what is different between ACID and Non-ACID SQL?? thank you..!
0
votes
1 answer

Atomicity of view updates in CouchDB

The CouchDB docs make it pretty clear that single-document updates are ACID. But I'm wondering whether that applies to updates to views that are triggered as a result of a document update. Suppose I have a view function in place to display the…
nradk
  • 680
  • 9
  • 19
0
votes
2 answers

Lock Database Tables To One User At A Time In Microsoft Access VBA

I would like to know if it is possible to lock database tables to one user at a time to perform the ACID terminology on the database, and allow one full transaction at a time in Microsoft Access database using VBA. I am looking for something like…
falhumai
  • 163
  • 15
0
votes
1 answer

Conditional insert in SQL

I was looking for an example of data consistency over tables by using ACID transaction. I saw the example here : http://microservices.io/patterns/data/shared-database.html summery is as follow: CUSTOMER table has a column CREDIT_LIMIT. we want to…
Danial
  • 703
  • 1
  • 11
  • 26
0
votes
1 answer

hive transactional table compaction fails

Table created with this : create table syslog_staged (id string, facility string, sender string, severity string, tstamp string, service string, msg string) partitioned by (hostname string, year string, month string, day string) clustered by (id)…
Aftnix
  • 4,461
  • 6
  • 26
  • 43
0
votes
4 answers

Basic Database Question?

I am intrested to know a little bit more about databases then i currently know. I know how to setup a database backend for any webapp that i happen to be creating but that is all. For example if i was creating three different apps i would simply…
0
votes
1 answer

Commit to a log like Kafka + database with ACID properties?

I'm planning in test how make this kind of architecture to work: http://www.confluent.io/blog/turning-the-database-inside-out-with-apache-samza/ Where all the data is stored as facts in a log, but the validations when posted a change must be against…
mamcx
  • 15,916
  • 26
  • 101
  • 189
0
votes
1 answer

How to prevent a race condition of simultaneous user updates in reservation system?

I was asked in an interview the following scenario: User1 looks at empty seats for a movie. User2 also looks at empty seats for a movie. Both select 'same seat' and hit submit. 1, What mechanisms would prevent same resource from being allocated to…
JavaDeveloper
  • 5,320
  • 16
  • 79
  • 132
0
votes
1 answer

Can financial transactions be handled by systems that use eventually consistent datastores?

Is it possible to handle financial transactions on eventually consistent datastores? My hypothesis is "no", because any two parties (buyer and seller) may need to have balances updated in a single atomic transaction, and this tran saction must have…
Demi
  • 3,535
  • 5
  • 29
  • 45
0
votes
1 answer

Locking during a transaction in MySQL InnoDB

I was wondering whether all tables modified in a transaction in MySQL (InnoDB) are locked for the entire transaction? I have a session that updates a "latest version" in a version table, then creates a new table for a few GBs of data for the new…
Jack
  • 2,153
  • 5
  • 28
  • 43
0
votes
1 answer

Neo4j--py2neo-- Unable to create nodes using tx.create(a)

I am using Py2neo 3.0 and Neo4j 3.0 to create nodes. Followed the transaction statements to create the nodes but failed. Syntax: tx = graph.begin() a= Node("Person1", name="Alicedemo") tx.create(a) tx.commit And, then did the same…
Jack Daniel
  • 2,527
  • 3
  • 31
  • 52
0
votes
0 answers

ACID database query

A person is trying to transfer money from account a to account b. The most naive and natural single threaded implementation would be using a mutex for respecting atomicity and concurrency. mutex.wait() a = a -50 b = b +50 mutex.signal() I am sure…
user2714795
  • 109
  • 4