Naming Conventions for Generated Views

Meta Data Services Programming

Meta Data Services Programming

Naming Conventions for Generated Views

When you generate views, you can either specify a name through your application code or you can allow the repository engine to specify a default view name. View names must conform to certain guidelines.

View names can have a maximum length of 128 characters. View column names can have a maximum length of 118 characters.

SQL keywords are allowed for view names and view column names.

Note  If a view name exceeds 128 characters and it is not prefixed, the view name will be truncated to 128 characters.

Name Composition

View names are composite names, formed from a base view name and a prefix.

The base view name can be provided by your application code and stored in a repository database. If no view name is provided, a default base name is created from the name of the class, interface, or relationship on which the view is based. Default names are not stored in a repository database.

If you generate two or more kinds of view, the repository engine adds a prefix to distinguish the kind of view (class, interface, or junction-table) and whether it is resolved.

Prefix Composition

Prefixes are six characters in length, composed of view type and view resolution indicators. Prefixes are added only when it is necessary to distinguish between kinds of views. If you generate one view for each class, interface, or relationship, no prefix is created. If you generate two views for each class, interface, or relationship, one of the views will be prefixed. If you generate three views, two of the views will be prefixed.

Prefixes are assigned based on priority. The following table indicates how priority rotates depending on the kinds of views that are generated. A Workspace view is always priority 1 if it is generated, and it is never prefixed. If a Workspace view is not generated, priority 1 shifts to Version Resolved. If neither a Workspace view nor a Version Resolved view is generated, priority 1 shifts to Version Unresolved.

Workspace Version Resolved Version Unresolved
Priority 1 (not prefixed) Priority 2 (prefixed) Priority 3 (prefixed)
Priority 1 (not prefixed)   Priority 2 (prefixed)
  Priority 1 (not prefixed) Priority 2 (prefixed)
    Priority 1 (not prefixed)

The following table describes each component of the prefix.

Prefix component Description
RVw Indicates a repository view.
C, I, or J Indicates a class view, interface view, or junction-table view.
R or N Indicates whether a view is resolved (R) for multiple versions, or not resolved (N).
_ Separates the prefix from the base name.

View Name Example

The following table shows the combined base name and prefix for each view type, for each kind of view you can generate.

View type Workspace Version Resolved Version Unresolved
Class MyClassViewName RVwCR_MyClassViewName RVwCN_MyClassViewName
Interface MyIFaceViewName RVwIR_MyIFaceViewName RVwIN_MyIFaceViewName
Junction-Table MyRelshipViewName RVwJR_MyRelshipViewName RVwJN_MyRelshipViewName

See Also

Generating Views

Defining Views in an Information Model

RTblIfaceDefs SQL Tables

RTblRelshipDefs SQL Tables