How does the program communication take place in a dbms model?

The program and the DBMS communicate in terms of six types of information:

Action
Objects data names.
Selection criteria.
Userschema definition and user program buffer location.
Response on detection of error or exception condition.
Access authorization




Action :

The action information refers to the verbs which the programmer uses to tell the DBMS what to do. Action statements include two types: retrieval statements which do not change the contents of the database, and modification statements which do change the content of the database.

Retrieval statements may be provided to:

- Locate data in the database to determine its existence or to prepare for further processing. This often results in data begin brought into the DBMS buffer, but dose not make it available to the user program.
- Access data, that is, move located data from the system buffer to the user program buffer, performing any required schema to userschema conversions in the process.
- Locate and access data.

Object Data :

The second type of information to be communicated to the DBMS conveys the names of elements in the database structure which are to be the object of the action part of the statement. In general, the programmer will name files, groups and data items. To the extent that names are not unique within a database, a programmer will have to provide additional qualifying names to resolve any possible ambiguity of reference. Where only one file can be addressed at a time, the file name may be determined globally or by default. Similarly, where the system always retrieves or writes a complete entry of a file, it is not necessary to name any groups or data items to identity selected portions of an entry.

Selection Criteria :

A file consists of many records of a single record type that is, conforming to a single definition. In any database, there will generally be many instances of the named object data. The selection criteria information identifies which instance of the object data are to be selected. The basis of the selection criteria may be either position or content.

Content based selection – In content selection, the criteria is expressed in terms of the contents of the named object data instances. This may range from a simple criterion, such as the equality of a pre-declared key data item with a search argument value, to a full Boolean expression. Both programming users and non programming users must be able to identity selected instances of repeating data structures. The normal and most natural way to identify instances of a repeating data structure is on the basis of criteria applied to the content of that data structure and expressed in the form of a Boolean expression.

Position based selection – Position selection depends upon an existing or assumed sequence on the instances of that object data. Both the programmer and the system must have a common understanding regarding the sequence of records in a file. The position criteria are expressed using such phrases as ‘first’, ‘last’, ‘nth from the first’, or ‘nth from the last’. Additional positional criteria may be based upon the concept of currency. Once the system has successfully executed a database manipulation language statement which names object data and locates or selects particular instances of the object data, there will exist, in effect, if not in fact, a pointer into the database. The pointer remembers the most recent place in the database that system looked or acted, hence, the concept of currency and currency pointers.

User schema Definition and User Program Buffer :

Every program which references the database must have one or more user schemas associated with it. The user schema is a definition of a data structure as the programming user sees it when writing a program, and therefore, as the program expects to see it during execution. The user schema provides the definition and the structural context for the data names as the object of the action and for the data named in the selection criteria. The user schema is actually made up of three parts, -a logical data definition, a physical storage or a buffer definition, and a mapping.

The logical data structure definition provides the names, other defining attributes and structure of the data as seen by the program. Since actual data will be delivered to the program during execution, the logical definition must ultimately have a physical representation. The buffers associated with the user schemas can be set up at compile time or during execution when the program first signals its intent to begin processing a file or portion of the database.

Generally a buffer would be set up for each user schema. Furthermore, if the system allows the programmer to give a buffer address as one of the parameters with each statement or call issued to the DBMS, it is possible for multiple buffers to be associated with a user schema at any given time. The third part of the user schema defines the mapping or correspondence between elements in the user schema and elements in the schema. Often the correspondence only requires associating the names of data items, group and files in the user schema with their counterparts in the database schema. From that correspondence definition the system will generally be able to determine what mappings, transformations and conversions are required when data is transferred between the user program buffer and the database.

Error and Exception Conditions:

The fifth type of communication relates to the error and exception conditions that the system may encounter while attempting to execute a database manipulation language statement. Exception conditions include reaching the end of a sequential file and not finding a group or entry satisfying the selection criteria. Error conditions include invalid syntax in the DML statement, unidentified data names, transaction or other conversion error on transmitting data item values and no currency pointer established.

Access Authorization:

In the sixth type of communication, the programmer must supply sufficient identifying information so that the system can check its access authorization tables to ensure that the programmer has received clearance to do what he is asking to do. Access authorization includes identification of the user, identification of the data to be accessed, and an indication of the action requested on the data. The identification of the user may be explicit in the form of a name or other identifier, or it may be implicit in the name of the program being executed. In the latter case, initial steps of security clearance are performed by the job management system. The data to be accessed may be identified in terms of a whole database, a file, a group type, a set of group or entry instances satisfying a given selection expression, or individual items. The requested action against the identified data may be controlled in terms of retrieve only, add only, retrieve and add, or modify.


______________________________________________________________________________

 

 

 


Topics

  • Management - Home
  • Asset Management

  • Brand Management
  • Business Process Management

  • Change Management

  • Data Management

  • Database Management

  • Debt Management

  • Document Management
  • Facility Management

  • Information Management

  • Inventory Management

  • Medical Management Software
  • Network Management

  • Performance Management

  • Portfolio Management

  • Project Management

  • Property Management Software
  • Quality Management

  • Risk Management

  • Sales Management

  • Security Management

  • Technology Management

  • Time Management

  • Warehouse Management
  •  


    FREE Subscription

    Stay Current With the Latest Trends & Developments Realted to Management. Signup for Our Newsletter and
    Receive New Articles Through Email.

    Name:

    Email:

    Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

     

    Copyright - © 2005 - 2017 - www.management-hub.com

    | Management-Hub.com Privacy Policy | Disclosure | Disclaimer | Contact |