PHPackages                             mitchellurgero/jsondatabase - 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. mitchellurgero/jsondatabase

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

mitchellurgero/jsondatabase
===========================

Flat-file Database that uses JSON to store data in a file structure similar to MySQL.

412PHP

Since Apr 25Pushed 8y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

JSONDatabase class written by Mitchell Urgero
===============================================================

[](#jsondatabase-class-written-by-mitchell-urgero-infourgeroorg)

- GitHub:

### This DB class supports the following functions:

[](#this-db-class-supports-the-following-functions)

- init("DATABASE\_NAME", "DATABASE\_LOCATION" = null); //Load or create new database, then select it. (Optionally give a location to store the databse)
- insert("TABLE\_NAME", '{"data":"in","JSON":"format"}', int = null);//Insert or add a new row into given table (Optional 3rd option: replace given row number)
- select("TABLE\_NAME", "WHERE" = null, "EQUALS" = null);//get data from selected row
- create\_table("TABLE\_NAME");//Create a new table with the given name.
- delete\_table("TABLE\_NAME");//Delete the given table.
- dump\_tables();//Dump all tables AND their data (Mostly for backup purposes.)
- check\_table("TABLE\_NAME");//Check if a table exists. Returns number of rows if table exists.
- list\_tables();//List all available tables in selected database.
- import("JSON\_STRING\_OF\_DB\_BACKUP");//import a database backup and restore into the given database.

Things to note:
===============

[](#things-to-note)

- row\_id is the row number. This is not written to the db BUT generated on the fly. and always exists as a part of the row data
- dump\_tables() will always take a little bit of time because it dumps ALL THE TABLES TO AN ARRAY.

How To Use
==========

[](#how-to-use)

include('db.php');

$db = new JSONDatabase("DATABASE\_NAME");

$db-&gt;functionName(options);

Install
=======

[](#install)

Either git clone this repository, or use `composer require mitchellurgero/jsondatabase` to install via composer.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4168998?v=4)[Mitchell Urgero](/maintainers/mitchellurgero)[@mitchellurgero](https://github.com/mitchellurgero)

---

Top Contributors

[![mitchellurgero](https://avatars.githubusercontent.com/u/4168998?v=4)](https://github.com/mitchellurgero "mitchellurgero (27 commits)")[![simon511000](https://avatars.githubusercontent.com/u/31013205?v=4)](https://github.com/simon511000 "simon511000 (10 commits)")

### Embed Badge

![Health badge](/badges/mitchellurgero-jsondatabase/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/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)
