The Alternate Names feature for both database objects and their fields lets completely substitute real names of objects for clearer descriptive names. User-friendly names let simplify understanding of database structure by end-users. 'Complete substitution' means replacement of objects names in both user interface, SQL expressions as well as in the query text which can be edited by end user together with visual query building. Active Query Builder lets assign an alternate name to every object and field loaded to the Metadata Container.
You can get the SQL query text either with real or alternate names at any time. The UseAltNames property of PlainTextSQLBuilder component determines which names to use. Whereas several PlainTextSQLBuilder components might be connected to one QueryBuilder component, you can get both variants of the query text simultaneously: one for the end-user and another for executing a query against the database server. On parsing a query, the component can recognize both real and alternate names of fields, so the user can read and edit both variants of the query.
You can set them via the "alt_name" tag of fields and objects in the saved metadata XML file (manually using the or with the help of the metadata editor).
- You can set them using the QueryBuilder.MetadataContainer MetadataObjectLoaded (for objects) and ObjectMetadataLoaded (for fields) events during their load to the Metadata Container. For example, you can use object descriptions loaded from the database as alternate names.