» Data Integrity
» Database Progra...
» Denormalization (RSS)
Sorry, but there are no more tags available to filter with.
Calculating running totals is notoriously slow, whether you
do it with a cursor or with a triangular join. It is very tempting to denormalize,
to store running totals in a column, especially if you select it frequently.
However, as usual when you denormalize, you need to guarantee the integrity of
your denormalized data. Fortunately, you can ...
You cannot use CHECK constraints to compare columns in different
rows or in different tables, unless you wrap such functionality in scalar UDFs
invoked form a CHECK constraint. What if you actually need to compare columns
in different rows or in different tables to enforce a business rule? For
example, suppose that you know working hours of ...