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.

333 questions
279
votes
38 answers

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 data integrity problems throughout your database. Do…
ljs
  • 37,275
  • 36
  • 106
  • 124
58
votes
12 answers

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
  • 9,579
  • 6
  • 39
  • 28
21
votes
3 answers

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/repo/.git/ $ cd repo $ echo 'very important info'…
Greg Bacon
  • 134,834
  • 32
  • 188
  • 245
21
votes
3 answers

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 at least one Product, and all Products must each…
Apophenia Overload
  • 2,485
  • 3
  • 28
  • 46
20
votes
10 answers

How do you manage databases during development?

My development team of four people has been facing this issue for some time now: Sometimes we need to be working off the same set of data. So while we develop on our local computers, the dev database is connected to remotely. However, sometimes we…
user94154
  • 16,176
  • 20
  • 77
  • 116
19
votes
10 answers

Database constraints - keep or ignore?

When I was learning in university, they taught us the database fundamentals, basics and rules, and one of the most important rules is the constraints (primary key, foreign key), and how to make 1-m, 1-1, m-n relationships. Now when I move to real…
Anyname Donotcare
  • 11,113
  • 66
  • 219
  • 392
19
votes
9 answers

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; }; Implementation: // class_A.cpp void A::printX() { …
legends2k
  • 31,634
  • 25
  • 118
  • 222
18
votes
5 answers

C code that checksums itself *in ram*

I'm trying to get a ram-resident image to checksum itself, which is proving easier said than done. The code is first compiled on a cross development platform, generating an .elf output. A utility is used to strip out the binary image, and that image…
JustJeff
  • 12,640
  • 5
  • 49
  • 63
15
votes
1 answer

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 VLTrader), but was wondering if this is customary? …
user278458
  • 201
  • 1
  • 2
  • 5
14
votes
2 answers

NoSQL Database for Online Money Transaction Management?

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 NoSQL database are not so good for Online Money…
Akamad007
  • 1,551
  • 3
  • 22
  • 38
13
votes
1 answer

A suitable hash function to detect data corruption / check for data integrity?

What is the most suitable hash function for file integrity checking (checksums) to detect corruption? I need to consider the following: Wide range of file size (1 kb to 10GB+) Lots of different file types Large collection of files (+/-100 TB and…
links77
  • 133
  • 1
  • 4
13
votes
2 answers

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 which can be directly accessed by a client. For…
My-Name-Is
  • 4,814
  • 10
  • 44
  • 84
13
votes
4 answers

Can Foreign Key be null?

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 but not Piece_ID. Can we put NULL to Piece_ID,…
notfound90
  • 155
  • 1
  • 1
  • 8
12
votes
10 answers

Efficient alternatives for exposing a Collection

In C++, what alternatives do I have for exposing a collection, from the point of view of performance and data integrity? My problem is that I want to return an internal list of data to the caller, but I don't want to generate a copy. Thant leaves me…
axs6791
  • 687
  • 1
  • 6
  • 12
10
votes
0 answers

Data integrity check during upload to S3 with server side encryption

Data integrity check is something that the AWS Java SDK claims that it provides by default where either the client can calculate the object checksum on its own and add it as a header “Headers.CONTENT_MD5” in the S3 client or if we pass it as null or…
Abhishek Jain
  • 4,478
  • 8
  • 34
  • 51
1
2 3
22 23