Database abstraction layer: Difference between revisions

Content deleted Content added
m Reverted edits by 180.233.120.105 (talk) (HG) (3.4.4)
FrescoBot (talk | contribs)
m Bot: link syntax and minor changes
Line 2:
A '''database abstraction layer''' ('''DBAL'''<ref>{{cite book|url=https://books.google.fr/books?id=2IfDCgAAQBAJ&pg=PA346&dq=%22Database+abstraction+layer%22+DBAL&hl=en&sa=X&redir_esc=y#v=onepage&q=%22Database%20abstraction%20layer%22%20DBAL&f=false|title=JavaScript Frameworks for Modern Web Dev|authors=Tim Ambler, Nicholas Cloud|editor=Apress|date=13 October 2015}}</ref>) is an [[application programming interface]] which unifies the communication between a computer application and [[database]]s such as [[MSSQL|SQL Server]], [[IBM DB2|DB2]], [[MySQL]], [[PostgreSQL]], [[Oracle database|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. If an application has such a layer built in, it is called '''database-agnostic'''.<ref>http://searchdatamanagement.techtarget.com/definition/database-agnostic</ref>
 
== Database levels of abstraction ==
 
=== Physical level (lowest level) ===
Line 16:
=== External or view level ===
The external level is exposed to users and developers and supplies a consistent pattern for performing database operations.
<ref>http://www.dmst.aueb.gr/dds/etech/db/abstr.htm</ref> Database operations are represented only loosely as SQL or even database access at this level.
 
Every database should be treated equally at this level with no apparent difference despite varying physical data types and operations.
Line 28:
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.
 
Alternatively, there are thin wrappers, often described as ''lightweight'' abstraction layers, such as OpenDBX<ref>{{cite web |url=https://www.linuxnetworks.de/doc/index.php?title=OpenDBX |title=OpenDBX |author==<!--Not stated--> |date=24 June 2012 |website=linuxnetworks.de |access-date=26 July 2018}}</ref><ref>{{cite web |url=https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/OpenDBX |dead-url=yes |title=OpenDBX | archive-url=https://web.archive.org/web/20060913000000/http://en.wikipedia.org:80/wiki/OpenDBX |archive-date=13 September 2006}}</ref>{{Better source|reason=per WP:CIRCULAR|date=August 2018}} and libzdb.<ref>{{cite web |url=http://www.tildeslash.com/libzdb/ |title=Libzdb |author==<!--Not stated--> |access-date=26 July 2018 |year=2018 |website=tildeslash.com}}</ref> Finally, large projects may develop their own libraries, such as, for example, libgda<ref>{{cite web |url=http://www.gnome-db.org/ |title=GNOME-DB |author==<!--Not stated--> |access-date=26 July 2018 |date=12 June 2015 |quote=Libgda library [...] is mainly a database and data abstraction layer, and includes a GTK+ based UI extension, and some graphical tools.}}</ref> for [[GNOME]].
 
== Arguments for ==
Line 45:
 
=== Added Database Features ===
Depending on the database and the DAL, it may be possible for the DAL to add features to the database. A DAL may use database programming facilities or other methods to create standard but unsupported functionality, or completely new functionality. For instance the DBvolution DAL implements the standard deviation function for several databases that do not support it.
 
== Arguments against ==