Questions tagged [consistency]

In database systems, a consistent transaction is one that does not violate any integrity constraints during its execution. If a transaction leaves the database in an illegal state, it is aborted and an error is reported.

Consistency is one of the ACID properties that ensures that any changes to values in an instance are consistent with changes to other values in the same instance. A consistency constraint is a predicate on data which serves as a precondition, post-condition, and transformation condition on any transaction.

518 questions
316
votes
13 answers

CAP theorem - Availability and Partition Tolerance

While I try to understand the "Availability" (A) and "Partition tolerance" (P) in CAP, I found it difficult to understand the explanations from various articles. I get a feeling that A and P can go together (I know this is not the case, and that's…
Manikandan Kannan
  • 8,684
  • 15
  • 44
  • 65
47
votes
4 answers

Amazon - DynamoDB Strong consistent reads, Are they latest and how?

In an attempt to use Dynamodb for one of projects, I have a doubt regarding the strong consistency model of dynamodb. From the FAQs Strongly Consistent Reads — in addition to eventual consistency, Amazon DynamoDB also gives you the flexibility…
26
votes
5 answers

Can a database support "Atomicity" but not "Consistency" or vice-versa?

I am reading about ACID properties of a database. Atomicity and Consistency seem to be very closely related. I am wondering if there are any scenarios where we need to just support Atomicity but not Consistency or vice-versa. An example would really…
rkg
  • 5,559
  • 8
  • 37
  • 50
26
votes
1 answer

Is DynamoDB still following CAP theorem with its "Strong Consistency" promises?

Previously, DynamoDB was providing "eventual consistency" only, obeying "Availability" and "Partition Tolerance" portion of CAP theorem. But now, DynamoDB provides "strong consistency" option apart from the "eventual consistency". Does that mean…
Neeraj Gupta
  • 765
  • 1
  • 10
  • 18
24
votes
2 answers

What are the differences between sequential consistency and quiescent consistency?

Can anyone explain me the definitions and differences between sequential consistency and quiescent consistency? In the most dumb form possible :| I did read this: Example of execution which is sequentially consistent but not quiescently…
user4089193
24
votes
1 answer

Python - Why do the find and index methods work differently?

In Python, find and index are very similar methods, used to look up values in a sequence type. find is used for strings, while index is for lists and tuples. They both return the lowest index (the index furthest to the left) that the supplied…
Kevin
  • 1,870
  • 2
  • 20
  • 22
21
votes
3 answers

Which part of the CAP theorem does Cassandra sacrifice and why?

There is a great talk here about simulating partition issues in Cassandra with Kingsby's Jesper library. My question is - with Cassandra are you mainly concerned with the Partitioning part of the CAP theorem, or is Consistency a factor you need to…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
20
votes
3 answers

Are DynamoDB Updates strongly consistent?

The whole reason why DynamoDB is fast and scalable is based on the fact that it is eventually consistent. But at the same time, it comes with this ConsistentRead option for operations like get, batchGet, and query which helps you make sure that the…
Mehran
  • 15,593
  • 27
  • 122
  • 221
19
votes
2 answers

NoSQL: What does it mean for MongoDB or BigTable to not always be "Available"

Reading Nathan Hurst's Visual Guide to NoSQL Systems, he includes the CAP triangle: Consistency Availibility Partition Tolerance With SQL Server being an AC system, and MongoDB being a CP system. These definitions from come a UC Berkley professor…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
17
votes
2 answers

MongoDB Document Operations are Atomic and Isolated, but Are They Consistent?

I'm in the process of porting my application from an App Engine Datastore to a MongoDB backend and have a question regarding the consistency of "document updates." I understand that the updates on one document are all atomic and isolated, but is…
Eternal Rubyist
  • 3,445
  • 4
  • 34
  • 51
17
votes
3 answers

How do I set the consistency level of an individual CQL query in CQL3?

In the earlier beta releases of CQL, there was a command I could use to set the read / write consistency of an individual CQL operation. It looked like this: SELECT * FROM users WHERE state='TX' USING CONSISTENCY QUORUM; I use CQL3 regularly and…
Aaronontheweb
  • 8,224
  • 6
  • 32
  • 61
16
votes
5 answers

Keeping testing and production server environments clean, in sync, and consistent

It seems that the company that I work for is always struggling with our customers’ server environments. Specifically, we almost always encounter problems with testing servers and production servers, and the fact that they always seem to be…
16
votes
2 answers

Redis availability and CAP theorem

In CAP theorem, Redis is specified as a database which lacks availability (which has partition tolerance and consistency). But there are many places where Redis is considered as a high availability key-value store. What is right? I would be…
15
votes
1 answer

Sequential Consistency in Distributed Systems

I am learning Sequential Consistency in Distributed Systems but just could not understand the terms explained. I would appreciate if someone can shed some light in layman's term on why (a) and (c) below are sequentially consistent and (b) is…
user23
  • 415
  • 1
  • 8
  • 22
14
votes
1 answer

Sequential consistency in newbie terms?

Sequential consistency The result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified…
Henok Tesfaye
  • 8,287
  • 13
  • 47
  • 84
1
2 3
34 35