Realm concept Schema DDL
110 U929-J-Z125-9-76
4.10.2 Defining allocat ion of records to realms RECORD NAME IS record-name
WITHIN realm-name-1[,realm-name-2,... AREA-ID IS identifier]
The allocation of data to realms and the placement of data with in realms is performed
mainly when defining the physical storage structure by means of SSL (see the section
“Defining the placement of member records, tables and hash areas” on p age 160). The
allocation of records to realms is however defined by means of the schema DDL.
realm-name-1, etc. specifies all the realms to contain records of the record type record-name.
If you specify multiple realms, you cannot insert any new records of this record type with
SQL.
identifier must be specified only if more than one realm name is sp ecified.
identifier is specified by the user to denote the name of an item that is automa tically
generated by UDS/SQL to store one of the specified realm names in each cas e. Prior to
storing a record, the database programmer must provide this item with the name of the
realm that is to contain the record (see the “Application Programming” manual, STORE).
The time required for retrieving member records via their set relationship can be de creased
by storing the member records in the same realm as the associated owner record. This
allows further placement optimization for records by means of SS L (see the section
“Placement within a realm” on page 163).
4.10.3 Temporary realms AREA IS TEMPORARY
A temporary realm must be defined if the schema descr iption contains dynamic sets or if
UDS/SQL must automatically generate a dynamic set because a sp ecific DML statement
has been given (see the “Application Programming” manual, FIND 7). The temporary realm
serves to store the table that represents the set occurrence of the dynam ic set and that
points to the associated member records.
A temporary realm must also be defined when you wish to access the database using SQL.