skip to main content
Corticon Studio: Rule Modeling Guide : Building the Vocabulary : Custom Data Types : Enumerations : Enumerations retrieved from a database
 

Try Corticon Now
Enumerations retrieved from a database
If you want your custom data type to gets its enumerated labels and values from a database, then you need to define the database table and columns that will be accessed.
This topic covers the significant points of this feature in the context of the Vocabulary.
When your Vocabulary has a verified connection to a supported database, the Custom Data Types tab presents three additional columns, as shown:
Figure 17. Custom Data Type columns for defining database retrieval
These columns are how you specify:
*Lookup Table Name - The database syntax that specifies the table that has the enumerations.
*Labels Column - The column in the lookup table that holds the label. This is optional as you can elect to use only values.
*Values Column - The column in the lookup table that holds the value associated with the label, or the solitary value. This is required.
The following examples show two options:
Figure 18. SQL Server table with values to use in the Vocabulary
The value data is retrieved into the Vocabulary as highlighted:
Figure 19. Definition and retrieved values in the Corticon Studio
Another example retrieves name-value pairs.
Figure 20. SQL Server table with labels and values to use in the Vocabulary
The label-value data is retrieved into the Vocabulary as highlighted:
Figure 21. Definition and retrieved label-values in the Corticon Studio
Note: This functionality uses Corticon's Enterprise Data Connector. A section of the EDC tutorial covers this topic in detail, Importing an attribute's possible values from database tables