I
I
Ivan Melnikov2019-10-25 11:20:26
Database design
Ivan Melnikov, 2019-10-25 11:20:26

Is there a consensus on where to check constraint: on the database side or in the application code?

Logically, restrictions on possible data values ​​are part of the data model that is implemented in a particular schema. It turns out that it is more correct to produce a check constraint on the database side.
Is it so? Maybe there is another point of view?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Shumov, 2019-10-25
@inoise

There is depends on the system and requirements. There will be no unequivocal answer because everything is always trade-off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question