Database abstraction layer

Database abstraction layer

A database abstraction layer is an application programming interface which unifies the communication between a computer application and databases such as SQL Server, DB2, MySQL, PostgreSQL, Oracle or SQLite. Traditionally, all database vendors provide their own interface tailored to their products which leaves it to the application programmer to implement code for all database interfaces he or she would like to support. Database abstraction layers reduce the amount of work by providing a consistent API to the developer and hide the database specifics behind this interface as much as possible. There exist many abstraction layers with different interfaces in numerous programming languages.

Contents

API level abstraction

Libraries like OpenDBX unify access to databases by providing a single low-level programming interface to the application developer. Their advantages are most often speed and flexibility because they are not tied to a specific query language (subset) and only have to implement a thin layer to reach their goal. The application developer can choose from all language features but has to provide configurable statements for querying or changing tables. Otherwise his application would also be tied to one database.

Popular use for database abstraction layers are among object-oriented programming languages, which are similar to API level abstraction layers. In an object oriented language like C++ or Java, a database can be represented through an object, whose methods and members (or the equivalent thereof in other programming languages) represent various functionalities of the database. They also share the same advantages and disadvantages as API level interfaces.

Language level abstraction

An example of a database abstraction layer on the language level would be ODBC. ODBC is a platform-independent implementation of a database abstraction layer. The user installs specific driver-software, through which ODBC can communicate with a database or set of databases. The user then has the ability to have programs communicate with ODBC, which then relays the results back and forth between the user programs and the database. The downside of this abstraction level is the increased overhead to transform statements into constructs understood by the target database.

Arguments for

Development period

Software developers only have to know the database abstraction layer's API instead of all APIs of the databases his application should support. The more databases should be supported the bigger is the time saving.

Wider potential install-base

Using a database abstraction layer means that there is no requirement for new installations in utilise a specific database, i.e. new users who are unwilling or unable to switch databases can deploy on their existing infrastructure.

Future-proofing

Developer Testing

A production database may be replaced with a desktop level implementation of the data for developer level unit tests.

Arguments against

Speed

Any abstraction layer will reduce the overall speed more or less depending on the amount of additional code that have to be executed. The more a database layer abstracts from the native database interface and tries to emulate features not present on all database backends, the slower the overall performance. This is especially true for database abstraction layers that try to unify the query language as well like ODBC.

Dependency

A database abstraction layer provides yet another functional dependency for a software system, i.e. a given database abstraction layer, like anything else, may eventually become obsolete, outmoded or unsupported.

Masked operations

Database abstraction layers likely limit the number of available database operations to a subset of those supported by the supported database backends. In particular, database abstraction layers may not fully support database backend-specific optimizations or debugging features. These problems magnify significantly with database size, scale, and complexity.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Database abstraction layer — Eine Datenbankabstraktionsschicht ist eine Programmierschnittstelle, welche die Verbindung zwischen einer Software Anwendung und damit zu verbindenden Datenbanken vereinheitlicht. Damit kann ein Verwalter bei der Installation der Anwendung aus… …   Deutsch Wikipedia

  • Abstraction layer — This is about the concept in computer science, for the concept in grouping, see Principle of abstraction. An abstraction layer (or abstraction level) is a way of hiding the implementation details of a particular set of functionality. Software… …   Wikipedia

  • Abstraction (computer science) — In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization… …   Wikipedia

  • Database security — concerns the use of a broad range of information security controls to protect databases (potentially including the data, the database applications or stored functions, the database systems, the database servers and the associated network links)… …   Wikipedia

  • Document-oriented database — A document oriented database is a computer program designed for storing, retrieving, and managing document oriented, or semi structured data, information. Document oriented databases are one of the main categories of so called NoSQL databases and …   Wikipedia

  • Database — A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality (for example, the availability of rooms in hotels), in a way that supports… …   Wikipedia

  • Relational database — A visual diagram showing the relationship between the two tables, as indicated by the arrow A relational database matches data by using common characteristics found within the data set. The resulting groups of data uses the relational model (a… …   Wikipedia

  • Data access layer — A data access layer (DAL) is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity relational database. For example, the DAL might return a reference to an object (in… …   Wikipedia

  • Drupal — Drupal …   Wikipedia

  • Dba — steht für: dba (Fluggesellschaft) Dibenzylidenaceton Deutscher Bundesverband der Atem ,Sprech und Stimmlehrer DBA steht für: Data Bank Access Data Base Agent Datenbankadministrator (engl. Database Administrator) Database abstraction layer, eine… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”