Naming Conventions
Names must always be unique within a scope. The scope varies depending on the object. Within a repository, information model names (that is, repository type library names) cannot repeat. Within an information model, class, interface, and relationship names cannot repeat. Similarly, within an interface, property, collection, and method names cannot repeat. Also, within a collection that supports unique naming, object names cannot repeat.
When you create a new information model, choose your names carefully. Otherwise, you may encounter name duplication problems later on if you decide to share information models. One way to avoid name confusion is by using a distinctive prefix on all of your names. An information model name provides an obvious solution. For example, if you are using the Open Information Model (OIM), you can use the subject area names such as Database Schema (or DBSchema) as a prefix.
In addition to unique constraints, the following naming conventions apply to Repository Type Information (RTIM) objects and relationships:
- The name cannot be a reserved SQL or MIDL keyword. Generally, you should avoid any word that is reserved by a DBMS.
- Names can be a maximum of 249 characters in length.
- Any alphanumeric character can be used in the name.
- For object instance names, you can define a name that contains leading or trailing spaces. It can also be an empty string. If the name is all spaces, it is treated as an empty string.
Spaces within a name are allowed because COM supports it. However, if you include spaces in an interface definition name, you will get an error when you subsequently define properties on that interface.
See Also
Naming and Unique-Naming Collections