So I recently learned about ASSERTION in my databases course, and my prof noted that major databases don\'t support it, even though it is in the SQL-92 standard. I tried go
My 2 pennies:
Edit: what I mean is described in these links: Scalar UDFs wrapped in CHECK constraints are very slow and may fail for multirow updates and from Tony Rogerson
Performance: A 10k row insert would require 10k udf-style executions each with table access. Ouch. Given the ASSERTION is per row, then this is how it has to operate. If it could work for "all rows in the INSERT", then it's simpler as a trigger, no?
Design: There are patterns (superkey, subtype tables etc) for maintaining data integrity on related tables using simpler constraints. If you need to check some random table for data integrity I'd say you have something wrong...