SQL/MX Comparison Guide for SQL/MP Users
Data Definition Language (DDL) Differences
HP NonStop SQL/MX Comparison Guide for SQL/MP Users—523735-003
6-2
Organization of Catalogs and Schemas
collections of schemas. Schema names must be unique within a given catalog. Multiple
objects with the same name can exist provided that each belongs to a different
namespace. NonStop SQL/MX supports various types of namespaces. See “SQL/MX
Language Elements” in the SQL/MX Reference Manual for details about these
namespaces.
You reference SQL/MP database objects by using their Guardian physical names. To
allow for the use of ANSI logical names, NonStop SQL/MX creates a metadata table,
the OBJECTS table. This table is used to store object names. Mappings from logical
object names to physical Guardian locations are stored in the metadata table
MP_PARTITIONS.
Use the CREATE SQLMP ALIAS command within your application to create needed
mappings from logical to physical names. This command inserts a mapping as a row in
the OBJECTS table. SQL/MP aliases are true ANSI names that represent the
underlying Guardian physical names of SQL/MP objects, in which the catalog part
refers to an existing catalog and the schema part refers to an existing schema.
Organization of Catalogs and Schemas
NonStop SQL/MX and NonStop SQL/MP have different concepts of catalogs.
SQL/MX Catalogs
An SQL/MX catalog is a named logical object that contains descriptions of a set of
schemas. You can access SQL/MX objects with the three-part name of the actual
object.
A catalog can contain multiple schemas, each possibly owned by a different user. A
catalog cannot contain other catalogs. Any user on a node can create a catalog on that
node. Any user on a node can drop an empty catalog on that node. For more
information, see “SQL/MX Language Elements” in the SQL/MX Reference Manual.
NonStop SQL/MX uses ANSI-compliant CREATE and DROP statements to create and
drop catalogs and schemas. Note that catalog names beginning with
“NONSTOP_SQLMX_” are reserved for system metadata.
SQL/MP Catalogs
An SQL/MP catalog is a set of tables and indexes that describe SQL objects. Tables in
the set are called catalog tables and SQL creates them, along with their indexes, when
you execute a CREATE CATALOG statement. Each SQL/MP catalog (the set of
catalog tables and their indexes) resides on its own Guardian subvolume, and the
name of that subvolume is also the name of the catalog.
Each node on which SQL/MP is used has one special catalog called the system
catalog and might have many other catalogs. Each table, view, index, partition,
collation, or catalog table located on a node must be described in a catalog on the