3 ms·
Check constraints are just SQL expressions, so in pesudocode it would be something like: (SELECT COUNT(*) shape JOIN square JOIN circle) = 1 How convenien
by goto11 5y ago
Check constraints are just SQL expressions, so in pesudocode it would be something like:
(SELECT COUNT(*) shape JOIN square JOIN circle) = 1
How conveniently this can be expressed depend on the database system in question.
But if we are talking about adding features to SQL, it could have built-in support for such a constraint, just as there is built-in support for say foreign key constraints.