Questions tagged [consistency]
33 questions
10
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
- 443
- 2
- 4
- 15
8
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
- 1
- 7
6
votes
3 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
- 61
- 3
6
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,…
kakabomba
- 163
- 4
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…
user3497697
- 51
- 1
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…
user3688698
- 69
- 1
- 1
- 4
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
3
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…
user3198603
- 339
- 4
- 13
3
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…
Josefine
- 2,158
- 3
- 28
- 55
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…
Josefine
- 2,158
- 3
- 28
- 55
2
votes
1 answer
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 servers.
According to Microsoft's BOL for BEGIN…
J.D.
- 22,196
- 3
- 34
- 78
2
votes
1 answer
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 get the newest value).
I read that data storage could…
Alex Yeremenko
- 23
- 3
2
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
- 121
- 4
2
votes
1 answer
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 are up and running. For e.g. If a cluster consisted…
Vishal Sharma
- 71
- 5
2
votes
1 answer
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 thing should be rolled back.
Does encapsulating…
Daniel Marques
- 123
- 1
- 3