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
1 answer

Exiting Loop with ACID Transactions with Knex SQL Query Builder & Bluebird in Node.js

We're using the Knex SQL Query Builder to perform ACID transaction in Node and are we're experiencing some strange behavior while using a loop with Knex. The code below takes an array of tables and then conditionally performs an insert or update.…
A2MetalCore
  • 1,621
  • 4
  • 25
  • 49
0
votes
2 answers

MongoDB. Transaction?

I wanted to know if there are ACID guarantees in multi-document transactions in MongoDB. What's the current status, existing materials are quite old. What's been upgraded now? How can we simulate to show that it can't, if it can't OR can, if it can?
anz
  • 987
  • 7
  • 21
0
votes
1 answer

NO Guarantee of ACID for NOSql then how to ensure consistency?

For example, for find and save document in MongoDB: Article article1 = mongoOperation.findOne(new Query(Criteria.where("_id").is(1)), Article.class); mongoOperation.save(article.setAttrA("A")); Article article2 = mongoOperation.findOne(new…
fmchan
  • 760
  • 1
  • 11
  • 29
0
votes
0 answers

ACID interrelationship

Transaction properties and their interrelationship? The interrelationship among these attributes. how they are dependent on each other, that is, what could happen to other properties if one is not satisfied during the execution of concurrent…
user5408850
0
votes
2 answers

What are the possible failure modes of read-filter-write inside a transaction without a lock?

Consider the following workflow, running in MySQL with the InnoDB engine. Begin a transaction. Select some rows using SELECT FROM tablename WHERE ..., rather than SELECT ... FOR UPDATE. Filter those rows using code that is not executing in the…
merlin2011
  • 71,677
  • 44
  • 195
  • 329
0
votes
1 answer

I am storing some data in XML files in a SQL Server as varbinary. How to create concurrent access?

Whenever a user wants to edit or read some data, he gets a copy of the XML file in his application. At this time, another user must not be allowed to edit the same XML file but should be able to view it. I could add a locked column to the SQL Server…
Ace McCloud
  • 798
  • 9
  • 27
0
votes
1 answer

MySQL - Mutual exclusion in transactions and locks?

I am currently learning about MySQL's transaction and lock features. Are transactions with the isolation-level SERIALIZABLE and statements between a LOCK and UNLOCK statement on the same table executed mutually exclusive? EDIT 1: For the…
MinecraftShamrock
  • 3,504
  • 2
  • 25
  • 44
0
votes
1 answer

Are Netezza and Hive for Hadoop ACID compliant?

I have read that Netezza is ACID compliant. While I have also read that Netezza doesn't enforce foreign keys which means C of ACID is violated. Also Netezza (until version 7.1.0.0 ) didn't support commit/rollback in stored procedure like in Oracle.…
0
votes
2 answers

Entity Framework 6 MySQL Change Value Within Transaction

I want to add 1 to a value within my database within a transaction. I want to ensure that the record is updated properly and hasn't been changed by someone else during that time. I have the following code that I thought would work, but I can still…
Luke
  • 22,826
  • 31
  • 110
  • 193
0
votes
1 answer

When to use/use cases NoSQL?

We are overwhelming nowadays with lots of NoSQL options and NoSQL in general. And it is trendy today to abandon/ignore RDBMS and adopt "blindly" NoSQL, considering that most startup-s/projects can deal pretty good with traditional RDBMS. Lets start…
Aliaksandr Kazlou
  • 3,221
  • 6
  • 28
  • 34
0
votes
2 answers

SQL. Re: inner joins & foreign keys

Good day. I have a basic question on SQL and table structure. What we have now: 17 tables. These tables include 1 admin table. The other 13 tables are all branched off 3 "main" tables: customers, CareWorkers, Staff. If I'm wanting to adhere to ACID…
AriesTiger
  • 69
  • 1
  • 8
0
votes
1 answer

Does strict Two Phase Locking (2PL) allow shared READ items?

I have gone through a few of sources but recently came across one that says even shared read locks isn't allowed in strict 2PL. Is this true? Also please confirm that Sharing is allowed with Conservative and Basic 2PL?
Cornelis
  • 1,065
  • 8
  • 23
0
votes
0 answers

Node.JS + SQLITE3 I would like to test transaction speed

I have Nodejs and SQLITE + sqlite transaction installed because I would like to do some ACID transactions with sqlite https://github.com/Strix-CZ/sqlite3-transactions Now I would like to write a nodejs programm to test how many transactions I can do…
europeanguy
  • 235
  • 2
  • 10
0
votes
0 answers

Implementing locks to make Google Search API ACID

I'm working on an AppEngine project that requires flexible searches over a dynamic dataset, and Google's Search API seems to fit the bill, so I'm thinking of using it to persist the dataset. The one big flaw is that it has no ACID properties or…
whereswalden
  • 4,819
  • 3
  • 27
  • 41
0
votes
0 answers

Does an insert block a select? When it does not?

Consider the following queries: SELECT * FROM TABLE WHERE status = 'submitted' (or count (*) instead of *) and INSERT INTO TABLE (description, id, status) VALUES ('task', '1234', 'finished') Assume that these queries are executed by…
Jim
  • 18,826
  • 34
  • 135
  • 254