Database engine

from Wikipedia, the free encyclopedia

A database engine (or storage engine ) is the underlying software component that a database management system (DBMS) uses to create, read, update, and delete data from a database. Most database management systems have their own programming interface (API) that allows the user to use the underlying engine without having to go through the user interface of the DBMS.

The term "database engine" is often used interchangeably with " database server " or "database management system". "Database instance" refers to the processes and memory structures of the running database engine .

Storage engines

Many modern DBMS support multiple storage engines within the same database system. MySQL , for example, supports InnoDB , as does MyISAM .

Many storage engines support transactions .

Surname License Transactions
Aria GPL No
BlitzDB GPL No
Falcon GPL Yes
InnoDB GPL Yes
MyISAM GPL No
InfiniDB CPL No
TokuDB GPL Yes
WiredTiger GPL Yes
XtraDB GPL Yes
RocksDB BSD Yes

Other engine types are:

Design considerations

Database fragments are stored in memory in data structures and groupings that take advantage of both known effective algorithms for obtaining and changing data and of the memory's own characteristics. Typically, the storage itself is designed to meet the needs of various areas that use storage extensively, including databases. During operation, a DBMS always uses several types of memory with different structures at the same time (e.g. main memory and persistent memory).

In principle, the database memory can be viewed as a linear address space in which each data fragment has its unique address. In practice, however, only a very small percentage of the addresses are used as initial reference points (which also require memory). Most data is accessed by means of indirection using offset calculations (distance in bits from the reference point) and data structures that effectively define access paths (using pointers) to all required data and are optimized for the required data access operations.

Database storage hierarchy

During operation, a database is simultaneously in different storage technology, which forms a storage hierarchy . Due to the architecture of today's computers, most of the database that houses the DBMS is (partially replicated) in volatile memory. Data that are processed are stored in the processor register or processor cache . This data is read from the main memory or written to it, usually via the memory bus . The main memory transmits data to external storage, usually via standard memory interfaces or the network (e.g. Fiber Channel , iSCSI ). A storage network usually has its own storage hierarchy, consisting of a fast cache, which consists of (volatile and fast) DRAM and is connected (again via standard interfaces) to drives, possibly with different speeds, such as SSDs and magnetic disk drives (non-volatile ). The drives can be connected to magnetic storage tapes , which typically contain the least frequently used parts of a large database, or generations of database backups.

There is often a correlation between storage speed and price, and faster storage is usually volatile.

Data structures

A data structure is an abstract construct that stores data in a well-defined way. An efficient data structure enables quick access and modification of the data. This access can include inserting, deleting, modifying and querying data in various ways. A certain type of data structure may be appropriate for certain operations, but not for others. A data structure type is selected when the DBMS is developed according to how well it is suitable for the type of data it contains and the operations to be applied to it. When selecting the data structure for a specific task, the type of storage medium on which it is stored is also taken into account (e.g. access speed, minimum size of the memory blocks to be accessed, etc.). Some DBMS offer database administrators the flexibility to choose between different data structures that are most suitable for the user data in terms of performance. Some data structures have selectable parameters to adjust the database performance.

Databases can store data in many different data structure types. Common examples are as follows:

Data orientation and grouping

In contrast to the conventional row orientation, relational databases can also be organized column-oriented or correlationally.

In general, significant performance improvements are achieved by grouping different types of database objects that are commonly used together in close proximity in memory. This allows the required related objects to be obtained from the memory with a minimal number of input operations (sometimes considerably time-consuming). Even with in-memory databases, grouping offers performance advantages by sharing large buffers for input-output operations in memory, with similar result behavior.

For example, it may be advantageous to group an "Item" record in the warehouse with all of its respective "Order" records. The decision as to whether or not certain objects are grouped depends on the usage statistics of the object, the object size, buffer sizes, storage types, etc.

Database indexing

Indexing is a technique that some storage engines use to improve database performance. The common feature of the many types of indexes is that they reduce the need to examine each entry when executing a query. In large databases, this can reduce query times by orders of magnitude. The simplest form of an index is a sorted list of values ​​that is processed by means of a binary search and has an attached reference to the position of the data record, analogous to the index at the end of a book. The same data can have multiple indexes (e.g., a database of employees can be indexed by both last name and hiring date).

Indexes affect performance, but not results. Database designers can therefore add or remove indexes without having to adjust the business logic. This reduces maintenance costs as the size of the database and the number of queries grow. Indexes take up additional space in the database and must be updated after every data change. Indexes can therefore speed up data access, but slow down data maintenance. These two properties determine whether the advantages of an index outweigh its disadvantages.

See also

Individual evidence

  1. Lightstone, Teorey, Nadeau: Physical Database Design . 2007, ISBN 0-12-369389-6 .

Web links