Example 1
Use the default DEFINE DATABASE statement. If you specify the
DICTIONARY IS NOT USED clause, the data dictionary will not be
used to store the database definition and definitions of database
elements.
RDO> DEFINE DATABASE 'PERSONNEL'
cont> DICTIONARY IS NOT USED.
Example 2
Use DEFINE DATABASE with qualifiers:
RDO> DEFINE DATABASE 'PERSONNEL'
cont> NUMBER OF BUFFERS IS 10
cont> BUFFER SIZE IS 10 BLOCKS
cont> DICTIONARY IS NOT USED.
This statement performs the following actions:
o Names the database.
o Specifies a number of buffers, and the length of each buffer.
o Commits the database definition implicitly.
o Specifies that the data dictionary will not be used to store
the database definition and definitions of database elements.
o Invokes the database, using the file name as the database
handle.
Example 3
The scope of each record's database key is set to FINISH during
the RDO session of the user who entered DEFINE DATABASE:
RDO> DEFINE DATABASE DISK2:[USER.DBS]PERS2
cont> DBKEY SCOPE IS FINISH.
Note that this command does NOT set a "default" DBKEY SCOPE
characteristic for the database. For each user, the default is
COMMIT unless that user specifies INVOKE DATABASE...DBKEY SCOPE
FINISH.
Example 4
The upper limit on the number of nodes from which users can
access the common, cluster-wide database is set to 8:
RDO> DEFINE DATABASE ACCTING NUMBER CLUSTER NODES IS 8
cont> DICTIONARY IS NOT USED.
If you attempt to access the shared database from a node and,
in doing so, exceed the maximum nodes parameter, an error is
signaled to your RDO session or program.
The DICTIONARY IS NOT USED clause specifies that the data
dictionary will not be used to store the database definition
and definitions of database elements.
Example 5
The following RDO command procedure defines a multifile database
called MULTI_PERS. The example:
o Defines database wide characteristics
o Defines global storage area defaults
o Specifies local attributes for RDB$SYSTEM, the default storage
area
o Defines a storage area for segmented strings
o Defines other storage areas
DEFINE DATABASE 'DB_DISK:MULTI_PERS'
! Define database-wide characteristics
DESCRIPTION IS /* Sample multifile definition */
NUMBER OF USERS IS 60
NUMBER OF CLUSTER NODES IS 22
NUMBER OF RECOVERY BUFFERS IS 200
DICTIONARY IS NOT USED
! Define global storage area characteristics
ALLOCATION IS 500 PAGES
PAGE FORMAT IS MIXED
! Specify local attributes for the default storage area
! Override the global default of MIXED page format
DEFINE STORAGE AREA RDB$SYSTEM
FILENAME 'DISK1:PERS_DEFAULT'
PAGE FORMAT IS UNIFORM
ALLOCATION IS 300 PAGES
SNAPSHOT_FILENAME IS 'DISK2:PERS_DEFAULT'
END RDB$SYSTEM STORAGE AREA
! Define storage area for segmented strings
DEFINE STORAGE AREA PERS_SEGSTR
FILENAME 'DISK1:PERS_SEGSTR'
PAGE FORMAT IS UNIFORM
END PERS_SEGSTR STORAGE AREA
SEGMENTED STRING STORAGE AREA IS PERS_SEGSTR
! Definition of some sample storage areas
DEFINE STORAGE AREA CANDIDATES
FILENAME 'DISK3:CANDIDATES'
PAGE FORMAT IS UNIFORM
SNAPSHOT_FILENAME IS 'DISK4:CANDIDATES'
END CANDIDATES STORAGE AREA
DEFINE STORAGE AREA EMPIDS_LOW
FILENAME 'DISK5:EMPIDS_LOW'
SNAPSHOT_FILENAME IS 'DISK6:EMPIDS_LOW'
END EMPIDS_LOW STORAGE AREA
DEFINE STORAGE AREA EMPIDS_MID
FILENAME 'DISK7:EMPIDS_MID'
SNAPSHOT_FILENAME IS 'DISK8:EMPIDS_MID'
END EMPIDS_MID STORAGE AREA.