In database maintenance, records or objects have to be continually added, deleted, or updated to reflect business transactions. Data must also be accessed rapidly so information can be produced in response to end-user requests. So here are some most important ways of database access given below:
Table of Contents
Database access methods
- Key Fields
- Sequential Access
- Direct Access
This is one of the most important database access methods. Let’s know the detail.
All data records usually contain one or more identification fields, or keys, that identify the record to be located. For example, the social security number (in many countries) of a person is often used as a primary key field and database.
Other methods also identify and link data records stored in several different database files. For example, hierarchical and network databases may use pointer fields. These are fields within a record that indicate (point to) the location of another record that is related to it in the same file, or in another file.
Hierarchical and network database management systems use this method to link records so that they can retrieve information from several different database files. On the other hand, relational database management packages use primary keys to link records.
Each table (file) in a relational database must contain a primary key. This field uniquely identifies each record in a file and must also be found in other related files.
This is another most important database access methods. The files and databases on the internet use URLs (Uniform Resource Locators) for data access. The pages of hyperlinked text and multimedia documents on the world wide web and websites are accessed by URLs with the format shown in the figure.
For example, the URL for the home page of her Bank of Info website is https://computingway.com. Thus, a website relies on URLs instead of traditional keys and pointers to identify and express the relationships between the interconnected pages of its hypermedia database.
Figure: The general form of Uniform Resource Locators for major internet services.
The sequential access method uses a sequential organization, in which records are physically stored in a specified order according to a key field in each record. For example, payroll records could be placed in a payroll file in a numerical order based on employee social security numbers.
Sequential access is fast and efficient when dealing with large volumes of data that need to be processed periodically. However, it requires that all new transactions be stored into the proper sequence for sequential access processing.
Also, most of the database or files may have to be searched to locate, store, or modify even a small number of data records. Thus, this method is to show to handle applications requiring immediate updating or responses.
Indirect Access methods, records do not have to be arranged in any particular sequence on storage media. However, the computer must keep track of the storage location of each record using a variety of direct organization methods so that data can be retrieved when needed.
New transaction data do not have to be sorted, and processing requiring immediate responses or updating is easily handled. There are a number of ways to directly access records organization methods. Three widely used methods to accomplish such direct access processing are:
- Key transformation
- Index sequential Access
Key transformation performs an arithmetic computation on a key field of record and uses the number that results from that calculation as an address to store and access that record. Thus, the process is called a key transformation because an arithmetic operation is applied to a key field to transform it into the storage location address of a record.
The index is another direct access used to store and locate records. A new data record is stored at the next available location, and its key and address are placed in an index. The computer uses this index whenever it must access a record.
Index Sequential Access
Index Sequential Access methods are used to store records in sequential order on a magnetic disk or other direct access storage devices based on the key field of each record. In addition, each data contain an index that references one or more key fields of each data record to its storage location address.
Thus, an individual record can be directly located by using its key field to search and locate its address in the database index, similar to locate key field to search and locate its address in the database index, similar to locating key topics in a book by looking them up in its index.
As a result, if a few records must be processed quickly, the index is used to directly access the record needed.
Hope you find all database access methods otherwise please feel free to comment below.
You may like also:
- Advantages and Disadvantages of Database Management
- 6 major conceptual types of database
- An important way of data resource management
- 4 Major uses of Database Management Systems