ODBC Server Reference Manual
Architecture Overview
HP NonStop ODBC Server Reference Manual—429151-002
2-26
NonStop ODBC Server Catalogs
Think of ZNUOBJ as an extension of TABLES. ZNUOBJ has a column N_OBJNAME
(NonStop SQL/MP object name) that contains the same entries as TABLENAME in
TABLES. Joining the two tables on these columns gives the “extended TABLES” table.
A row of SYSOBJECTS is built by taking columns from a join row. Columns for
SYSOBJECTS are selected from TABLES when possible; otherwise, they are selected
from ZNUOBJ. The table NAME (A#_#TABLE) is taken from ZNUOBJ. The table TYPE
(U for user table) is also taken from ZNUOBJ. The CRDATE (creation date) is taken
from TABLES, but it must be converted to the correct format. The USERSTAT column
has no meaning on a NonStop server, so it is always set to the constant -1.
The following example illustrates the NonStop SQL/MP CREATE VIEW statement used
to create the view ZVUOBJ. When NOSUTIL customizes a NonStop SQL/MP catalog,
it issues this NonStop SQL/MP statement. NOSUTIL also inserts a record into
ZNUOBJ (using a NonStop SQL/MP INSERT statement) that maps the TSQL table
name SYSOBJECTS to ZVUOBJ.
CREATE VIEW ZVUOBJ (NAME, TYPE, CRDATE, USERSTAT, ...) AS
SELECT
T_OBJNAME, T_OBJTYPE CONVERTTIMESTAMP(CREATETIME), -1,...
FROM TABLES, ZNUOBJ
WHERE TABLES.TABLENAME = ZNUOBJ.N_OBJNAME;
This example reflects the basic techniques used to support all client catalogs.
Figure 2-21. Support of TSQL Catalog SYSOBJECTS
Join on "="
T_OBJNAME T_OBJTYPE N_OBJNAME
$V.S.MYT U ORDERS
TABLENAME CREATETIME TYPE
8213545332 TA $V.S.MYT
NAME TYPE
CRDATE
USERSTAT
ORDERS
U 1993-10-11:12:02.23455 -1
ZVUOBJ
SYSOBJECTS
ZNUOBJ
TABLES
VST025.vsd