In the real world, however, and particularly if the real world includes programmers using ‘Dynamic SQL’, or data feeds into tables and so on, then they are a vital defence for the integrity of your data.There are several different ways of putting constraints and checks on data, and the purpose of this workshop is just to point out the odd quirk that might be of practical help, whilst running through the list.Yammer not only develops new features, but is continuously looking for ways to improving existing ones.Like many software companies, Yammer frequently tests these features before releasing them to all of thier customers.Rules are the best way of ensuring that business rules, especially those that are liable to change, are implemented in one place only.As mentioned above, Rules are considered deprecated in SQL Server 2005.BOL gives the mysterious advice to use Check constraints instead, as if the two devices had the same functionality.Rules are used to check data that is being inserted or updated in columns.
Would you refuse to wear a seatbelt, on hearing that a better design was due in four years time?
(With triggers, you can either roll back or continue the transaction, depending on how you handle referential integrity.) Nevertheless they are the most commonly used constraint and simple to define and alter. A unique index checks that all data in the column is unique when it is created and also when an insert or update is attempted.
You cannot create a unique index on a column that contains null values in more than one row – an error is, obviously, triggered.
However there is nothing yet that replaces the functionality they provide until Domains are properly implemented.
One should be aware of possible problems when upgrading.