Previous Topic: Accounting for Slowly Changing DimensionsNext Topic: Physical Storage Parameters for Tables


Tables and Validation Rules

You can attach a validation rule to a table, rather than a specific column, if the rule involves multiple columns. For example, in the physical model, you can attach a rule to the MOVIE_RENTAL_RECORD table to specify that the value entered in the rental_date column must be less than (come before) the value entered in the due_date column. To enforce this constraint, you can create a validation rule called Check-Date that creates the server expression: rental_date <= due_date. Using this rule, the server returns an error message if you try to enter a due date that comes before the rental date.