SQL/MX Quick Start (G06.24+, H06.03+)

HP NonStop SQL/MX Quick Start523724-002
9-1
9 Creating Database Objects
This section provides information about how to create and drop objects in your
database.
Database objects are created by issuing the Data Definition Language (DDL)
statements of SQL/MX. For more information on DDL statements, see the SQL/MX
Reference Manual.
Starting MXCI
You can create database objects by using MXCI, the SQL/MX conversational interface.
MXCI runs as an OSS process and must be started from within the OSS environment.
1. Log on to the server by using your user ID and password.
2. Start the OSS shell by entering the osh command at the TACL prompt.
3. Start MXCI by entering the mxci command at the TACL prompt:
>mxci
/G/SYSTEM/SYSTEM: mxci
Hewlett-Packard NonStop(TM) SQL/MX Conversational Interface
2.0 (c) Copyright 2003 Hewlett-Packard Development Company,
LP.
>>
You have started an MXCI session.
Creating a Catalog
Before you can create an SQL/MX table, you must first create a catalog and a schema
in which to store the definition of the table.
Example
Create a catalog named MYCAT on the current node and volume. At the MXCI prompt,
enter:
CREATE CATALOG MYCAT;
--- SQL operation complete.
SET CATALOG MYCAT;
--- SQL operation complete.
CREATE SCHEMA MYSCH;
--- SQL operation complete.
SET SCHEMA MYSCH;
--- SQL operation complete.