PHPackages                             horde/db - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. horde/db

ActiveHorde-library[Database &amp; ORM](/categories/database)

horde/db
========

Database abstraction library

v3.0.0(3d ago)14.3k↑42.9%520BSD-2-ClausePHPPHP ^8.1

Since Sep 12Pushed 1w ago5 watchersCompare

[ Source](https://github.com/horde/Db)[ Packagist](https://packagist.org/packages/horde/db)[ Docs](https://www.horde.org/libraries/Horde_Db)[ RSS](/packages/horde-db/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced yesterday

READMEChangelog (6)Dependencies (34)Versions (39)Used By (20)

```
Horde_Db

Horde_Db provides database connection abstraction and SQL compatibility tools for a number of database systems and PHP extensions. It currently supports the following databases and extensions:

+-------------+----------+
|Database     |Extension |
+-------------+----------+
|MySQL/MariaDB|mysql     |
|             +----------+
|             |mysqli    |
|             +----------+
|             |PDO_mysql |
+-------------+----------+
|PostgreSQL   |PDO_pgsql |
+-------------+----------+
|SQLite       |PDO_sqlite|
+-------------+----------+
|Oracle       |oci8      |
+-------------+----------+

Advanced features include:

- Connection abstraction
- SQL compatibility tools
- Database schema management
- Master/server configuration with queries split to write and read instances
- BLOB/CLOB handling
- Caching
- Query logging

Connection management

Connecting to a database is as simple as instantiating a class implementing the Horde_Db_Adapter interface, providing the necessary connection parameters:

MySQL

Please note that the mysql PHP extension is deprecated as of PHP 7, as is the Horde_Db_Adapter_Mysql backend.

$config = [
    'host'     => 'localhost',
    'username' => 'user',
    'password' => 'secret',
    'database' => 'db',
];
$db = new Horde_Db_Adapter_Mysqli($config);
$db = new Horde_Db_Adapter_Pdo_Mysql($config);
$db = new Horde_Db_Adapter_Mysql($config);

Full list of connection parameters:

+---------------+---------+--------------------------------------+
|Parameter      |Mandatory|Meaning                               |
+---------------+---------+--------------------------------------+
|charset        |         |Connection character set              |
+---------------+---------+--------------------------------------+
|database/dbname|         |Database name                         |
+---------------+---------+--------------------------------------+
|host           |         |Host name, if using TCP connection (1)|
+---------------+---------+--------------------------------------+
|port           |         |Port number, if using TCP connection  |
+---------------+---------+--------------------------------------+
|socket         |         |Socket location, if using Unix sockets|
+---------------+---------+--------------------------------------+
|username       |X        |Database user                         |
+---------------+---------+--------------------------------------+

.:1 To workaround MySQL automatically using the unix socket if setting the host to 'localhost', the hostname will be translated from 'localhost' to '127.0.0.1' if using the TCP protocol
```

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance99

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community41

Growing community involvement

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 67.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~167 days

Recently: every ~27 days

Total

29

Last Release

3d ago

Major Versions

2.4.1 → 3.0.0alpha12021-02-24

PHP version history (7 changes)2.1.0PHP &gt;=5.3.0

2.1.2PHP &gt;=5.3.0,&lt;=6.0.0alpha1

2.3.1PHP &gt;=5.3.0,&lt;=8.0.0alpha1

2.4.1PHP ^5.3 || ^7

3.0.0alpha1PHP ^7

v3.0.0alpha4PHP ^7.4 || ^8

v3.0.0beta1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c943a083635c28520599075eaea7ede2d743b7697b76e84d6bdc37e52cc8249b?d=identicon)[yunosh](/maintainers/yunosh)

![](https://www.gravatar.com/avatar/c931cd02664859360478593450d6c473a05bb12b209dfacfc534cd13257cc7ef?d=identicon)[ralflang](/maintainers/ralflang)

![](https://www.gravatar.com/avatar/e4f6c6771993db2ed500959b42353f6cf6a2ca0406d9617f7ae680f4504faa4a?d=identicon)[horde](/maintainers/horde)

![](https://www.gravatar.com/avatar/a7767adb66b45f2f05bcd44d49bc4e67efacd9ce05b161ce2d481d5dd6af025c?d=identicon)[mrubinsk](/maintainers/mrubinsk)

![](https://www.gravatar.com/avatar/816e2b926f25f8cd2939054c7a7173011b4303d690e25ab61bf33cf8c7cf71ae?d=identicon)[tdannhauer](/maintainers/tdannhauer)

---

Top Contributors

[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (484 commits)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (65 commits)")[![mrubinsk](https://avatars.githubusercontent.com/u/66822?v=4)](https://github.com/mrubinsk "mrubinsk (64 commits)")[![slusarz](https://avatars.githubusercontent.com/u/381003?v=4)](https://github.com/slusarz "slusarz (57 commits)")[![TDannhauer](https://avatars.githubusercontent.com/u/6716033?v=4)](https://github.com/TDannhauer "TDannhauer (18 commits)")[![wrobel](https://avatars.githubusercontent.com/u/10232?v=4)](https://github.com/wrobel "wrobel (8 commits)")[![Ivan-SB](https://avatars.githubusercontent.com/u/10403516?v=4)](https://github.com/Ivan-SB "Ivan-SB (6 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (3 commits)")[![atoomic](https://avatars.githubusercontent.com/u/405282?v=4)](https://github.com/atoomic "atoomic (2 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![mnaberez](https://avatars.githubusercontent.com/u/52712?v=4)](https://github.com/mnaberez "mnaberez (2 commits)")[![PaulSzymanski](https://avatars.githubusercontent.com/u/519954?v=4)](https://github.com/PaulSzymanski "PaulSzymanski (1 commits)")[![myrho](https://avatars.githubusercontent.com/u/1172181?v=4)](https://github.com/myrho "myrho (1 commits)")[![midahp](https://avatars.githubusercontent.com/u/19747890?v=4)](https://github.com/midahp "midahp (1 commits)")[![thomasjfox](https://avatars.githubusercontent.com/u/1146758?v=4)](https://github.com/thomasjfox "thomasjfox (1 commits)")[![ghunti](https://avatars.githubusercontent.com/u/392038?v=4)](https://github.com/ghunti "ghunti (1 commits)")[![dulinux](https://avatars.githubusercontent.com/u/539696?v=4)](https://github.com/dulinux "dulinux (1 commits)")

---

Tags

schemamigrationdbal

### Embed Badge

![Health badge](/badges/horde-db/health.svg)

```
[![Health](https://phpackages.com/badges/horde-db/health.svg)](https://phpackages.com/packages/horde-db)
```

###  Alternatives

[horde/horde

Horde base application

583.0k70](/packages/horde-horde)[horde/kronolith

Calendar and scheduling application

101.5k4](/packages/horde-kronolith)[horde/imp

Webmail application

261.3k](/packages/horde-imp)[horde/imap_client

IMAP client library

275.5k19](/packages/horde-imap-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
