How Do I Create a Database? [ Up and Running with ALLBASE/SQL ] MPE/iX 5.0 Documentation
Up and Running with ALLBASE/SQL
How Do I Create a Database?
To create a database, you need to perform at least some of the following
tasks:
* Create tables.
* Create views.
* Create indexes.
These tasks are part of the data definition process, which also includes
placing the tables in specific DBEFilesets, and using the SQL DROP
command to remove tables or views that are no longer needed.
Most data definition tasks are carried out when you are setting up the
database for the first time. But you may need to do some data definition
tasks later, when, for example, you need additional database capacity.
Commands to Create Databases
You use SQL CREATE commands to create database tables and all the other
components of a database. Each of these commands is shown in more detail
later in this book; the following is only one example:
CREATE PUBLICREAD TABLE Employees
(LastName VARCHAR(15) NOT NULL,
FirstName VARCHAR(15) NOT NULL,
EmpNumber INTEGER NOT NULL)
After creating a table, you use the ISQL INPUT and LOAD commands or an
application program to put data into it. You can also add single rows to
a table by using the SQL INSERT command. (These tasks are explained and
illustrated in chapter 3.)
MPE/iX 5.0 Documentation