Realm concept Schema DDL
108 U929-J-Z125-9-76
4.10 The realm concept
In order to take the aspects of
data privacy,
–data recovery,
concurrent access, and
the logical association of certai n data
into account, it is often advisable to subdivide the databa se into subunits. These subdivi-
sions are called “realms” or “areas”. They are generated as BS2000 fi les at database
creation (see the “Creation and Restructuring” manual, Databas e creation). There are
realms which contain UDS/SQL-internal information onl y and realms for user data. The
latter are called user realms.
A maximum of 123 realms can be defined for a database with a page length of 2048 bytes
(2-Kbyte page format).
A database with a page length of 4000 or 8096 bytes (4-Kbyte or 8-Kbyte pag e format), by
contrast, may be subdivided into a maximum of 245 realms.
Data privacy
With the BPRIVACY utility, the database administrator can grant certain groups of users
access privileges to database objects (realms, record type s, sets).
When defining the subschema, a user can restrict th e use of data to certain realms.
Data security
The subdivision into realms allows the effects of hardware errors or read/write errors to be
restricted to a few realms or even to one realm. In such cases, only the realm or realms
concerned needs to be recovered by means of realm copies or after-i mages, if used (see
the “Recovery, Information and Reorganization” manual, BMEND). Data that is updated
frequently should therefore be stored in a separate realm from data that is seldom updated
or updated only at certain times.