12 ms·
Often, formalizing constraints as part of the table schema is not done because of the performance penalties of the checks required to enforce the constraints. I
by chacham15 9y ago
Often, formalizing constraints as part of the table schema is not done because of the performance penalties of the checks required to enforce the constraints. I.e. every insert to the database would also have to check that the foreign key relation existed. Some databases have options to turn off the checking, but a lot of people have gotten in the habit of just not doing it. Furthermore, if you have data in multiple places (redis/cassandra/mysql/hive/etc) this just becomes impossible even if you wanted to.
- deleted 9y ago[deleted]