Login
Language:
Currency:
VAT Mode:

Select Enumerated Tables


The sixth step in using the DOM Wizard is selecting which tables will be enumerated. Enumerations are data types based off static tables that make your generated code more self-documenting than the use of hard-coded values.

Enumerated tables are tables that are often thought of as "Lookup" tables. Enumerated tables should be static tables with few rows. Examples of enumerated tables might be Customer Types, Product Types, and Regions. These tables should have foreign keys back to a parent table to maintain your data integrity. Enumerating tables is beneficial because it helps the developer quickly assign values, makes code more readable, maintains data integrity and can improve performance by eliminating round trips to the database.

When you select a table from the available Enumerated Tables list, you will see the columns in that table appear to the right. The DOM Wizard will try to select the correct Number (integer) column for the enumeration. It will also try to select the correct Constant column for the enumeration. Of course, you should changes these values if the DOM Wizard has selected the wrong columns for your enumeration. The Number column may be a tinyint, int or bigint data type. The Constant column may be a char, nchar, varchar or nvarchar data type.

When you are done, click the Next button.

graphic