PHPackages                             nwcode4hire/baobab - 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. nwcode4hire/baobab

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

nwcode4hire/baobab
==================

mptt

010PHP

Since Feb 21Pushed 13y ago1 watchersCompare

[ Source](https://github.com/nwcode4hire/Baobab)[ Packagist](https://packagist.org/packages/nwcode4hire/baobab)[ RSS](/packages/nwcode4hire-baobab/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Baobab ( a library applying the *nested set model* )
====================================================

[](#baobab--a-library-applying-the-nested-set-model-)

Baobab is a library to save tree structured data in a relational database.

Currently there is only a PHP implementation working with MySQL, but it shouldn't be too difficult to port to other languages or databases (most of the work is done via SQL queries and the code is mostly a support to them).

The technique used is Joe Celko's *nested set model*, modified so that a table can hold more than one tree, to help with cases such as storing threads of a forum (each thread is a tree and they all have an identical structure).

In fact when the library asks you for a "tree name", it's really asking for a forest name, because each table created can hold more than one tree.

We have more than one hundred tests to ensure the library is doing The Right Thing (™), a straightforward API and a clean documentation.

You can find the library's documentation at

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.1% 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/2358944?v=4)[nwcode4hire](/maintainers/nwcode4hire)[@nwcode4hire](https://github.com/nwcode4hire)

---

Top Contributors

[![riquito](https://avatars.githubusercontent.com/u/239925?v=4)](https://github.com/riquito "riquito (106 commits)")[![nwcode4hire](https://avatars.githubusercontent.com/u/2358944?v=4)](https://github.com/nwcode4hire "nwcode4hire (1 commits)")

### Embed Badge

![Health badge](/badges/nwcode4hire-baobab/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

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