PHPackages                             rstoetter/ckeycolumnusagetree-php - 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. rstoetter/ckeycolumnusagetree-php

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

rstoetter/ckeycolumnusagetree-php
=================================

The class cKeyColumnUsageTree represents a sorted collection of the key column usage of a mysql database. The main purpose of the class is to determine the dependencies of the tables among each other: The class is able to find dependency paths of more than two tables, when another tables are involved. Dependencies which include self referencing tables are considered, too.

v1.0.4(8y ago)0251MITPHPPHP &gt;=7.0

Since Mar 26Pushed 8y agoCompare

[ Source](https://github.com/rstoetter/ckeycolumnusagetree-php)[ Packagist](https://packagist.org/packages/rstoetter/ckeycolumnusagetree-php)[ RSS](/packages/rstoetter-ckeycolumnusagetree-php/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (6)Used By (1)

the repository rstoetter\\ckeycolumnusagetree-php
=================================================

[](#the-repository-rstoetterckeycolumnusagetree-php)

description
-----------

[](#description)

The class cKeyColumnUsageTree is the main class of the repository \\rstoetter\\ckeycolumnusagetree-php.

The class cKeyColumnUsageTree represents a sorted collection of the key column usage of a mysql database. The main purpose of the class cKeyColumnUsageTree is to determine the dependencies of the tables among each other: The class cKeyColumnUsageTree is able to find dependency paths of more than two tables, when another tables are involved. Dependencies which include self referencing tables are considered, too.

Only mysql databases are supported at the moment

helper classes
--------------

[](#helper-classes)

There are some helper classes, which are significantly involved in adding functionality to the class cKeyColumnUsageTree:

- The class cKeyColumnUsageTreeNode represents a single node in trees of the type \\rstoetter\\ckeycolumnusagetree\\cKeyColumnUsageTree. The class manages the data part, which can be retrieved by using the method GetData( )
- The class cKeyColumnUsageTreeNodeData implements the data part of the nodes in trees of the type \\rstoetter\\ckeycolumnusagetree\\cKeyColumnUsageTree

You will need PHP 7 or later to use this repository

usage
-----

[](#usage)

An usage example would be:

```
   $schema_name = 'give me the name of my database';
   $table_name = 'give me the name of an existing table in the schema';

   // open the database
   $mysqli = new mysqli(
                    'the database host',
                    'the database account name',
                    'the password of the database account',
                    $schema_name
                );

   // retrieve the key column usage information from the database
   $obj_ac_key_column_usage = new \rstoetter\libsqlphp\cKEY_COLUMN_USAGE( $schema_name, $mysqli );

   // build the sorted tree
   $obj_key_column_usage_tree = new \rstoetter\ckeycolumnusagetree\cKeyColumnUsageTree( $obj_ac_key_column_usage );

   // search for an item in the tree
   $obj_found = $obj_key_column_usage_tree->SearchByKey( $table_name );

   if ( $obj_found !== false ) {
        echo "\n the found node is associated with the table " . $obj_found->GetData( )->m_table_name;
   }
```

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

[](#installation)

This project assumes you have composer installed. Simply add:

"require" : {

```
"rstoetter/ckeycolumnusagetree-php" : ">=1.0.0"

```

}

to your composer.json, and then you can simply install with:

composer install

Namespace
---------

[](#namespace)

Use the namespace \\rstoetter\\ckeycolumnusagetree in order to access the classes provided by the repository ckeycolumnusagetree-php

More information
----------------

[](#more-information)

See the [project wiki of ckeycolumnusagetree-php](https://github.com/rstoetter/ckeycolumnusagetree-php/wiki) for more technical informations.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

2969d ago

### Community

Maintainers

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

---

Top Contributors

[![rstoetter](https://avatars.githubusercontent.com/u/24063757?v=4)](https://github.com/rstoetter "rstoetter (6 commits)")

---

Tags

phpdependencymysqldependenciesscannertables

### Embed Badge

![Health badge](/badges/rstoetter-ckeycolumnusagetree-php/health.svg)

```
[![Health](https://phpackages.com/badges/rstoetter-ckeycolumnusagetree-php/health.svg)](https://phpackages.com/packages/rstoetter-ckeycolumnusagetree-php)
```

###  Alternatives

[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

9.4k2.8k](/packages/leantime-leantime)[clouddueling/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k22.9k](/packages/clouddueling-mysqldump-php)[stefangabos/zebra_database

An advanced, compact and lightweight MySQL database wrapper library, built around PHP's MySQLi extension.

11812.0k](/packages/stefangabos-zebra-database)[eftec/pdoone

Minimaist procedural PDO wrapper library

1105.9k9](/packages/eftec-pdoone)[popphp/pop-db

Pop Db Component for Pop PHP Framework

1814.6k11](/packages/popphp-pop-db)[matthew-p/docker-server

Universal docker server, Nginx, PHP-FPM, MySql, Redis

112.8k](/packages/matthew-p-docker-server)

PHPackages © 2026

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