DBMS Tutorial

DBMS Practice

Data Manipulation in a Network Database

In this tutorial, we will learn about the data manipulation in a network database, it's basic concepts, currency indicators and status indicators. By Anushree Goswami Last updated : May 26, 2023

Before learning the data manipulation in a network model, we are discussing data manipulation language, so what is the data manipulation language?

Data Manipulation Language (DML)

A data manipulation language (DML) is used to perform tasks such as to search and retrieve, insert, delete, modify records from the database and to connect and disconnect records from the set occurrences.

The data manipulation language that is associated with the network model consists of record-at-a-time commands that are embedded in host languages. These embedded commands are also termed as data sublanguage in DML.

COBOL and PL/I are the most commonly used host languages. On the other hand, to show the program segments, PASCAL notation is augmented with network DML commands.


Network Database Manipulation

Basic Concepts for Network Database Manipulation

In order to understand network data manipulation, we must get familiar with the basic concepts that show us, how data manipulation programs are written?

There are two separate software systems, the database system, and the host programming language. Both the software systems are linked together by a common interface and only through this interface, they are allowed to communicate. It is important to identify specific records of the database as current records because DML commands are record-at-a-time.

To keep track of the number of current records and set occurrences, DBMS uses the mechanism known as currency indicators. Also, to hold the records of different recode types, the host programming language requires local program variables, so that the host program can manipulate their contents. The set of these local variables in the program is termed as the User Work Area (UWA).

UWA is a set of program variables that are declared in the host program in order to communicate the contents of individual records between the DBMS and the host program. A program variable with the same format must be declared in the program, for each record type in the database schema.

Currency Indicators

In the network DML, to keep the trace of the search is critical as retrievals and updates are controlled by moving or navigating through the database records. Currency indicators keep the track of most recently accessed records and the set occurrences by DBMS. Each currency indicator can be termed as record pointer (or record address), that points to a single database record. Many currency indicators are used in network DBMS:

  • Current of record type:
    DBMS keeps the track of most recently accessed record of each record type. The current record becomes undefined if no record gets accessed from that record type.
  • Current of set type:
    DBMS keeps the track of most recently accessed set occurrence of each record type. Set which is the owner of the 16 member records, the set occurrence is stated by a single record from that set. Therefore the current set points to a record, although it is used to keep track of a set occurrence. The current set is undefined if the program has not accessed any record from that set type.
  • Current of the run unit (CRU):
    CRU is a database access program and gets executed on the computer system. In the database, CRU keeps track of the record most recently accessed by the program for each run unit such that this record can be from any record type.

Whenever a DML command get executed by a program, the currency indicators for record types and set types that are affected by the command get updated by DBMS.

Status Indicators

After each DML command gets executed, several status indicators return an indication of success or failure. With such indication, the program can check the values of these status indicators and take appropriate action, either to continue execution or to transfer to an error-handling routine.

Assuming DB_STATUS to be implicitly declared in the host program, we call the main status variable. The value of DB_STATUS indicates whether the command was successful or whether an exception occurred after each DML command is executed. The most common exception to occur in any DML command is the END_OF_SET (EOS) exception.

Comments and Discussions!

Load comments ↻

Copyright © 2024 www.includehelp.com. All rights reserved.