Database interface
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:
- IDAPI ( I ntegrated D atabase A pplication P rogramming I nterface) is one of Borland , IBM , Novell and WordPerfect Corporation issued driver family, the competitor to ODBC.
- ODBC ( O pen D ata b ase C onnectivity) is one of Microsoft developed driver family, the now independent of operating systems and programming languages , and therefore very common. ODBC is based on the SQL Call Level Interface (CLI) of the SQL Access Group.
Language-independent interfaces
There are a number of database interfaces that are not tied to a specific query language:
- ADO.NET is an object-oriented access layer for the .NET class library developed by Microsoft .
- JDBC (Java DataBase Connectivity) is a driver family developed by Sun Microsystems that is mainly used with the Java programming language .
- OpenDBX is a database interface written in the C programming language and optimized for speed and flexibility.
Frequently used database interfaces
Some programming languages with the commonly used database interfaces are listed below.
- C ++ / Windows : ODBC (Open DataBase Connectivity)
- Object Pascal / Delphi : BDE (Borland Database Engine)
- Perl : Perl DBI (Perl DataBase Independent)
- Visual Basic Classic : Microsoft ADO (ActiveX Data Objects)
- Java : Java Database Connectivity (JDBC)