NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.0+)
e
s
AsciiStream
n n n n n n s n R R n n n
UnicodeStream
n n n n n n n n n n n n n
BinaryStream
n n n n n n n n n n n n n
Object
s s s s s s s s s s n n n
Legend
R.
Recommended
s.
Supported
n.
Not supported for current release
Referring to Database Objects
By default, the SQL/MP driver uses Guardian filenames for SQL/MP database objects, as the following table shows.
Default SQL/MP Database Object Names
Database Object Default Name * Examples
Catalog
[\node.][$volume.]subvol $sqldata.sales
\tokyo.$disk02.sqlcat
Index
[\node.][[$volume.]subvol.]fileID
emptab
$sqldisk.fy97.xsalary
\newyork.$sqldisk.fy97.salary
Table
* If you omit node, volume, or subvol, the SQL/MP driver uses your current node, volume, or subvolume to fully qualify the database
object name. For more information, see the NonStop
TM
SQL/MP Reference Manual.
In your Java source code, you can always refer to SQL/MP database objects by their default Guardian filenames. In some
cases, you can also refer to them by names that you choose (aliases). Aliases are useful when you are porting an
application that can be used on SQL databases that have table names that do not conform to the table names used with
SQL/MP.
The following subsections explain:
When you can use aliases●
How to create and use aliases●
Which SQL statements support aliases●
When You Can Use Aliases
You can use aliases for the following SQL/MP database objects:
Catalogs●
Collations●
Tables (including table qualifiers for columns)●
Views●
If an SQL/MP database object is not in the preceding list, you must refer to it by its default Guardian filename.
Creating and Using Aliases
To create and use aliases, follow these steps:
Create a java.util.Properties object.1.
Put each alias-Guardian filename pair (called a substitution property) in the java.util.Properties object.
Prefix each alias with a plus sign (+). The individual put() calls for this step can be either in your program or in
a separate file.
2.