Enumerations from Database
If you start modeling from an existing database
and you have static enumerations stored in existing tables, then you
can import their data as model enumerations using this generator instead of manually defining those
enumerations and their values.
Those tables should have a general dictionary structure, and you can have dedicated
tables for individual enumerations or a generic system dictionary for storing multiple
enumerations. You can also store any specific additional properties as columns on
the dictionary table or arbitrary properties as a generic child table of the dictionary
All of those tables should be represented by corresponding objects in your Xomega
model that are configured to store enumerations as appropriate before you can run
the generator. After you import enumerations from existing tables, you can enhance
them by defining additional properties or extend other enumerations from them.
Maintaining static enumerations in the model provides for better version control
and allows generating other artifacts from them. If you make any updates to those
enumerations, you can always generate a SQL script to reload the data back into
the original tables.
The following topics provide more details and step-by-step instructions for this
generator and the related tasks.