data access methods

3
DATA ACCESS METHODS INTRODUCTION  Data access typically refers to software and activities related to storing, retrieving, or acting on data housed in a database or other repository. There are two types of data access, sequential access and random access.Data Access is simply the authorisation you have to access different data files. Data access can help distinguish the abilities of Administrators and users. E.g. Admin’s may be able to remove, edit and add data while a general user may not be able as they don’t have the access to that particular file. Historically, different methods and languages were required for every repository, including each different database, file system, etc., and many of these repositories stored their content in different and incompatible formats.In more recent days, standardized languages, methods, and formats, have been created to serve as interfaces between the often proprietary, and always idiosyncratic, specific languages and methods. Such standards include SQL, ODBC, JDBC, ADO.NET, XML, XQuery, XPath, and Web Services. What is access method ?  An access method is a function of a mainframe operating system that enables access to data on disk, tape or other external devices. They were introduced in 1963 in IBM OS/360 operating system. Access methods provide an API for programmers to transfer data to or from device, and could be compared to device drivers in non-mainframe operating systems.In computing, an access method is a program or a hardware mechanism that moves data between the computer and an outlying device such as a hard disk (or other form of storage) or a display terminal. The term is sometimes used to refer to the mechanics of placing or locating specific data at a particular place on a storage medium and then writing the data or reading it. It is also used to describe the way that data is located within a larger unit of data such as a data set or file.  An access method is also an application program interface (API) that a programmer uses to create or access data sets or to read from or write to a display terminal or other output device. Examples are the Virtual Sequential Access Method (VSAM) and the Virtual Telecommunication Access Method (VTAM). Why it is important ? Without access methods, a programmer must write a special program for an I/O channel, a processor dedicated to control peripheral storage device access and data transfer to and from main memory. This processor requires programs written with special instructions, called Channel Command Words (CCWs). Programming those is a complex and arduous task. Channel programs are initiated by a STARTIO macro issued by the operating system. This is usually front ended by the Execute Channel Program (EXCP) macro for application programmer convenience. This macro issues an SVC (supervisor call instruction) that directs the operating system to issue the STARTIO on the application's behalf.  Access methods provide: Ease of programming - programmer would no longer deal with a specific device procedures, including error detection and recovery tactics in each and every program. A program designed to process a sequence of 80-character records would work no matter where the

Upload: mustafa-hassan

Post on 06-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Access Methods

8/2/2019 Data Access Methods

http://slidepdf.com/reader/full/data-access-methods 1/3

DATA ACCESS METHODS

INTRODUCTION

 Data access typically refers to software and activities related to storing, retrieving, or acting on datahoused in a database or other repository. There are two types of data access, sequential accessand random access.Data Access is simply the authorisation you have to access different data files.Data access can help distinguish the abilities of Administrators and users. E.g. Admin’s may beable to remove, edit and add data while a general user may not be able as they don’t have theaccess to that particular file.Historically, different methods and languages were required for every repository, including eachdifferent database, file system, etc., and many of these repositories stored their content in differentand incompatible formats.In more recent days, standardized languages, methods, and formats,have been created to serve as interfaces between the often proprietary, and always idiosyncratic,specific languages and methods. Such standards include SQL, ODBC, JDBC, ADO.NET, XML,XQuery, XPath, and Web Services.

What is access method ?

 An access method is a function of a mainframe operating system that enables access to data ondisk, tape or other external devices. They were introduced in 1963 in IBM OS/360 operatingsystem. Access methods provide an API for programmers to transfer data to or from device, andcould be compared to device drivers in non-mainframe operating systems.In computing, an accessmethod is a program or a hardware mechanism that moves data between the computer and anoutlying device such as a hard disk (or other form of storage) or a display terminal. The term issometimes used to refer to the mechanics of placing or locating specific data at a particular placeon a storage medium and then writing the data or reading it. It is also used to describe the way thatdata is located within a larger unit of data such as a data set or file.

 An access method is also an application program interface (API) that a programmer uses to createor access data sets or to read from or write to a display terminal or other output device. Examplesare the Virtual Sequential Access Method (VSAM) and the Virtual Telecommunication AccessMethod (VTAM).

Why it is important ?

Without access methods, a programmer must write a special program for an I/O channel, aprocessor dedicated to control peripheral storage device access and data transfer to and from mainmemory. This processor requires programs written with special instructions, called ChannelCommand Words (CCWs). Programming those is a complex and arduous task. Channel programsare initiated by a STARTIO macro issued by the operating system. This is usually front ended by

the Execute Channel Program (EXCP) macro for application programmer convenience. This macroissues an SVC (supervisor call instruction) that directs the operating system to issue the STARTIOon the application's behalf.

 Access methods provide:

•Ease of programming - programmer would no longer deal with a specific device procedures,including error detection and recovery tactics in each and every program. A programdesigned to process a sequence of 80-character records would work no matter where the

Page 2: Data Access Methods

8/2/2019 Data Access Methods

http://slidepdf.com/reader/full/data-access-methods 2/3

data are stored.

• Ease of hardware replacement - programmer would no longer alter a program when data shouldbe migrated to newer model of storage device, provided it supports the same accessmethods.

• Easy shared data set access - an access method is a trusted program, that allows multipleprograms to access the same file, while ensuring the basic data integrity and system

security.

TYPES

•Disk Access MethodsIndexed access methods are widely used to keep track of records in a file and files on disk. Theindex is a table of contents with pointers to the location of each file on the disk or each record withinthe file. A common approach is the indexed sequential access method (ISAM), which uses an indexin sequential order that points to records stored in random order. For fastest retrieval, there directaccess methods convert the record's identifying field, such as account number, into a physicalstorage address. The pure sequential method may also be used if direct access is not required.See ISAM, direct access method and sequential access method.

•Communications Access MethodsLocal area network (LAN) access methods, such as CSMA/CD in Ethernet, transfer data to and

from connected computers on the network. These methods reference layers 1 and 2 of the OSImodel. See CSMA/CD.Mainframe access methods, such as IBM's TCAM and VTAM, transfer databetween a host computer and remote terminals. These routines place the data into frames withappropriate control codes and reference layers 3, 4 and 5 of the OSI model. See TCAM and VTAM.

•Tape Access MethodsTapes use the sequential access method (SAM), which keeps records in order by a key field suchas account number. Each record must be compared to find the desired one. Modern drives allowfast forwarding to index points where different groups of records are stored. This provides a directaccess capability to sections of the tape, although very slow by comparison to disks.

COMMONLY USED

Commonly used access methods include the following:

•QSAMQSAM (Queued Sequential Access Method) is a heavily used access method. QSAM arranges

records sequentially in the order that they are entered to form sequential data sets, and anticipatesthe need for records based on their order. The system organizes records with other records. Toimprove performance, QSAM reads these records into storage before they are requested, atechnique known as queued access.

•BSAMBSAM (Basic Sequential Access Method) is used for special cases. BSAM arranges records

sequentially in the order in which they are entered. Unlike QSAM, however, the user– rather thanthe system– organizes records with other records into blocks.

•BDAMBDAM (Basic Direct Access Method), which is becoming obsolete, arranges records in any

sequence your program indicates, and retrieves records by actual or relative address. If you do notknow the exact location of a record, you can specify a point in the data set where a search for therecord is to begin. Data sets organized this way are called direct data sets.

•BPAMBPAM (Basic Partitioned Access Method) arranges records as members of a partitioned data set

(PDS) or a partitioned data set extended (PDSE) on DASD. You can use BPAM to view a UNIXdirectory and its files as if it were a PDS. (You can view each PDS, PDSE, or UNIX member 

Page 3: Data Access Methods

8/2/2019 Data Access Methods

http://slidepdf.com/reader/full/data-access-methods 3/3

sequentially with BSAM or QSAM.)

•VSAMVSAM (Virtual Sequential Access Method) is used for more complex applications. VSAM

arranges records by an index key, relative record number, or relative byte addressing. VSAM isused for direct or sequential processing of fixed-length and variable-length records on DASD. Datathat is organized by VSAM is cataloged for easy retrieval.