Temporal constraints
Depending on the business problem you are solving, you might need to implement many temporal constraints. Remember that for application time, SQL Server does not help you much. You need to implement the constraints in your code, using SQL Server declarative constraints where possible. However, most of the constraints you need to implement through custom code, either in triggers or in stored procedures, or even in the application code.
Imagine the Suppliers table example. One supplier can appear multiple times in the table because the same supplier could be under contract for separate periods of time. For example, you could have two tuples like this in the relation with the shortened header Suppliers (supplierid, companyname ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access