Main DBMS functions
Main DBMS functions

Video: Main DBMS functions

Video: Main DBMS functions
Video: How to GROW SPROUTS for CHICKENS! Super Easy Tutorial 2024, November
Anonim

Modern database management systems are used at many sites, but not everyone knows what they are and how you can use the functions of the DBMS. Such tools have a huge number of possibilities, so to fully use them, you should understand what they can do and how useful they are for the user.

Data management

First of all, the functions of the DBMS include processing information in external memory, and this function is to provide the basic structures of the VI, which are needed not only to store information directly included in the database, but also to perform various service tasks, such as getting accelerated access to any files in various cases. In certain modifications, the capabilities of various file systems are actively used, while others provide for work even at the level of external memory devices. But in this case, it is worth noting that in the function of a highly developed DBMS, the user is in any case not informed whether any system is used, and if so, how the files are organized. In particular, the system maintains its own naming order for objects included in the database.

subd functions
subd functions

RAM buffer management

In the vast majority of cases, it is customary to use DBMS functions in fairly large databases, and this size is at least often much larger than the available RAM. Of course, if in the case of accessing each data element, an exchange with external memory is carried out, the speed of the latter will correspond to the speed of the system itself, therefore, practically the only option for actually increasing it is to buffer information in RAM. Moreover, even if the OS performs system-wide buffering, for example with UNIX, this will not be enough to provide the DBMS with the purpose and basic functions, since it has a much larger amount of data on the beneficial properties of buffering for each specific part of the database used. Due to this, advanced systems maintain their own set of buffers, as well as a unique discipline for their replacement.

It is worth noting the fact that there is a separate direction of control systems, focused on the continuous presence of the entire database in RAM. This direction is based on the assumption that in the near future the amount of RAM in computers will be able to expand so much that they will no longer worry about any buffering, and the basic functions of this type of DBMS will come in handy here. At the moment, all these works remain at the testing stage.

Transaction Management

A transaction is a sequence of operations with the database used, which the management system considers asa single whole. If the transaction is completely successfully executed, the system fixes the changes that it made in external memory, or none of these changes will affect the state of the database. This operation is required in order to maintain the logical integrity of the used database. It is worth noting that maintaining the correct course of the transaction mechanism is a prerequisite even when using single-user DBMS, the purpose and functions of which differ significantly from other types of systems.

main functions of subd
main functions of subd

The property that any transaction starts only when the database is in a consistent state and leaves it in the same state after the end of the procedure, makes it extremely convenient to use as a unit of activity regarding the database. With proper management of concurrently executing transactions by the control system, each individual user, in principle, can feel like a part of the whole. However, this is to some extent an idealized representation, since in many situations when working people will still feel the presence of their colleagues if they use a multi-user system, but in fact this is also provided for by the very concept of a DBMS. The features of the multi-user type DBMS also relate concepts such as serial execution plan and serialization to transaction management.

What do they mean?

Serialization of concurrently executing transactions provides for the construction of a special plan for their work, in whichthe total effect of the mixture achieved is equivalent to the result obtained due to their sequential execution.

A serial execution plan is a specific structure of actions that leads to serialization. Of course, if the system manages to provide a truly serial execution of a mixture of transactions, then for any user who initiates a transaction, the presence of others will be absolutely imperceptible, except that it will work a little slower compared to single-user mode.

number of basic subd functions
number of basic subd functions

There are several basic serialization algorithms. In centralized systems, the most popular algorithms today are based on synchronization captures of various database objects. In the case of using any serialization algorithms, the possibility of conflicts between two or more transactions on access to certain database objects is provided. In such a situation, in order to support this procedure, it is necessary to perform a rollback, that is, to eliminate any changes made to the database through one or more processes. This is just one of the situations where a person feels the presence of others in a multi-user system.

Journaling

One of the main requirements for modern systems is to ensure the reliability of information storage in external memory. In particular, this provides that the main functions of the DBMS include the ability to restore the last agreedthe state of the database after any software or hardware failure occurs. In the vast majority of cases, it is customary to consider two options for hardware failures:

  • soft, which can be interpreted as an unexpected shutdown of the computer (the most common case is an emergency power outage);
  • hard, which are characterized by partial or complete loss of data stored on external media.

Examples of software failures include crashing the system when trying to use some feature that is not part of the main functions of the DBMS, or crashing some user utility, as a result of which a certain transaction was not completed. The former situation can be considered a special kind of soft failure, while the latter requires a single transaction recovery.

subd purpose and main functions
subd purpose and main functions

Of course, in any case, in order to restore the database normally, you need to have a certain amount of additional information. In other words, for the normal maintenance of the reliability of data storage in the database, it is necessary to provide redundancy in information storage, and the part of the data used during recovery must be guarded especially carefully. The most common method for maintaining this redundant data is change logging.

What is it and how is it used?

The log is a special part of the database, accesswhich is not included in the number of DBMS functions, and it is supported very carefully. In some situations, it even provides support for two copies of the log at the same time, located on different physical media. These repositories receive information about any changes that occur in the main part of the database, and in different management systems, changes can be logged at various levels. In some situations, a log entry fully corresponds to a specific logical update operation, in others - a minimal internal operation associated with updating an external memory page, while some DBMS provide for a combination of the two approaches.

In any case, the so-called "write ahead" logging strategy is used. When it is applied, a record indicating a change in any database objects enters the external log memory before the object being changed. It is known that if the functions of the Access DBMS provide for the normal implementation of this protocol, using the log solves any problems associated with restoring the database in the event of any failures.

Rollback

The simplest recovery situation is an individual transaction rollback. For this procedure, you do not need to use a system-wide change log, and it is quite sufficient to use a local modification operation log for each transaction, and then roll back transactions by performing reverse operations, starting from the end of each of the records. The structure of a DBMS function often providesthe use of just such a structure, but in most cases local logs are still not supported, and an individual rollback even for individual transactions is carried out according to the system-wide one, and for this all records of each of the transactions are combined in a reverse list.

the concept of subd function subd
the concept of subd function subd

During a soft failure, the database's external memory may include various objects that have been modified by transactions that were not completed at the time of the failure, and may also lack various objects that have been upgraded by those that successfully completed before the failure through the use of buffers of RAM, the contents of which completely disappear when such problems occur. If the protocol to use local logs is followed, there are bound to be entries in external memory that pertain to the modification of any such objects.

The main goal of the recovery procedure after the occurrence of soft failures is such a state of the external memory of the main database, which would occur if changes to any completed transactions were committed in the VI and would not contain traces of unfinished procedures. To achieve this effect, the main functions of the DBMS in this case are the rollback of incomplete transactions and the replay of those operations whose results were not eventually displayed in external memory. This process involves a fairly large number of subtleties, which mainly relate to the organization of log and buffer management.

Hard failures

When a database needs to be restored after a hard failure, not only the log is used, but also a backup copy of the database. The latter is a complete copy of the database by the time the filling of the log began. Of course, the normal recovery procedure requires the preservation of the journal, therefore, as mentioned earlier, extremely serious requirements are imposed on its preservation in external memory. In this case, the recovery of the database consists in the fact that, based on the archive copy, the log reproduces all the transactions that have been completed by the time the failure occurred. If necessary, it can even replay pending transactions and continue their normal operation after the end of the restore procedure, but in most real systems this procedure is not carried out for the reason that hard failure recovery itself is a rather lengthy procedure.

Language support

Modern databases use a variety of languages, and early DBMSs, whose purpose, functions, and other features differed significantly from modern systems, provided support for several highly specialized languages. Basically, these were SDL and DML, designed to define the database schema and manipulate data, respectively.

subd function structure
subd function structure

SDL was used to determine the logical structure of the database, that is, to recognize the specific structure of the database, which is representedusers. DML, on the other hand, included a whole complex of information manipulation operators that allowed you to enter information into the database, as well as delete, modify or use existing data.

The DBMS functions include various types of support for a single integrated language, which provides for the presence of any means necessary for the normal work with databases, starting from its initial creation, and providing a standard user interface. SQL is used as a standard language that provides the basic functions of the DBMS of today's most common relational systems.

What is it?

First of all, this language combines the main functions of DML and SDL, that is, it provides the ability to determine the specific semantics of a relational database and manipulate the necessary information. At the same time, the naming of various database objects is supported directly at the language level in the sense that the compiler converts object names into their internal identifiers, based on specially maintained service catalog tables. The core of control systems, in principle, does not interact with tables or their individual columns in any way.

not included in the main functions of the subd
not included in the main functions of the subd

The SQL language includes a whole list of special tools that allow you to determine the constraints on the integrity of the database. Again, any such restrictions are included in special catalog tables, and integrity control is carried out directly at the language level, that isin the process of reading individual database modification statements, the compiler, based on the integrity constraints in the database, generates the corresponding program code.

Recommended: