Questions tagged [consistency]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

schemes based on 2-Phase Locking (2PL)?

I wanted to ask, what are the schemes based on 2-Phase Locking (2PL) approach that are well suited for data consistency for distributed database systems. I was looking up the answer for this online ...
0
votes
0answers
16 views

Cosmos Database - Consistency levels - Baseball example - Does not make sense

In the Cosmos Db documentation, there is a case study designed to demonstrate how the various consistency levels apply in a real-life scenario. The example is found under Consistency Levels Explained ...
2
votes
1answer
58 views

How the single SQL statement is isolated?

All the books I've seen so far, talking about transactions show scenarios with several SQL statements involved. But what's about single statements? What level of isolation do they have? Is it ...
1
vote
1answer
83 views

Optimize queries that need to be 100% ACID compliant but can tolerate latency in persistence

Introduction I'm writing a trading program in C++. The program involves having user balances and orderbooks. The orderbook is basically a set of buy and sell orders. When submitting an order, say a ...
5
votes
2answers
415 views

Solving supertype-subtype relationship without sacrificing data consistency in a relational database

Trying to get better at designing databases, I noticed I'm always stuck trying to solve variations of the exact same problem. Here is an example using common requirements: An online store sells ...
2
votes
1answer
48 views

Network Partitioning

My current understanding of the network-partitioning scenario, also mentioned in the CAP theorem, is that it's a scenario where the clients are not able to connect to some DB nodes even though they ...
1
vote
3answers
138 views

Is it safe to insert the newest row with SELECT INTO?

Trying to keep rows consistent then referencing previous rows. CREATE TABLE transactions ( id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, account_id bigint ...
0
votes
2answers
367 views

Handling read conflict in cassandra?

Say we have three nodes(simple replica no sharding) i.e. N1,N2 and N3 with replication factor as 3. As read and write request can go to any node, Say Request write request(to update the same ...
3
votes
1answer
2k views

Mongo CP, Cassandra AP?

I have read lot of articles on net but still confused why Mongo CP, Cassandra AP, RDBMS CA ? Will explain my understanding and query along with that . Mongo Consider a scenario where I have one ...
0
votes
1answer
299 views

Does encapsulating a statement in a transaction include the triggers it fires?

I have an INSERT that will fire a TRIGGER which will UPDATE an attribute on another TABLE. I need to make sure that if the INSERT is successful and the UPDATE inside the TRIGGER isn't then the whole ...
0
votes
1answer
1k views

MS SQL DBCC CHECKDB page ID (1:xxx) contains an incorrect page ID

Fistly, yes I'm aware that there are two options 1) is to restore or 2) run DBCC with allow data loss. But I'd like to understand what exactly is corrupted and what possible data loss could be. From ...
1
vote
1answer
429 views

Quorum read consistency in Cassandra

I'm new to distributed databases and there are a couple of things I couldn't figure out. We're developing an application and need to select the right database, this application needs strong ...
5
votes
1answer
271 views

SQL Server backup versus third party snapshot based backup using VSS

Is it safe to assume that SQL Server instance or database level backup to a NAS share or tape using the SQL Server backup command (internally create .bak file) are transactionally consistent backups? ...
2
votes
0answers
539 views

Database consistency errors

I am using SQL Server 2008 R2 and one of my databases has loads of consistency errors. When I try to query a particular record from a table it displays an error message similar to this Msg 824, Level ...
3
votes
2answers
3k views

what is an Assert in Database world?

I searched for Assert and found general explanations: Assertion (software development) In computer programming, an assertion is a statement that a predicate (Boolean-valued function, a true–...
1
vote
2answers
258 views

Replacing MYSQL table with data from another table - no downtime

I have two tables with identical structures: Table1 and Table2 id INT PRIMARY KEY, a TINYINT, b TINYINT, c TINYINT Table1 is actively being used by queries from other sessions; Table2 is not ...
2
votes
1answer
73 views

I cannot grasp the definition of serializable

Everybody says that "Serializable" means that for any given set of concurrent transactions, there is a serial ordering of those transactions which produces the same result. They also give an ...
7
votes
2answers
1k views

What is the difference between integrity and consistency?

Whether I read about CAP or ACID, I see that consistency is referred to ensure the DB integrity constraints. So, I do not understand, why two terms are used to refer the same thing or there is a ...
3
votes
1answer
582 views

cleaning up failed repair db: path: /var/lib/docker/wesfgr/repair/_tmp_repairDatabase_0

We run MongoDB 3.0.6 with MMAP in Docker container (single node). The filesystem was full and I did a repair with other path. 2016-10-03T08:58:51.186+0200 I INDEX [initandlisten] building ...
4
votes
5answers
25k views

DBCC CHECKDB consistency-based I/O error

Running: DBCC CHECKDB(DatabaseName) with NO_INFOMSGS gives me the following error: Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical consistency-based I/O error: incorrect ...
6
votes
1answer
527 views

Data inconsistency prohibition if a table refers to another via two many-to-many relationships

I have following database design (by => foreign key constraints are depicted): Company[id] CompanyRealm[id, company_id=>Company.id]many2many Project[id, company_id=>Company.id] ProjectRealm[id, ...
2
votes
2answers
586 views

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. ...
1
vote
0answers
39 views

Does the consistency part of the CAP theorem apply to updates and not first-time writes?

Using this definition of the CAP theorem: Consistency All database clients see the same data, even with concurrent updates. Availability All database clients are able to access some version of the ...
10
votes
2answers
19k views

Database Implementations of ORDER BY in a Subquery

I am using an application (MapServer - http://mapserver.org/) that wraps SQL statements, so that the ORDER BY statement is in the inner query. E.g. SELECT * FROM ( SELECT ID, GEOM, Name ...
1
vote
0answers
313 views

Pgpool load-balancing vs. consistency

In what ways is consistency weakened when using pgpool-II load-balancing on Postgresql servers running streaming replication? Obviously with asynchronous replication you can insert a row on the ...
0
votes
1answer
254 views

Dealing with Mysql Replication and Functions

In MySQL replication Master-Slave, is there anyway to deal with the functions: LOAD_FILE() UUID(), UUID_SHORT() USER() FOUND_ROWS() SYSDATE() GET_LOCK() IS_FREE_LOCK() IS_USED_LOCK() MASTER_POS_WAIT(...