Database abstraction layer

from Wikipedia, the free encyclopedia

A database abstraction layer (English database abstraction layer is) a programming interface , which the connection between a software - application and to be connected databases unified. This allows an administrator to choose from a number of possible database products when installing the application without having to adapt the program code .

Over time, separate database interfaces had been developed for the various databases and programming environments, some of which provide specific database functions and some of which only map syntax deviations. The syntax differences are balanced out by a database abstraction layer and the programming and thus also the maintainability of the software are improved. In addition, a database abstraction layer ensures a certain database independence, which greatly reduces the lock-in effect .

On the other hand, functions that go beyond the standard (such as SQL ) cannot be used or can only be used to a limited extent via a database abstraction layer . Another disadvantage of a database abstraction layer is the additional processing effort for language and data conversions at runtime; on the other hand, optimization possibilities of the database abstraction layer such as caching , dirty checking, connection pooling or lazy loading increase the performance.

Database abstraction layers are available today for most programming languages and a number of frameworks , such as:

For the language C and C ++ , for example, the OpenDBX library is offered, which is supposed to ensure high access speed, while the ODBC database interface , which spans language and platforms, places more emphasis on uniform standards and widespread use.

Further functions of a dba are used in object-oriented environments, where the API also maps objects to the possibly deviating, for example relational table structure.

See also