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. horde/db

ActiveLibrary

horde/db
========

Database abstraction library

v3.0.0alpha8(2mo ago)12.2k—2.5%5[1 PRs](https://github.com/horde/Db/pulls)20BSD-2-ClausePHPPHP ^7.4 || ^8

Since Sep 12Pushed 2mo 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 1mo ago

READMEChangelog (2)Dependencies (16)Versions (30)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

53

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community36

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 70.8% 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 ~190 days

Recently: every ~314 days

Total

25

Last Release

65d ago

Major Versions

2.4.1 → 3.0.0alpha12021-02-24

PHP version history (6 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

### 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)

---

Top Contributors

[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (484 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)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (45 commits)")[![wrobel](https://avatars.githubusercontent.com/u/10232?v=4)](https://github.com/wrobel "wrobel (8 commits)")[![TDannhauer](https://avatars.githubusercontent.com/u/6716033?v=4)](https://github.com/TDannhauer "TDannhauer (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)")[![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)")[![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)")

### 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

581.7k34](/packages/horde-horde)[horde/imap_client

IMAP client library

263.3k8](/packages/horde-imap-client)

PHPackages © 2026

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