Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Initial Programming Considerations : Database design issues : Naming conventions
 

Naming conventions

When planning for maximum transparency across OpenEdge databases and MS SQL Server data sources, be sure to consider the restrictions that each places on naming data source objects when you perform a OpenEdge DB to MS SQL Server conversion. The following table describes these restrictions, and the notes that follow discuss how the DataServer resolves differences between OpenEdge and MS SQL Server database naming conventions.
Table 6. Database naming restrictions
Category
OpenEdge
MS SQL Server
Alphanumeric characters
A-Z or a-z 0-9
All alphanumeric characters from the character set that you defined for your MS SQL Server
Special characters
Allows $, &, #, %, -, and _1
Allows @, $, #, _, ¥, and £2
Initial character
Alphabetic only
Alphabetic only
Maximum length of object name
32 characters
24 characters3
Keywords
Not allowed4
Not allowed5
Unique table names
Required6
Required7

1 Although OpenEdge allows you to use the ampersand (&) in database-object names, the OpenEdge development tools use this character internally to denote preprocessor directives.

2 When the DataServer encounters characters not supported by OpenEdge in a sequence, table, index, or field name, it converts them to underscores ( _ ) in the data source. 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.

3 Object names are limited to 32 characters. When you use the OpenEdge DB to MS SQL Server 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, array fields, sequences, triggers, and so forth. If you intend to use the OpenEdge DB to MS SQL Server utility, be sure to limit object names to 24 characters to accommodate this name resolution during conversion.

4 OpenEdge and MS SQL Server databases 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_"

5 OpenEdge and MS SQL Server databases 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_"

6 MS SQL Server qualifies 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 as follows: 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.Keep in mind that 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.

7 MS SQL Server allows you to qualify an object name by adding the database name, the owner's name, or the table name (for columns).