SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

Introduction
HP NonStop SQL/MX Reference Manual544517-008
1-25
Naming Objects
filename is the name of a Guardian disk file or the name of an SQL/MP table, view,
index, partition, collation, or program module.
For more information about Guardian name resolution, see Attribute Value NSK for
Guardian Names and Guardian Name Resolution on page 10-53.
Logical Names
To move toward full ANSI SQL:1999 compliance, NonStop SQL/MX provides support
for three-part logical object names of the form:
[[catalog.]schema.]name
In this three-part name, catalog is the first part of the name, schema is the second
part of the name, and table is the third part of the name. See Catalogs on page 6-3
and Schemas on page 6-102.
For more information about logical name resolution, see Attribute Value ANSI for
Logical Names on page 10-52.
Alias Mappings
To permit the use of logical names, a user table named OBJECTS stores alias names.
The MP_PARTITIONS table stores mappings from logical object names to physical
Guardian locations. See OBJECTS Table on page 10-19 and MP_PARTITIONS Table
on page 10-19.
To create the necessary mappings from logical to physical names, use the CREATE
SQLMP ALIAS statement:
CREATE SQLMP ALIAS catalog.schema.table
[\node.]$volume.subvol.filename
For the complete syntax and semantics, see CREATE SQLMP ALIAS Statement on
page 2-73.
To use ANSI names with the DDL Statements for the Sample Database on page D-3,
you must create an alias for each table that has been created.
For example, suppose that you have created the EMPLOYEE table with the physical
Guardian name $samdb.persnl.employee. To specify the logical name
samdbcat.persnl.employee for the employee table, enter:
CREATE SQLMP ALIAS samdbcat.persnl.employee
$samdb.persnl.employee;
DEFINE Names
NonStop SQL/MX supports the use of DEFINE names as logical names for tables,
views, or partitions in DML statements. When NonStop SQL/MX compiles such
statements, it replaces the DEFINE name (for example, =CUSTOMERS) in the