database abstraction layer
A database abstraction layer is a simplified representation of a database in the form of a written description or a diagram.
Abstraction, in general, is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics. Database abstraction layers facilitate the design of flexible databases.
The three formal abstraction layers:
- User model: An informal representation of how the user describes the database.
- Logical model: More formal, with more detail and often rendered as an entity relationship model (ERM).
- Physical model: More detail added such as indexing and data types.
The alternative to abstraction layers is hard-coding rules and metadata into the database during development. In that case, coding also establishes how business terms, definitions, rules, and other information are defined on behalf of the applications that access the database.
Hard-coding is fine for those applications that are originally planned to access the database. However, that approach makes it much more complicated for other applications with different requirements to communicate with the database. A data abstraction layer allows for maximum flexibility and guarantees that when additional business applications need to access the database, it isn’t necessary to make significant changes to support them.