PHPackages                             uuur86/ubdb - 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. uuur86/ubdb

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

uuur86/ubdb
===========

Lightweight PHP-JSON Database

v0.329.1(6y ago)3491MITPHPPHP &gt;=5.6.6

Since Oct 21Pushed 6y ago2 watchersCompare

[ Source](https://github.com/uuur86/ubdb)[ Packagist](https://packagist.org/packages/uuur86/ubdb)[ RSS](/packages/uuur86-ubdb/feed)WikiDiscussions master Synced 3d ago

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

UBDB
====

[](#ubdb)

JSON based database for PHP v0.328

REQUIREMENTS
------------

[](#requirements)

PHP &gt;= 5.2.0

INSTALL
-------

[](#install)

Only include ubdb.php to your codes.

USAGE
-----

[](#usage)

```
$ubdb = new ubdb();
// For Selecting a language
$ubdb->lang('en');
// For Define db, table and columns
$ubdb->db('mydb', array(
                        'users'=>array(
                            'username',
                            'password',
                            'email',
                            'phone'
                        ),

                        'products'=>array(
                            'productname',
                            'productcode',
                            'title',
                            'description'
                        ),
                        'cart'=>array(
                            'productid',
                            'userid'
                        )
                    )
                );
```

ADD ROW
-------

[](#add-row)

```
// add a row
$ubdb->add('cart', array('userid'=>'ugur'.$i));

// or

	// You can add multiple rows
	for($i=0;$iadd('cart', array('userid'=>'ugur'.$i));
	}

// If you defined all rows, you can save for writing new datas.
$ubdb->save();
```

GET ROW
-------

[](#get-row)

```
 // For any simple query for getting datas
 // When runnig below code, will be same all getting datas
 // ? Symbol holding only one character, % symbol holding multiple character as place.
 $get1 = $ubdb->get("users", "username", array("ugur",'?','1') ); // matches such as ugur11
 $get2 = $ubdb->get("users", "username", array("ug",'%','1') );   // matches such as ugur11 or ugor21

 // Joining two data array on one intersect point
 $results = $ubdb->join(
			$get1,       // first array
                        $get2,       // second array
                        "username",  // first intersect point
                        "userid"     // secondary intersect point
                        );
 // Will return as an array which is username equals to userid
```

DELETING
--------

[](#deleting)

```
$ubdb->delete($table,$id);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~306 days

Total

3

Last Release

2516d ago

PHP version history (2 changes)v0.328PHP &gt;=5.2.0

v0.329.1PHP &gt;=5.6.6

### Community

Maintainers

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

---

Top Contributors

[![uuur86](https://avatars.githubusercontent.com/u/17476001?v=4)](https://github.com/uuur86 "uuur86 (34 commits)")

### Embed Badge

![Health badge](/badges/uuur86-ubdb/health.svg)

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

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