Database interface

from Wikipedia, the free encyclopedia

A database interface is a programming interface that regulates access to and data exchange with a database , i. H. enables communication between a software application and the database. Through a defined database interface, data records can be read out or changed without knowing the administration and storage structure of the database.

Traditionally, every database, such as B. MySQL , Oracle or SQLite via their own, tailor-made programming interface. It is up to the application developer to create database interfaces for those applications with which his application should be able to communicate. This additional effort can be avoided by using one of the common, generalized database interfaces instead of the manufacturer-specific interfaces.

Language-specific interfaces

In a first step, the syntax of the interface language is translated from the database-specific part of the interface into the syntax of the target database. This then carries out the request according to the particularities of the specific database. Usually it is a dialect of the widely used SQL query language. This process is transparent for the programmer: he does not have to change his request if the database is replaced by another, because only the driver (also known as the provider ) has to be replaced. The developer buys this flexibility, however, through increased administrative effort in the database interface, since the elements and constructs of the query language first have to be translated into the respective format of the target database.

Examples of language-specific database interfaces are:

Language-independent interfaces

There are a number of database interfaces that are not tied to a specific query language:

Frequently used database interfaces

Some programming languages ​​with the commonly used database interfaces are listed below.