4 ms·
Do you mean that this kind of error can be prevented at the DB level? It is only possible in very trivial cases, like you know a man can't be pregnant. In the D
by olavk 14y ago
Do you mean that this kind of error can be prevented at the DB level? It is only possible in very trivial cases, like you know a man can't be pregnant. In the DB you can only ensure that data is internally consistent, not that the data entered corresponds to the real world facts, which is really the issue here.
- gaius 14y agoRight, no DB can enforce checks for things that could be true but aren't (e.g. a trigger can't prevent you from wrongly entering an adult woman as pregnant, she might even look pregnant to the eye and not be). But a DB can prevent you doing things that don't make sense (e.g. age must be a positive number, men can't be pregnant, etc etc).