HP 3000 Manuals

Database Elements [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.0 Documentation


TurboIMAGE/XL Database Management System Reference Manual

Database Elements 

A database is a named collection of related data.  The formal description
of this data is called a schema.[REV BEG] 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.

Data Sets 

A data set is a collection of data entries where each entry contains
values for the same data items.  For example, a customer data set can
contain entries composed of the same nine data items:  ACCOUNT,
LAST-NAME, INITIAL, STREET-ADDRESS, CITY, STATE, ZIP, and CREDIT-RATING.
Normally, each data set is associated with some real-world entity, such
as orders, customers, employees, and so forth.

A database can contain up to 199 data sets.  Each data set is referenced
by a unique data set name that follows certain naming conventions.  The
data set names are made up of the root file name appended by two digits.
For example, if the root file is named XXXX, the first data set defined
in the schema is named XXXX01, the second data set is named XXXX02, and
so on.  To name the maximum of 199 data sets per database, names are
incremented from XXXX01-99, XXXXA1-A9, XXXXB1-B9, up to XXXXJ9.

Each data set is stored in one disk file consisting of storage locations
called records.  When you describe the database with the database
definition language, you specify the maximum capacity, or number of
records, of each data set.  Each record is identified by a record number
that can be used to retrieve the entry within it.

Figure 2-1  shows a sample of one data set from a database named
ORDERS which will be used as an example throughout this manual.  The data
set is named CUSTOMER. The information in this data set pertains to the
customers of a business.  All the data about a particular customer is
contained in a data entry.  Each piece of information such as account
number or last name is a data item.  Many data item values can be
referenced by the same data item name if each value exists in a different
data entry.  For example, the data item FIRST-NAME has the value JAMES in
one data entry and ABIGAIL in another data entry.
[REV END]

[]
Figure 2-1. CUSTOMER Data Set Sample


MPE/iX 5.0 Documentation