3 ms·
I would certainly look to add not-null and uniqueness constraints, although you might find that by now your data is actually violating some of those constraints
by tragomaskhalos 9y ago
I would certainly look to add not-null and uniqueness constraints, although you might find that by now your data is actually violating some of those constraints!
A lot of people take the view that the application code is sufficient proof against bad data getting into your database, but this ignores (a) bugs and (b) back-door data loading, which in most applications will almost certainly be happening at some point.
The data in your database is the crown jewels (the application that fronts it is by comparison a piece of crap that you can replace at any time), so put guards on that gate ...