PHPackages                             avryhof/database - 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. avryhof/database

ActiveLibrary[Database &amp; ORM](/categories/database)

avryhof/database
================

Database Abstraction Layer

v1.0.0(10y ago)0178MITPHPPHP &gt;=5.0.0

Since Feb 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/avryhof/database)[ Packagist](https://packagist.org/packages/avryhof/database)[ Docs](https://github.com/avryhof/database)[ RSS](/packages/avryhof-database/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Database
========

[](#database)

A Simple Database abstraction layer.

Normalization
-------------

[](#normalization)

This library is designed mostly to normailze the usage of the included databases.

Object Oriented
---------------

[](#object-oriented)

Enables some non object-oriented databse functions to be accessed and used in an object-oriented way.

K.I.S.S.
--------

[](#kiss)

This layer is designed so you don't need to learn a whole new way of working with databases. It is designed to work as closely to the built-in PHP functionality as possible, while making it possible to port your application from any of the supported databses to another without changing a bunch of code.

Example
-------

[](#example)

```
  require_once("database.php");

  $db = new Database("mysql://user:pass@localhost/database");

  or

  $db = new Database("sqlite:///home/user/data/users.db?mode=0666");

  /* The Code Below works the same on all supported databases! */

  $db->insert("users", array("name" => "User", "password" => "{password}", "email" => "someone@example.com"));

  $users = $db->query("SELECT * FROM users WHERE name = 'User'");

  if ($users->num_rows > 0) {
    while($user = $users->fetch_assoc()) {
      echo "" . print_r($user,true) . "";
    }
  }

  $db->update("users", array("name" => "Bob"),"name = 'User'");

  $db->delete("users", "name = 'Bob'");
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3735d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1bbaf79552976ede049c2bffb031d87621508077a0f73d2cae3683d31e398efe?d=identicon)[avryhof](/maintainers/avryhof)

---

Tags

databasemysqlsqlite

### Embed Badge

![Health badge](/badges/avryhof-database/health.svg)

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

###  Alternatives

[cycle/database

DBAL, schema introspection, migration and pagination

64690.9k31](/packages/cycle-database)[opis/database

A database abstraction layer over PDO, that provides a powerful and intuitive query builder, bundled with an easy to use schema builder

10184.2k3](/packages/opis-database)[boxed-code/laravel-scout-database

Generic database driver for laravel scout.

1151.7k](/packages/boxed-code-laravel-scout-database)

PHPackages © 2026

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