You are on page 1of 7

Working of ADABAS

Description :
Adabas is one of the fastest databases in the world. Its high speed and legendary reliability make Adabas the ideal database server for large mission-critical business applications that require sub-second response times for thousands of users even during peak times. Adabas is available on mainframe, Windows, Unix and OpenVMS platforms.

Access to Adabas
Adabas can be accessed from Natural, Software AGs 4GL development environment, from Bolero, Software AGs application factory, and from every 3GL and 4GL that is equipped with a call interface. In addition, Adabas can be accessed via standard interfaces such as ODBC or JDBC and, of course, embedded SQL can be used.

Data Storage
Data storage consists of the following disks: Data where user data is stored Associator where index information is kept Work Area where Adabas has its playground Protection Log where transaction data is kept temporarily for backup purposes Command Log where user commands are stored for backup purposes

Nucleus
This is the set of programs, tables, queues, etc. that make up Adabas.

Interface
This is the entrance to Adabas or, from an external point of view, the place where the calls are received and forwarded to the Adabas nucleus.

The Size of an Adabas Database


On the mainframe there is no size limit at all. On open-systems platforms the theoretical limit for Adabas databases is 128 TB - a figure limited in practice only by the amount of hard disk space that can be made available.

Adabas How it Works


The Process Structure Data Storage Data and Index Compression Adabas Direct Access Method (ADAM)

The Transaction Concept Universal Encoding Support Warm Restart

The Process Structure


Adabas is designed around a two-process structure; thus the Adabas nucleus executes in a separate partition of the operating system from the application or the Adabas utility. The Adabas nucleus manages all database activities and serves all user processes centrally. The number of users who can be served in parallel is unlimited and typically is many thousand users. Normally one Adabas nucleus manages one Adabas database, although it is possible, for throughput reasons for multiple Adabas nuclei to manage one Adabas database, this also includes the IBM Sysplex environment. On the mainframe there is no size limit at all. On Open Systems platforms the theoretical limit for Adabas databases is 128 TB - a figure limited in practice only by the amount of harddisk space that can be made available. In order to be able to support thousands of users in parallel and deliver sub-second response times Adabas supports its own internal multithreading architecture. This enables the Adabas nucleus to support an unlimited number of read and write tasks simultaneously. When a user request cannot be instantly fulfilled because it must wait for resources e.g. it must wait for an I/O operation to complete, then another user request will be serviced. Further increases in performance is achieved in the I/O subsystem with the following techniques: data and index compression asynchronous buffer flushing buffer search algorithms based on hashing algorithms The data compression reduces the data volume by nearly 50%. This means that with every I/O operation twice as much data is transferred and only half of the space is occupied in the I/O buffer. Index compression can reduce the index data by as much as 70% and results in similar saving. The asynchronous buffer flush allows Adabas to continue updating data while the physical I/O process is in progress. The hashing algorithm used by the I/O buffer results in equal search times irrespective of the buffer size. Thus as data volumes increase and the I/O buffer size is increased, there is no corresponding increase in the search time.

Data Storage
An Adabas database consists of three components Storage of user data (DATA) Index Structures and Address Converter (ASSO) Scratch File for intermediate results and logging info (WORK). ASSO, DATA and WORK are normally each assigned to a separate operating system file, but it is possible to assign up to five OS files for both ASSO and DATA. The physical blocks of a database component are each allocated a number starting with 1. These block numbers are called Relative Adabas Block Numbers (RABNs). The RABN is used in identifying and addressing the blocks of a data component. Within DATA, there are up to 32,000 Adabas files and each file consists of a series of RABNs (not necessarily contiguous). Each RABN holds one or more Adabas records and each record contains one or more fields. An Adabas record can represent a two dimensional data structure or can be designed to represent a nested relational structure i.e. tables within tables. From a logical point of view there are two or more files, but physically they will be retrieved together. This leads to a significant reduction in the number of I/O operations needed to retrieve data. Storage strategy for user data Initially the data records will be stored in the ascending physical sequence. When a record is inserted into a database file, it is allocated a unique internal sequence number ISN) within the file. This ISN serves as an internal primary key for the file. (Adabas does not require the user to specify a unique primary key) and is used to identify the record but not its location. The DBA can also specify which fields are needed for retrieval purposes. Index structures will be constructed for these fields. The following types of search fields (Descriptors) can be defined: Super descriptors containing data from multiple non-adjacent fields Subdescriptor containing data from part of a field Normal descriptor containing data from a single field Phonetic descriptor converts the contents of the field to its phonetic equivalent Hyperdescriptors can be used to generate multiple key values for a particular field The Associator (ASSO) contains field definition tables which contain descriptions of the contents and structure of each Adabas file address converter contains the addresses of the RABN which contains a particular record, The ISN is used to identify. Thus by using the ISN value as a displacement into the address

converter, the block containing the record can be found efficiently and simply. the inverted lists (B* trees) are used when querying the database and for logical-sequential processing of the database. Each Descriptor in a file has its own index structure. The lowest level of the index structure contains a series of entries for each value of that particular Descriptor. Each entry consists of the descriptor value, the number of occurrences of this value and then a list of the ISNs i.e. those records containing this value. Free Space Tables contain information on which ASSO and DATA blocks have space available . The advantage of the address converter, a unique Adabas feature, is that it avoids data fragmentation. Adabas does data compression at the field level and it is possible that after an update the record expands and no longer fits in the block where it was located. Without the address converter all index entries would point directly to the block holding the record. As it is impracticable to change the addresses in the index structure to point to a new block, the record has to be split into fragments, the first part remaining in the original block with a pointer to another block containing the rest of the record. This is obviously inefficient as multiple I/Os are necessary to read and write this record. With Adabas the record can be moved entirely to a new block and the entry in the address converter is changed to reflect the new location of the record. Adabas is also unique amongst the RDBMSs in maintaining an up-todate count of the number of occurrences of a each descriptor value. This is often of great importance in being able to optimize complex search operations correctly.

Data and Index Compression


Fields in an Adabas file will normally be compressed. Adabas eliminates all trailing blanks from alphanumeric fields and all leading zeros in numeric fields, unpacked fields will be packed, multiple empty field within the record will be compressed together and all empty fields at the end of a record will be completely suppressed. Within an index block that part of the index value that is identical to the forward part of the previous index value is suppressed.

Adabas Direct Access Method (ADAM)


ADAM is an alternative storage and retrieval method to using the index structure.

In order to use the Adabas Direct Access Method to retrieve records directly, the file needs to be loaded using the ADAM option and that an unique ADAM key field was specified, In this case the storage location (RABN) for each record is calculated using a hashing routine. The advantage of ADAM is that the records can be retrieved more efficiently because fewer I/Os are necessary.

The Transaction Concept


An Adabas transaction begins with the first update issued by a user and ends when that user issues either a Backout (BT) command or an End Transaction (ET) command. At this point all updates will be written to the protection log (PLOG) file and all records in hold status, for this user, will be released. The ET command can also be used to store up to 2KB of user information on an Adabas system file. This ET-data is primarily used for one of the following: the data is used for restart purposed after a program or system crash. the data may be used by the next transaction the data may be used to communicate between users Until a transaction issues an ET or BT command all information about the updates is written to WORK Part 1. The size of this area must be sufficiently large to accommodate all current transaction update information. When a user issues an ET command all the necessary data is written to the PLOG. This data includes the before and after images of the data record the before and after images of the index structure elements the user data if included in the ET command Then the space occupied by this data in WORK part 1 will be freed.

Universal Encoding Support


Adabas 7 has introduced Universal Encoding Support. This features storing/retrieving data in arbitrary encodings including UNICODE User-defined collation descriptors enabling users to retrieve data in a language oriented "culturally correct" sequence.

Warm Restart
When an Adabas nucleus is restarted after a system failure, the nucleus will automatically re-establish logical and physical consistency.

You might also like