NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.1+)
without regard to whether the application commits or rolls back the transaction.
SQL Object Naming and Mapping
JDBC/MX supports two object name types for NonStop SQL objects: ANSI (the default type) and SHORTANSI.
JDBC/MX also supports Guardian names in SQL commands. SQL reserved words that are part of Guardian names
must appear in UPPER CASE and be enclosed in double quotation marks ("). For more information, see the Compaq
NonStop SQL/MX Reference Manual. Guardian names are not supported, however, in the catalog methods of the
DatabaseMetaData interface implementation; these methods allow only ANSI and SHORTANSI name types
ANSI Name Type
ANSI names (also called alias names) are logical names that map to the physical Guardian names of existing SQL/MP
objects; each SQL/MP object can have only one ANSI name. The ANSI type is the default name type. The name
format is as follows:
[[catalog.]schema.]object-name
ANSI names have a maximum of 200 characters (total for all three parts including the dots) and can support longer
object-names (table names) than the SHORTANSI names. To add ANSI alias names, use the MXCI command
CREATE SQLMP ALIAS command.
SHORTANSI Name Type
SHORTANSI names are the logical representations of physical name based on the catalog and location of SQL/MP
table names. SHORTANSI names can have a maximum of 8 characters for the object name. No mapping is needed to
use SHORTANSI names. The name format is as follows
[[SQL-catalog.]location-name.]object
where
SQL-catalog
is the catalog subvolume name of the object with "\" and "$" removed, and "." replaced with "_".
location-name
is the SQL object subvolume name with "\" and "$" removed, and "." replaced with "_".
object
is the eight-character Guardian name of the object.
Java applications can specify their name type preference using the system property nametype at run time, using the
-D option in the command line, as follows:
-Dnametype=nametype
where nametype is either ANSI or SHORTANSI.
Default Catalog and Schema
The default catalog and schema are used to access SQL objects referenced in SQL statements if the SQL objects are
not fully qualified. The syntax and semantics of the catalog and schema differ, based on name type.
For ANSI name type, the catalog and schema can be any arbitrary strings.
For SHORTANSI name type, the catalog is used only in case of DDL statements; it is ignored for DML statements.