SQL/MP Installation and Management Guide
HP NonStop SQL/MP Installation and Management Guide—523353-004
5-1
5 Creating a Database
The task of creating an SQL/MP database consists of creating catalogs, tables, views,
indexes, collations, and constraints. Before you attempt these operations, however,
you should understand planning schemes and define the database layout, as
described in Section 3, Understanding and Planning Database Tables. You should
have already planned your security, TMF requirements, and recovery mechanisms as
described in Section 4, Planning Database Security and Recovery. Finally, you create
the database itself.
After you create the database, you can load data into the base tables, compile your
application programs, and perform database management operations.
This section includes security guidelines for object creation. The following user names
and corresponding user IDs are used in the examples.
Super.Super 255,255
Super.Operator 255,001
DBA.Super 001,255
DBA.Dev 001,100
DBA.Prod 001,200
Dev.MGR 100,255
Dev.User 100,001
Prod.MGR 200,255
Appl.MGR 250,255
Appl.User 250,001
Creating Catalogs
An SQL/MP catalog consists of information stored in a set of tables that are indexed for
quick access. When you create a catalog, you automatically create all its tables and
indexes.
Each node on which SQL/MP is used must have at least one catalog. Each table, view,
index, partition, collation, or catalog table located at a node must be described in a
catalog on the same node.
Each volume on a node can have one or more catalogs. A given catalog on a volume
can describe objects on any volume in the same node.
Each subvolume of a volume can have only one catalog. This catalog can describe
objects on the same subvolume, on another subvolume of the same volume, or on
another volume of the same node.
Each catalog has the same name as the subvolume on which it resides. Thus, if a
catalog resides on subvolume SUBV1 of volume $VOL1 on node \SYS1, the full name
of the catalog is \SYS1.$VOL1.SUBV1.
When you create a new catalog with the CREATE CATALOG statement, you must
have authority to write to the CATALOGS table of the system catalog in which all
catalogs on a system are registered.