Skip to main content

Questions tagged [consistency]

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

Backup database in SQL Server 2012 and restore this backup in SQL Server 2014

First what I do is to check consistency of database in SQL Server 2012: CHECKDB (DATABASE1) And it is ok, no errors and warnings. Next I do FULL backup and restore it on another machine with has SQL ...
piotrassss's user avatar
3 votes
1 answer
219 views

What happens to mysql synchronous replication when read replica can't respond?

In the official doc https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication.html It mentioned that if synchronous replication is required, use NDB instead For scenarios where ...
olaf's user avatar
  • 133
0 votes
1 answer
130 views

How to ensure data consistency in a distributed system

I'm developing a distributed system with microservices with only one write-only database and the rest read-only in logical replication My challenge is to have consistency in the data, especially in ...
Miqueias Kevison's user avatar
2 votes
1 answer
1k views

Non-Repeatable Read vs Phantom Read - Real World Scenario

About the mentioned 2 Data concurrency problems below is what I understand. Non-Repeatable Read - is where within same transaction running the same query twice returns 2 different values for the same ...
Dhanuka Jayasinghe's user avatar
3 votes
1 answer
620 views

Table Consistency Errors

We have encountered database corruption / consistancy issue in one of our database tables, which I'd like to run past the community. Disclaimer: This is a MSSQL database we (the DBA team) have ...
Tom's user avatar
  • 221
0 votes
1 answer
192 views

How repeatable read isolation level and others are implemented in distributed/replicated databases?

I'm studying distributed systems/DBs and I'm struggling understanding isolation levels when we talk about distributed systems. Avoiding problems like dirty read, non-repeatable read, phantom reads, ...
Dev's user avatar
  • 1
2 votes
1 answer
3k views

When to use BEGIN DISTRIBUTED TRANSACTION instead of BEGIN TRANSACTION in SQL Server?

For this question lets assume there are two servers, ServerA and ServerB, and there is a linked server setup on ServerA to ServerB. Let's also assume I have REMOTE_PROC_TRANSACTIONS set to ON for both ...
J.D.'s user avatar
  • 39.5k
0 votes
1 answer
204 views

Choosing between NoSQL and Relational databases while having both flexibility and consistency requirements [closed]

I've never worked with databases professionally and only toyed with database coding using a small sqlite db for my own music collection. Now I'm asked to build an internal database system at work for ...
kakyo's user avatar
  • 111
4 votes
3 answers
592 views

Inconsistency in Relational Databases

I generally get confused when the term consistency is used. NoSQL tutorials always refer to the reads whereas Relational tutorials refer to a consistent state (ensuring referential integrity ...
vvs14's user avatar
  • 161
0 votes
1 answer
630 views

Consistency of data between two databases on different server

I have to guarantee consistency of data stored in two databases installed on different servers. The first one is a MySQL database and the second is a SQL Server database. Data properties are not the ...
Karine's user avatar
  • 109
1 vote
0 answers
97 views

The overhead of OCC validation phase

The validation phase of optimistic concurrency control has two derctions: one is backward validation, checking for conflicts with any previously validated transaction, the other is forward validation, ...
Hovin's user avatar
  • 41
1 vote
3 answers
700 views

What is the difference between concurrency control in operating systems and in trasactional databases?

Recently I'm learning concurrency control techniques in transactional databases. However, I am so confused about the differences between concurrency control in operating systems and in transactional ...
Hovin's user avatar
  • 41
2 votes
1 answer
851 views

CAP Theorem and MySQL

There's a CAP Theorem: R + W > N. Let's say I have W=1 (master), R = 6 (slaves), N = 6, so one slave can write and read. As the theorem says we could be sure in strong consistency (we always will ...
Alex Yeremenko's user avatar
1 vote
1 answer
289 views

How to avoid errors in server log when conflict fails within a transaction before retry?

We have a table such as create table pages ( id uuid primary key not null, parent_id uuid not null references pages(id), shortname text not null, shorturl text not null, constraint ...
Mikko Rantalainen's user avatar
0 votes
1 answer
39 views

How can I generate a consistent entity graph (say from 10 tables) from a database fetch

Suppose I have many tables in a database that need to be joined together to get a single consistent view of the entire entity graph. Am I forced to do this as a single query? I don't care about locks, ...
Newbie Guest's user avatar
5 votes
1 answer
795 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 ...
viator's user avatar
  • 151
1 vote
1 answer
161 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 ...
The Quantum Physicist's user avatar
7 votes
4 answers
3k 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 ...
user174739's user avatar
2 votes
1 answer
78 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 ...
Vishal Sharma's user avatar
1 vote
3 answers
318 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 ...
thousandsofthem's user avatar
0 votes
2 answers
801 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 ...
user3198603's user avatar
5 votes
1 answer
3k 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 ...
user3198603's user avatar
2 votes
1 answer
2k views

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

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 ...
Daniel Marques's user avatar
1 vote
1 answer
3k 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 ...
Jack0fshad0ws's user avatar
1 vote
1 answer
924 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 ...
Sam's user avatar
  • 113
5 votes
1 answer
382 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? ...
user3497697's user avatar
1 vote
0 answers
846 views

Database consistency errors [closed]

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 ...
user1587600's user avatar
4 votes
2 answers
5k 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–...
Sybil's user avatar
  • 2,558
1 vote
3 answers
2k 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 ...
Phil W.'s user avatar
  • 11
2 votes
1 answer
84 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 ...
Little Alien's user avatar
10 votes
2 answers
2k 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 ...
Little Alien's user avatar
3 votes
1 answer
725 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 ...
Sybil's user avatar
  • 2,558
5 votes
4 answers
46k 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 ...
user3688698's user avatar
8 votes
1 answer
714 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, ...
kakabomba's user avatar
  • 183
4 votes
2 answers
1k 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. ...
Valentin Tihomirov's user avatar
1 vote
0 answers
53 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 ...
Hard worker's user avatar
11 votes
2 answers
35k 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 ...
geographika's user avatar
1 vote
0 answers
361 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 ...
Dr.Haribo's user avatar
  • 111
1 vote
1 answer
421 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(...
jcho360's user avatar
  • 2,009