A data entry rule ensures that the data entered into a column meets the criteria you specify. You can use rules to do the following:
•Prevent duplicate information from being entered. For example, a new stock number cannot be the same as an existing one.
•Verify that the data being entered corresponds with data elsewhere in the database. For example, the product stock number must exist in a table before you enter a sales transaction for the product.
•Prevent a row from being deleted if it corresponds with data elsewhere in the database. For example, if a transaction refers to a customer, the customer cannot be deleted from the customer table.
•Define a value range. For example, when you enter a salary, it must be between $15,000 and $50,000. You can either specify a maximum value, a minimum value, or a range of values.
When you enter or edit data, R:BASE checks the data you enter with the corresponding rules. If the conditions of a particular rule are not met, R:BASE displays the error message defined for that rule and does not add the row. You can turn the rules setting on or off; the RULES setting must be on for R:BASE to check them.
As you use and modify the tables in your database, you might need to revise the data entry rules. For example, if you rename a column or table used in the WHERE clause of a rule definition, you must update the rule to reflect the change.
You can delete rules that no longer apply to your database. For example, delete rules that are associated with a column you have deleted from a table.
See also: