Questions tagged [consistency]

38 questions
11
votes
2 answers

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 FROM t ORDER BY Name ) as…
geographika
  • 533
  • 2
  • 4
  • 15
10
votes
2 answers

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 difference between the integrity and consistency? I…
Little Alien
  • 299
  • 1
  • 10
8
votes
1 answer

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, project_id=>Project.id,…
7
votes
4 answers

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 different categories of product. The system must be…
user174739
  • 71
  • 1
  • 3
5
votes
1 answer

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 specified somewhere in a standard? Or does it depend on…
viator
  • 151
  • 4
5
votes
1 answer

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 master ans two slaves. consider Write request…
5
votes
1 answer

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? Your database can be online while a backup to a…
5
votes
4 answers

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 pageid (expected 1:7753115; actual 0:0). It…
4
votes
3 answers

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 constraint) When the data is distributed across multiple…
vvs14
  • 161
  • 4
4
votes
2 answers

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–false expression) is expected to always be true at…
Sybil
  • 2,578
  • 6
  • 34
  • 61
4
votes
2 answers

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. Wikipedia article on consistency says that consistency…
3
votes
1 answer

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 synchronous replication is required, use NDB Cluster (see…
olaf
  • 143
  • 3
3
votes
1 answer

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 inherited. There are no non-corrupted backups of the…
Tom
  • 221
  • 2
  • 6
3
votes
1 answer

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 index using bulk…
Sybil
  • 2,578
  • 6
  • 34
  • 61
2
votes
1 answer

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 record, cause another transaction has updated…
1
2 3