TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

Chapter 2 35
Database Structure and Protection
Database Elements
2 Database Structure and Protection
This chapter describes the structure of a TurboIMAGE/XL database. The discussion
defines the elements of a database and describes how they are related and how they can be
accessed. If you are designing a TurboIMAGE/XL database, use this chapter with chapter
3 which describes how to define a database.
Database Elements
A database is a named collection of related data. The formal description of this data is
called a schema. The database is defined in terms of data items, data entries, and data
sets which are described in the text below.
Data Items
A data item is the smallest accessible data element in a database. Each data item consists
of a value referenced by a data item name. The name is usually selected to describe the
data value. Many data item values can be referenced by the same data item name with
each value existing in a different data entry.
A compound data item is a named group of identically defined, adjacent items within
the same data entry. Each occurrence of the data item is called a sub-item, and each
sub-item can have a value. A compound item is similar to an array in programming
languages such as FORTRAN 77 and BBASIC. For example, a data entry might contain a
compound item named MONTHLY-SALES with 12 sub-items in which the total sales for each
month are recorded.
Critical items are defined as the key item in a master data set and the search and sort
items in detail data sets. These are described later in this chapter.
A data item type can be one of several types of integers, real or floating-point numbers, or
ASCII character information. The database designer defines each data item as a particular
type depending on what kind of information is to be stored in the item. The data types are
described in detail in the next chapter and are summarized in Tables 3-2 and 3-3.
Data Entries
A data entry is an ordered set of related data items (sometimes referred to as a record).
Specify the order of data items in an entry when you define the database. Data entries can
be defined with at most 255 data item names; none can be repeated. The length of the data
entry is the combined length of the data items it contains and cannot exceed 2348
half-words or 4696 bytes.