HP 3000 Manuals

SQL Application Definition [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Self-Paced Training Guide

SQL Application Definition 

The following paragraphs describe the procedure to define the HP
ALLBASE/SQL database for the training application.

SQL Database Definition 

HP ALLBASE/4GL does not create database environments directly.  You must
create the database environment using HP ISQL before application
development can commence.

The database environment for an application must contain at least one
DBEfileset and one DBEfile.

The commands listed below show the procedure for creating a database
environment that is suitable for the sqltrain application.  This database
is the smallest workable size for developing this application.  You may
want to enlarge or modify the database if you have sufficient free disk
space.

To create the database environment, you must start the HP ISQL program in
the account and group for the database environment DBEConfile.
Typically, the command to start HP ISQL is simply ISQL.

In the dialog below, user input is shown underlined for clarity.  The
characters isql=> represent the normal HP ISQL prompt, and the character
> is the HP ISQL continuation prompt that appears when a command extends
beyond one line.

Enter the following commands at the HP ISQL prompt.  Note that you must
terminate each command with a semicolon (;).

     isql=> START DBE 'sqldbase'  MULTI  NEW 
     > TRANSACTION = 6, 
     > DBEFILE0 DBEFILE  sqlDBE0 
     > WITH PAGES = 200, NAME = 'sqlF0', 
     > LOG DBEFILE sqlDBElog1 
     > WITH PAGES = 288, 
     > NAME = 'sqllog1'; 

     isql=> CREATE DBEFILESET PRODFS; 
     isql=> CREATE DBEFILESET ORDRFS; 
     isql=> CREATE DBEFILESET OPTFS; 

     isql=> CREATE DBEFILE prodDBEfile WITH PAGES = 50, 
     > NAME = 'prodfile', TYPE = MIXED; 

     isql=> CREATE DBEFILE ordrDBEfile WITH PAGES = 30, 
     > NAME = 'ordrfile', TYPE = MIXED; 

     isql=> CREATE DBEFILE optDBEfile WITH PAGES = 20, 
     > NAME = 'optfile', TYPE = MIXED; 

     isql=> ADD DBEFILE prodDBEfile TO DBEFILESET PRODFS; 
     isql=> ADD DBEFILE ordrDBEfile TO DBEFILESET ORDRFS; 
     isql=> ADD DBEFILE optDBEfile TO DBEFILESET OPTFS; 
     isql=> commit work; 
     isql=> exit; 

Database Access.   

The MPE/iX user who creates a database environment automatically becomes
the database administrator.  This user must grant appropriate access
authority to other users.

Application developers must have CONNECT authority and RESOURCE authority
for the application database environment.  Application developers must
also be members of the SQL owner group for the application.



MPE/iX 5.0 Documentation