SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-1
D
Data Dictionary
The SQL/MP data dictionary is the set of all the catalogs on a network, together with
the disk file labels for all the objects described in the catalogs.
A catalog is a set of tables and indexes that describes SQL/MP objects. For
information, see Catalogs on page C-8.
Disk file labels are stored in directories on disk volumes. Each disk volume has a
directory that contains one file label for each file on the volume. The label for a file that
contains an SQL/MP object includes the name of the object, the name of the catalog
that describes the object, and other information about the file. The label information
enables NonStop SQL/MP to open and operate on the file without accessing the
catalog.
Data Types
Each column in an SQL table is associated with a data type. You specify the data type
for a column when you create the column with the CREATE TABLE or ALTER TABLE
statement by using this syntax.
{ CHAR[ACTER] [VARYING] [(len)] [char-set] [UPSHIFT] }
{ [ COLLATE { collation | CHARACTER SET } ] }
{ }
{ PIC[TURE] X [(len)] [DISPLAY] [ char-set ] [UPSHIFT] }
{ [ COLLATE { collation | CHARACTER SET } ] }
{ }
{ VARCHAR[ACTER] [ ( len ) ] [ char-set ] [ UPSHIFT ] }
{ [ COLLATE { collation | CHARACTER SET } ] }
{ }
{ NATIONAL CHAR[ACTER] [ VARYING ] [ (len) ] }
{ }
{ NCHAR[ACTER] [ VARYING ] [ (len) ] }
{ }
{ NUMERIC [ (digits[,scale]) ] [ SIGNED | UNSIGNED ] }
{ }
{ {SMALLINT | INT[EGER] | LARGEINT } [SIGNED | UNSIGNED] }
{ }
{ {FLOAT [ ( precision ) ] | REAL | DOUBLE PRECISION } }
{ }
{ DEC[IMAL] ( digits[,scale] ) [ SIGNED | UNSIGNED ] }
{ }
{ PIC[TURE] [S]{ 9(integer) [ V[9(scale)] ] } }
{ { V9(scale) } }
{ [ DISPLAY [ SIGN IS LEADING ] ] }
{ [ COMP ] }
{ }