Database abstraction layer
Database abstraction layer
Allow the use of different database servers using the same code base.
Overview
Drupal's database abstraction layer provides a unified database query API that can query different underlying databases. It is built upon PHP's PDO (PHP Data Objects) database API, and inherits much of its syntax and semantics. Besides providing a unified API for database queries, the database abstraction layer also provides a structured way to construct complex queries, and it protects the database by using good security practices.
For more detailed information on the database abstraction layer, see https://www.drupal.org/developing/api/database.
Querying entities
Any query on Drupal entities or