skip to main content
OpenEdge Data Management: DataServer for ODBC
Programming Considerations : Database design issues : Naming conventions
 

Naming conventions

When planning for maximum transparency across OpenEdge databases and ODBC data sources, be sure to consider the restrictions that each places on naming data-source objects when you perform a OpenEdge-to-ODBC conversion. The following table describes these restrictions, and the notes that follow it discuss how the DataServer resolves differences between OpenEdge and ODBC naming conventions.
Table 5. OpenEdge database and ODBC data-source naming restriction
Category
OpenEdge
DB2 UDB
Sybase
Alphanumeric characters
A-Z or a-z 0-9
A-Z or a-z 0-91
All alphanumeric characters from the character set that you defined for your Sybase database
Special characters
Allows $, &, #, %, –, and 2
Allows @, $, #, and _3
Allows @, $, #, _, ¥, and £4
Initial character
Alphabetic only
Alphabetic only
Alphabetic only
Maximum length of object name
32 characters
18 characters
24 characters 5
Keywords
Not allowed6
Not allowed7
Not allowed8
Unique table names
Required9
Required10
Required11

1 In a DB2 UDB schema, lowercase letters in object names are converted to uppercase letters.

2 In a DB2 UDB schema, lowercase letters in object names are converted to uppercase letters.

3 When the DataServer encounters characters not supported by OpenEdge in a table, index, or field name, it converts them to underscores ( _ ) in the schema holder. For example, the data-source table name emp@status becomes emp_status in the schema holder. If the unsupported character is at the beginning of an object name, the DataServer substitutes a lowercase z. Also, the DataServer strips @ symbols from stored procedure parameter names.

4 When the DataServer encounters characters not supported by OpenEdge in a table, index, or field name, it converts them to underscores ( _ ) in the schema holder. For example, the data-source table name emp@status becomes emp_status in the schema holder. If the unsupported character is at the beginning of an object name, the DataServer substitutes a lowercase z. Also, the DataServer strips @ symbols from stored procedure parameter names.

5 Object names in these data sources are limited by the data source to 30 characters. When you use the Progress-to-ODBC utility to perform a database conversion, however, the utility truncates object names to 24 characters in order to accommodate the suffix characters that it appends when it finds nonunique names, reused OpenEdge keywords, array fields, sequences, triggers, and so forth. If you intend to use the OpenEdge-to-ODBC utility, be sure to limit object names to 24 characters to accommodate this name resolution during conversion.

6 OpenEdge databases and most ODBC data sources contain restrictions against using keywords as database object names. If a data source object name consists of an OpenEdge keyword, the DataServer appends an underscore character ( _ ) to the name. For example, an object named "each" becomes "each_"

7 OpenEdge databases and most ODBC data sources contain restrictions against using keywords as database object names. If a data source object name consists of an OpenEdge keyword, the DataServer appends an underscore character ( _ ) to the name. For example, an object named "each" becomes "each_"

8 OpenEdge databases and most ODBC data sources contain restrictions against using keywords as database object names. If a data source object name consists of an OpenEdge keyword, the DataServer appends an underscore character ( _ ) to the name. For example, an object named "each" becomes "each_"

9 DB2 UDB and Sybase qualify nonunique table names to make them unique (see your data-source documentation for details); however, OpenEdge still regards these qualified names as nonunique. The DataServer resolves nonunique table names for you. When OpenEdge encounters matching table names while creating or updating a schema holder, it names the second and subsequent tables table-1, table-2, etc. For example, if OpenEdge encounters a table named lee.employee (the employee table owned by the user lee) that is the second instance of the name in the data source, it names the corresponding table in the schema holder employee-1.
Note: When resolving naming conventions, the DataServer can append up to three characters to an object name: two in the case of a nonunique name and one in the case of an OpenEdge keyword. Therefore, you should limit your object names to 29 characters so that you do not exceed the OpenEdge 32-character limit for object names in the schema holder. Note that object-name length limit for some data sources (for example, DB2 UDB) is low enough that you are unlikely to exceed the OpenEdge 32-character limit.

10 DB2 UDB allows you to qualify an object name by adding the following:
*Data-source instance name
*Owner's name
*Table name (for columns)

11 Sybase allows you to qualify an object name by adding the following: - Database name - Owner's name - Table name (for columns)