Mystery of the Missing (foreign) Keys
-
A while back, I related the experience of losing FKs in a database, without having an inkling of what may have caused it. Various people came up with (reasonable) suggestions, like removing a constraint to facilitate adding records, or bulk inserts etc. However, I can now reveal the culprit. A product from a third party developer (who originally developed the system) that proceeded to go through the DB removing FKs without any attempt to reinstate them. The process was run a few months ago, luckily it looks like we only have a few cases of erroneous data resulting. This is a small miracle in itself.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
A while back, I related the experience of losing FKs in a database, without having an inkling of what may have caused it. Various people came up with (reasonable) suggestions, like removing a constraint to facilitate adding records, or bulk inserts etc. However, I can now reveal the culprit. A product from a third party developer (who originally developed the system) that proceeded to go through the DB removing FKs without any attempt to reinstate them. The process was run a few months ago, luckily it looks like we only have a few cases of erroneous data resulting. This is a small miracle in itself.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
Rob Grainger wrote:
However, I can now reveal the culprit. A product from a third party developer (who originally developed the system) that proceeded to go through the DB removing FKs without any attempt to reinstate them.
"Sir, we're getting primary key exceptions!" "Ah, just remove the constraints from their database, that'll fix it." Makes me wonder about liability :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
A while back, I related the experience of losing FKs in a database, without having an inkling of what may have caused it. Various people came up with (reasonable) suggestions, like removing a constraint to facilitate adding records, or bulk inserts etc. However, I can now reveal the culprit. A product from a third party developer (who originally developed the system) that proceeded to go through the DB removing FKs without any attempt to reinstate them. The process was run a few months ago, luckily it looks like we only have a few cases of erroneous data resulting. This is a small miracle in itself.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
And they would have gotten away with it too, if it weren't for you meddling kids!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
-
Rob Grainger wrote:
However, I can now reveal the culprit. A product from a third party developer (who originally developed the system) that proceeded to go through the DB removing FKs without any attempt to reinstate them.
"Sir, we're getting primary key exceptions!" "Ah, just remove the constraints from their database, that'll fix it." Makes me wonder about liability :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
"RDBMSs are inefficient - we can hand-roll our own referential integrity in code, using a couple of junior devs, in less than a week" - Every development shop ever.
KeithBarrow.net[^] - It might not be very good, but at least it is free!
-
"RDBMSs are inefficient - we can hand-roll our own referential integrity in code, using a couple of junior devs, in less than a week" - Every development shop ever.
KeithBarrow.net[^] - It might not be very good, but at least it is free!
Essential for a fully abstracted repository layer, but if you're already married to a persistence technology...
"There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli
-
A while back, I related the experience of losing FKs in a database, without having an inkling of what may have caused it. Various people came up with (reasonable) suggestions, like removing a constraint to facilitate adding records, or bulk inserts etc. However, I can now reveal the culprit. A product from a third party developer (who originally developed the system) that proceeded to go through the DB removing FKs without any attempt to reinstate them. The process was run a few months ago, luckily it looks like we only have a few cases of erroneous data resulting. This is a small miracle in itself.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
The application must not rely on such things for proper functioning!