SQL/MP to SQL/MX Database and Application Migration Guide
Converting SQL/MP Tables to SQL/MX Tables
HP NonStop SQL/MP to NonStop SQL/MX Database and Application Migration Guide—666211-001
5-6
Database Object Names
A SQL/MX user catalog is a named logical object that contains descriptions of a set of
schemas. A user catalog can contain multiple schemas, each possibly owned by a
different user. A catalog cannot contain other catalogs. To access SQL/MX database
objects, use the three-part name (
catalog.schema.object) of the actual database
object.
NonStop SQL/MX uses ANSI-compliant CREATE and DROP statements to create and
drop schemas. Any user on a node can create a catalog on that node and can drop an
empty catalog on that node. For more information, see the
SQL/MX Reference Manual.
Database Object Names
SQL/MP data is stored in files with Guardian physical names. You specify Guardian
physical names when creating SQL/MP database objects. In SQL/MP applications, you
refer to SQL/MP database objects by their Guardian physical names or by DEFINE
names that map to the Guardian physical names.
In SQL/MX applications, you refer to SQL/MP database objects by their Guardian
physical names or by DEFINE names or SQL/MP aliases that map to the Guardian
physical names. SQL/MP aliases are three-part logical names of the form
catalog.schema.object that map to Guardian physical names. In SQL/MX,
catalog in a SQL/MP alias refers to an existing SQL/MX user catalog, and schema in
a SQL/MP alias refers to an existing SQL/MX user schema.
SQL/MX data is stored in files with Guardian physical names, but the files are
associated with external ANSI names. The ANSI name is a three-part logical name
consisting of the catalog, schema, and object name:
catalog.schema.object
You must use ANSI names when creating or referring to SQL/MX database objects.
You cannot use DEFINE names for SQL/MX database objects. To refer to SQL/MX
database objects, use unqualified or partially qualified names (that is, without catalog
or schema names), or use PROTOTYPE host variables. However, PROTOTYPE host
variables require you to include database object naming in the application logic. For
more information about database object names, see the
SQL/MX Reference Manual.
For more information about PROTOTYPE host variables, see the
SQL/MX
Programming Manual for C and COBOL
.
The namespace for SQL/MX database objects is organized hierarchically. Database
objects exist in schemas, which are themselves contained in catalogs. Catalogs are
collections of schemas. Schema names must be unique within a given catalog. Multiple
objects with the same name can exist in a schema provided that each name belongs to
a different namespace. NonStop SQL/MX supports various namespaces, such as table
value objects (tables, views, stored procedures, and SQL/MP aliases), indexes, and
triggers. For more information about namespaces, see the
SQL/MX Reference Manual.










