Information Technology Reference
In-Depth Information
simple than the record and set entries. While declaring records and sets, database
procedures must be defined by the database designer. Database procedures are spe-
cific to a particular database and are stored in the system. These procedures include
validation of access, computation of data items values, and sorting sequence.
2.2.2
Network DML
The language for operating a network database is called the network DML. These
DML commands can be embedded in a third-generation programming language
called a host language. The DML commands can be divided into three groups; Nav-
igation, Retrieval, and Updating. Navigation commands are used to set the currency
indicators to specific records, and set occurrences in the database. Retrieval com-
mands extract the current record of the run unit. Updating commands are used to
update, store, and delete record and set occurrences.
Several currency indicators are maintained by the database network system to
enable the programmer to navigate through the database. The following currency
indicators are useful when a DML is used.
• Currentofrununit—Arununitcurrencyindicatorreferstotherecordmostre-
cently accessed by the run unit; there is only one currency indicator of this kind.
• Currentofasettype—Asettypecurrencyindicatorreferstotherecordwithin
a given set type that was most recently accessed. There are as many currency
indicators of this kind as the number of set types defined in the subschema refer-
enced by this run unit.
• Currentofrecordtype—Arecordcurrencyindicatorreferstotherecordwithina
given type that was most recently accessed.
The following are the major network DML statements:
a. OBTAIN First/Next record-name-i [USING {identifier-j}]
The OBTAIN statement is used to establish a specific record occurrence in the
database. The target record of the OBTAIN statement becomes the current record.
A number of different record selection expressions can be used in the OBTAIN
statement. For example, the following statements are to obtain an occurrence of
STUDENT record with student# = 1234 (Martin 1990 ).
MOVE 1234 TO STUDENT#.
OBTAIN ANY STUDENT USING STUDENT#.
b. CONNECT record-name-i to set-name-j/all
The CONNECT statement makes a record of members of one or more set types.
If these set type are enumerated, then the type of the current record must be
Search WWH ::




Custom Search