Questions tagged [data-integrity]

taking steps to ensure that data will not be accidentally or maliciously changed or altered, or verifying whether data has already been changed in such a way. Use this tag for questions about checking whether data has been tampered with; keeping data safe and unchanged; keeping data in sync; or properly cleaning up after data changes.

data-integrity
Filter by
Sorted by
Tagged with
279 votes
38 answers
129k views

What's wrong with foreign keys?

I remember hearing Joel Spolsky mention in podcast 014 that he'd barely ever used a foreign key (if I remember correctly). However, to me they seem pretty vital to avoid duplication and subsequent ...
16 votes
1 answer
40k views

How to perform checksums during a SFTP file transfer for data integrity?

I have a requirement to perform checksum (for data integrity) for SFTP. I was hoping this could be done during the SFTP file transfer - I realize this could be product dependent (FYI: using CLEO ...
user278458's user avatar
14 votes
2 answers
9k views

NoSQL Database for Online Money Transaction Management? [closed]

I am planning to use a NoSQL database like MongoDB as the back-end for my web product. For design concept, there would be around daily minimum 1,000 users. I have doubts: I have read in a blog that ...
Akamad007's user avatar
  • 1,571
4 votes
3 answers
3k views

What is the purpose of Firebase AppCheck?

I want to improve the security of my application and I'm looking into the Firebase App Check service which ensures that all requests made to the server come from my application. Only in Firebase ...
Marwan Tragha's user avatar
13 votes
4 answers
78k views

Can Foreign Key be null? [duplicate]

In our database project we have a table Sale that has an primary key and two exclusive foreign keys: Vehicle_ID and Piece_ID . For example if we sell a vehicle we need Vehicle_ID as a foreign key ...
notfound90's user avatar
2 votes
4 answers
15k views

How to overcome Netezza's lack of unique constraint/referential integrity enforcement?

It appears that the lack of support for enforcing 2 basic constraints (unique and foreign key), is a reason for loss of many man-hours debugging and troubleshooting difficult problems. What starts as ...
ihadanny's user avatar
  • 4,407
58 votes
11 answers
30k views

File containing its own checksum

Is it possible to create a file that will contain its own checksum (MD5, SHA1, whatever)? And to upset jokers I mean checksum in plain, not function calculating it.
zakovyrya's user avatar
  • 9,639
21 votes
3 answers
4k views

Which git commands perform integrity checks?

Trying to determine how quickly a user would be warned of corruption in the object database with git-1.7.4.1, I pulled a one-bit switcheroo: $ git init repo Initialized empty Git repository in /tmp/...
Greg Bacon's user avatar
  • 137k
4 votes
5 answers
4k views

Prevent two users from editing the same data

I have seen a feature in different web applications including Wordpress (not sure?) that warns a user if he/she opens an article/post/page/whatever from the database, while someone else is editing the ...
Industrial's user avatar
  • 42.2k
21 votes
3 answers
2k views

Deletions in a many-to-many structure

I just want to check really quickly. Say I have two entities in a data model: Catalog, and Product. They have a many-to-many relationship with each other, and both are required (a Catalog must have ...
Apophenia Overload's user avatar
19 votes
9 answers
2k views

C++ Is private really private?

I was trying out the validity of private access specifier in C++. Here goes: Interface: // class_A.h class A { public: void printX(); private: void actualPrintX(); int x; }; ...
legends2k's user avatar
  • 32.3k
13 votes
2 answers
21k views

Does TLS ensure message integrity and confidentiality of data transmission in a RESTful Java enterprise

I want to apply web service security according to OWASP Web Service Security. Thereby I stumbled over the two points: Message Integrity Message Confidentiality So far there is just a RESTful service ...
My-Name-Is's user avatar
  • 4,872
7 votes
1 answer
5k views

column not null deferrable

In Oracle deferred constraints are checked only at the point of commit. What is the meaning of DEFERRABLE clause in a case of NOT NULL constraint? For example create table test(a number not null ...
Oleg Pavliv's user avatar
  • 20.8k
6 votes
1 answer
3k views

How to move object from Amazon S3 to Glacier with Vault Locked enabled?

I'm looking for a solution for moving Amazon S3 objects to Glacier with Vault Lock enabled (like described here https://aws.amazon.com/blogs/aws/glacier-vault-lock/). I'd like to use Amazon built in ...
Joosep Simm's user avatar
6 votes
2 answers
3k views

Cassandra is configured to lose 10 seconds of data by default?

As the data in the Commitlog is flushed to the disk periodically after every 10 seconds by default (controlled by commitlog_sync_period_in_ms), so if all replicas crash within 10 seconds, will I lose ...
Aliaksandr Kazlou's user avatar
5 votes
3 answers
276 views

Repeated parameter checks in functions

I often have call hierarchies in that all methods need the same parameters. If I dont't want to put them on the instance level (member of the class) then I ask me always if its meaningfull to check ...
HCL's user avatar
  • 36.5k
4 votes
2 answers
6k views

SQL Server: How to ignore referential integrity until COMMIT?

i have a process to move rows from one database to another. Because of some circular foreign key reference chains i cannot remove the rows from the old database, nor can i insert them into the new ...
Ian Boyd's user avatar
  • 252k
4 votes
2 answers
2k views

Checking rule violations before deleting a record

I would like to implement a "soft-delete" scheme for a number of entities in my SQL Server 2005 database. By this, I mean I would like to delete an row from a table if there are no referential ...
Brad Leach's user avatar
  • 16.9k
4 votes
1 answer
113 views

How to Ensure Integrity and Origin of Client-Generated Data in Mobile App?

I'm developing a mobile application where one of the core functionalities involves the client sending travel distance and travel start and end times to the server. Due to the nature of my business ...
Mason's user avatar
  • 177
4 votes
1 answer
886 views

Does a git commit hash equal a repository state?

Each git commit is attributed a hash which "signs" its content. Does it also sign where the commit came from or is it just the commit data itself which is used for the hash calculation? Differently ...
PhilLab's user avatar
  • 4,937
4 votes
1 answer
1k views

How to verify a git merge contains no extra changes?

In git, how do I verify that a merge upstream master commit does not contain any additional diffs? Say I want to verify that the person didn't do anything 'sneaky' besides actually merge the changes ...
culix's user avatar
  • 10.4k
4 votes
7 answers
4k views

Opening Hours Database Design

We are currently developing an application in which multiple entities have associated opening hours. Opening hours may span multiple days, or may be contained within a single day. Ex. Opens Monday at ...
DEHAAS's user avatar
  • 1,294
2 votes
2 answers
607 views

Add object and its relationships atomically in SQL Server database

Suppose I want to insert a new Experiment in my SQL Server database, using Entity framework 4.0: Experiment has 1..* Tasks in it Both Experiment and Task derive from EntityObject Also, there is a ...
sthiers's user avatar
  • 3,509
2 votes
0 answers
158 views

Should server side dto validation validate the existance of data or the integrity?

So far I have always validated my dto`s properties for existing values, min, max, length etc.. Now I have a usecase with my http api where the payload of a http post contains Ids (database foreign ...
Pascal's user avatar
  • 12.6k
2 votes
1 answer
3k views

Why does this select for update example work?

I'm running some simple scripts to test possible solutions for an integrity problem I'm solving. Suppose I have a table my_table |foo | |1 | And I have these two snippets: // db_slow.php &...
Raekye's user avatar
  • 5,101
2 votes
3 answers
472 views

migrate the large data from xml file to the database

Q: I face the following problem two weeks ago , and i don't know how to handle it taking the performance issues , the data integrity in consideration. What I do is: I wanna to migrate the data from ...
Anyname Donotcare's user avatar
2 votes
3 answers
5k views

What is Relational Integrity [closed]

In the question How to Set Up Primary Keys in a Relation, PerformanceDBA talked about Relational Integrity and pointed out that it is different from Referential Integrity. I have heard of Referential ...
dzhu's user avatar
  • 793
2 votes
1 answer
673 views

Integrity check of whole Inno Setup installer

We use Inno Setup for our installer. Recently a user reported the following error during installation: An error occurred while trying to copy a file: the source file is corrupted This was due to a ...
StayOnTarget's user avatar
  • 12.4k
2 votes
1 answer
2k views

Can the data=journal mode of EXT4 avoid user data loss?

journal mode data=journal mode provides full data and metadata journaling. All new data is written to the journal first, and then to its final location. In the event of a crash, the journal can be ...
benqwu's user avatar
  • 21
1 vote
1 answer
2k views

MySQL character encoding change. Is data integrity preserved?

I will have to convert the database encoding from latin-1 to utf-8. I'm aware of the fact that converting the database is done via the command of ALTER DATABASE db_name [[DEFAULT] CHARACTER SET ...
Lajos Arpad's user avatar
  • 70.1k
1 vote
1 answer
387 views

How to provide constraint to an associative table relating to two source tables with a common foreign key?

Example scenario. In a flight schedule system, there are a pilot table which refers to a plane_type table indicating the planes the pilot is able to fly (assuming that is a many-to-one relation). ...
CY T's user avatar
  • 79
1 vote
1 answer
1k views

"Source file corrupted: SHA-1 hash mismatch" error from Inno Setup

While installing an application on Windows 2008, I get the below problem in the middle of installation: Source file corrupted: SHA-1 hash mismatch. Here's the section of the log file. 2013-01-28 21:...
user1752602's user avatar
1 vote
2 answers
583 views

How to enforce foreign key constraint from unrelated tables in Mysql?

this is my DB structure. this is the script I used to create the tables use for_stkoverflow; CREATE TABLE UserGroup ( groupid MEDIUMINT NOT NULL AUTO_INCREMENT, groupname VARCHAR(100), ...
Ananda's user avatar
  • 888
1 vote
1 answer
436 views

Multiple ViewModels request same domain object, should I give them the same/different instance(s)?

newbie here, sorry if this is an obvious question, and sorry for my English. I tried to Google but didn't find an answer to my question. I'm using Visual Studio, Autofac, EF CTP5 code only (maybe ...
user avatar
0 votes
1 answer
155 views

tools for downloading software + automatically verifying integrity

(moved here from a combined question) I'm wondering if there are any software tools projects to: create a standard machine-readable format for publishing a small metadata set = (download link + MD5 ...
Jason S's user avatar
  • 187k
0 votes
1 answer
121 views

Data integrity question when collecting STDOUTs from multiple remote hosts over SSH

Suppose you run the following commands: ssh $host1 'while [ 1 ]; do sleep 1; echo "Hello from $HOSTNAME"; done' > /tmp/output ssh $host2 'while [ 1 ]; do sleep 1; echo "Hello from $HOSTNAME"; done' >>...
OTZ's user avatar
  • 3,053