Migrating Business Rules from Access to SQL Server

All of your business rules should be moved to the server. Primary and foreign key constraints are enforced through Declarative Referential Integrity or triggers. Unique constraints are enforced by a unique index. In Microsoft® Access, set the required property of a column to Yes to prevent a null value. In Microsoft SQL Server™, define a field as NOT NULL when the table is created by or uses a trigger.

The concepts of rules and defaults are the same in SQL Server as in Access, but are implemented differently. In SQL Server, rules and defaults are created apart from the table and then bound to it. One rule or default can be bound to many columns and many tables. In Access, rules and defaults do not have to be placed in the Access table. You can place them on fields in forms or perform more complex validations in code modules. However, if the rule is in the form, a user who enters a value into the table directly, without using the form, bypasses the validation rule and can enter invalid data. Make sure you identify all of the rules and defaults that should be migrated to SQL Server.

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.