THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » sql server » Transact SQL » Business rules   (RSS)
  • Two suggestions to enhance constraints in SQL Server

    We can tuck any logical expressions in CHECK constraints, but all foreign keys are currently capable of right now is to verify that one or more column values are equal. In many cases it would be very useful to have foreign keys use more complex logical expressions. Also in some cases the ability to create constraints on indexed views would ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on May 4, 2009
  • Using ROWVERSION to enforce business rules

    Suppose that you need to enforce the following business rule: contracts cannot be changed after you have started working on them (let us assume that that particular business operates in the perfect world).  You can use a ROWVERSION column, a persisted computed one, and a foreign key constraint to implement this rule, and I ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on April 28, 2009
Privacy Statement