Database object naming

You specify object names in the three-level form. You can use the standard form or the shorthand notation.

database-name.schema.object-name
The three-level or fully qualified form, which searches the specified database and schema for the object name.
database-name..object-name
If you use a fully qualified object name but you do not specify a schema, a form referred to as "dot dot" notation, the system must determine the schema value. For systems that run NPS releases before 7.0.3 or NPS 7.0.3 and later releases where the NPS databases are configured to support only one schema per database, the system uses the default and only schema of the database.

For NPS release 7.0.3 and later systems that support multiple schemas in a database, the system chooses the schema based on the enable_user_schema system setting and whether the specified database is the current database or a remote database. The following table shows how the system chooses the schema.

Table 1. Identifying the schema in a "dot dot" notation reference on multiple schema systems
enable_user_schema value Database Schema
True Current Current schema
Remote User's schema in remote database
False Current Current schema
Remote Default schema of the remote database
Note: The "dot dot" notation is often used in NPS releases before 7.0.3 where each database has only one schema. As a best practice, especially for NPS systems that support multiple schemas, always specify the schema and avoid the use of "dot dot" notation because of the interpretation of the schema value.
schema.object-name
The two-level form, which uses the current database as the database component, and searches the specified schema in the current database for the specified object name.
object-name
The single level form where the system searches the current database and current schema for the object.

When using existing scripts that contain two- and three-level names, note that the behavior of those scripts could change in Release 7.0.3 and later. For example, if you do not enable multiple schema support, the behavior is the same as for previous releases. If you enable multiple schema support, your scripts could display warnings or errors for incorrect schemas depending on the system configuration settings. For more information, see Schema support.