PHPackages                             ppeco/dbpp - 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. ppeco/dbpp

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

ppeco/dbpp
==========

The library makes working with database easier and simpler

1.3(4y ago)350MITPHPPHP &gt;=8.0

Since May 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/PPEco/dbpp)[ Packagist](https://packagist.org/packages/ppeco/dbpp)[ RSS](/packages/ppeco-dbpp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)DependenciesVersions (10)Used By (0)

dbpp
====

[](#dbpp)

dbpp is a library that simplifies database queries by collecting them into one class.

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

[](#installation)

dbpp requires composer and php 8.0 or higher.

For installation run this command in composer:

```
composer require ppeco/dbpp
```

Usage
-----

[](#usage)

The main class for dbpp is Database. Create a class extended from Database from dbpp.

```
class SimpleDatabase extends Database {

}
```

Create a class that will contain all the queries for a specific table. The class should be extended from the Dao class from dbpp.

```
class TableDao extends Dao {

}
```

Create functions with query annotations from dbpp. They can be Query and Insert. Functions should call a function from parent.

```
abstract class TableDao extends Dao {
    #[Query("SELECT * FROM `table`")]
    public abstract function getAll(): array|false;

    #[Query("SELECT * FROM `table` WHERE `id` = :id")]
    public abstract function getById(int $id): array|false;

    #[Insert("INSERT `table`(`id`, `name`) VALUES(NULL, :name)")]
    public abstract function insert(string $name): bool;

    #[Insert("INSERT `table`(`id`, `name`) VALUES(NULL, :name)", ['id'])]
    public abstract function insert2(string $name): int|bool;
}
```

Link your Dao to Database via class properties.

```
class SimpleDatabase extends Database {
   public TableDao $table;
}
```

Well, the final steps. Create PDO object and create Database class

```
$pdo = new PDO(*data*);
$database = new SimpleDatabase($pdo);
```

Now you can call methods from the Database class

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~33 days

Recently: every ~50 days

Total

9

Last Release

1572d ago

Major Versions

0.1.1 → 1.0.02021-07-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/6473733ff076c742881f59f82ffcbc817ed25ec0bc40a72d49630498f1fec03b?d=identicon)[levkopo](/maintainers/levkopo)

---

Top Contributors

[![levkopo](https://avatars.githubusercontent.com/u/40952805?v=4)](https://github.com/levkopo "levkopo (21 commits)")

---

Tags

databaseinterfacepdophpppecosecurity-tools

### Embed Badge

![Health badge](/badges/ppeco-dbpp/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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