Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store


Zend_Db and its related classes provide a simple SQL database interface for Zend Framework. The Zend_Db_Adapter is the basic class you use to connect your PHP application to an RDBMS. There is a different Adapter class for each brand of RDBMS.

The Zend_Db adapters create a bridge from the vendor-specific PHP extensions to a common interface to help you write PHP applications once and deploy with multiple brands of RDBMS with very little effort.

The interface of the adapter class is similar to the interface of the PHP Data Objects extension. Zend_Db provides Adapter classes to PDO drivers for the following RDBMS brands:

  • IBM DB2 and Informix Dynamic Server (IDS), using the pdo_ibm PHP extension

  • MariaDB, using the pdo_mysql PHP extension

  • MySQL, using the pdo_mysql PHP extension

  • Microsoft SQL Server, using the pdo_dblib PHP extension

  • Oracle, using the pdo_oci PHP extension

  • PostgreSQL, using the pdo_pgsql PHP extension

  • SQLite, using the pdo_sqlite PHP extension

In addition, Zend_Db provides Adapter classes that utilize PHP database extensions for the following RDBMS brands:

  • MariaDB, using the mysqli PHP extension

  • MySQL, using the mysqli PHP extension

  • Oracle, using the oci8 PHP extension

  • IBM DB2 and DB2 I5, using the ibm_db2 PHP extension

  • Firebird (Interbase), using the php_interbase PHP extension


Each Zend_Db Adapter uses a PHP extension. You must have the respective PHP extension enabled in your PHP environment to use a Zend_Db Adapter. For example, if you use any of the PDO Zend_Db Adapters, you need to enable both the PDO extension and the PDO driver for the brand of RDBMS you use.

Zend Framework