| | Joel on Software - Integrity constraint validation |
 | | You're quite free to implement your own integrity checks prior to trying to modify data, of course -- they'll be slower than letting the database do them, and you'll have to be careful about handling consistency issues ("It passed my check but then the data changed between the check and the attempted insert!"). |
 | | Clearly the fact that you are having such issues with constraint errors bubbling up to the UI implies that developers ARE NOT SMART ENOUGH or else their checks should have caught the issues before the database layer or their code should be able to show friendly error messages. |
 | | Database integrity checks are like exceptions - they should be a last ditch protection mechanism to _ensure_ that the data is clean (because the database and its data, in almost every project, is the longest living, most important part of the project), however they should almost never be triggered. |
| discuss.joelonsoftware.com /?joel.3.230257 (1883 words) |