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

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

othercode/database
==================

Database access library

v2.0(9y ago)351MITPHPPHP &gt;=5.3.3CI passing

Since May 8Pushed 3y ago2 watchersCompare

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

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

OtherCode Database
==================

[](#othercode-database)

[![Build Status](https://camo.githubusercontent.com/edbf7baa6bfe68ceb91369e96403c3a8b373e5558c0de8fe574b68887f6b566f/68747470733a2f2f7472617669732d63692e6f72672f6f74686572636f6465732f64617461626173652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/othercodes/database) [![Latest Stable Version](https://camo.githubusercontent.com/0c63fb226106777e02925b89dceed383dffd21b692b7181a7a2ab59b631fe0c8/68747470733a2f2f706f7365722e707567782e6f72672f6f74686572636f64652f64617461626173652f762f737461626c65)](https://packagist.org/packages/othercode/database) [![License](https://camo.githubusercontent.com/709df8bcda395c3bc92c07b2f21b0cababcd2c76f9e74ddade6a7cba0ce3b3ec/68747470733a2f2f706f7365722e707567782e6f72672f6f74686572636f64652f64617461626173652f6c6963656e7365)](https://packagist.org/packages/othercode/database) [![Total Downloads](https://camo.githubusercontent.com/ee13f164ce27097585393084bd4dc6ca62714bdaba1432d7f02b4444087274ef/68747470733a2f2f706f7365722e707567782e6f72672f6f74686572636f64652f64617461626173652f646f776e6c6f616473)](https://packagist.org/packages/othercode/database)

Light database abstraction layer (PDO)

Currently supported:

- MySQL
- SQLite
- Postgres

Installation
------------

[](#installation)

To install the package we only have to add the dependency to ***composer.json*** file:

```
"require": {
  "othercode/database": "*"
}
```

And run the following command:

```
composer update
```

### Install without Composer

[](#install-without-composer)

Also we can use this library without Composer, we only have to include in our script the **"database/autoload.php"** file.

```
require_once "database/autoload.php".
```

Configuration
-------------

[](#configuration)

Now we have to create the instance and add a new connection to it.

```
$db = new OtherCode\Database\Database();

$db->addConnection(array(
    'driver' => 'mysql',
    'host' => 'localhost',
    'dbname' => 'test',
    'username' => 'username',
    'password' => 'password'
));
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% 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

Unknown

Total

1

Last Release

3341d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7958790dcf5cd51ebbadc52fc7bada326fb3edd4481decf1006e6cfed8e46c43?d=identicon)[usantisteban](/maintainers/usantisteban)

---

Top Contributors

[![othercodes](https://avatars.githubusercontent.com/u/4815856?v=4)](https://github.com/othercodes "othercodes (59 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

### Embed Badge

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

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M116](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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