PHPackages                             alpha-orm/alpha-orm - 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. alpha-orm/alpha-orm

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

alpha-orm/alpha-orm
===================

A nice database orm written in php

1.2.02(6y ago)1101[5 issues](https://github.com/alpha-orm/php-alpha-orm/issues)MITPHP

Since Nov 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alpha-orm/php-alpha-orm)[ Packagist](https://packagist.org/packages/alpha-orm/alpha-orm)[ RSS](/packages/alpha-orm-alpha-orm/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (7)Used By (0)

alpha-orm
=========

[](#alpha-orm)

An extraordinary python database orm

Features
--------

[](#features)

- Automatically creates tables and columns
- No configuration required, simply create database
- Currently supported databases include mysql

Examples
--------

[](#examples)

### Setup (MySQL)

[](#setup-mysql)

```
use ALphaORM\ALphaORM as DB

DB::setup('mysql',[
  'host' => 'localhost',
  'user' => 'root',
  'password' => '',
  'database' => 'alphaorm'
]);
```

### CREATE

[](#create)

```
#--------------------------------------
#	CREATE 1
#--------------------------------------
$product = DB::create('product');
$product->name = 'Running shoes';
$product->price = 5000;
DB::store($product);

#--------------------------------------
#	CREATE 2
#--------------------------------------
$author = DB::create('author');
$author->name = 'Chimamanda Adichie';

$book = DB::create('book');
$book->title = 'Purple Hibiscus';
$book->author = $author;
DB::store($book);
```

### READ

[](#read)

```
#--------------------------------------
#	READ 1 [get all records]
#--------------------------------------
$books = DB::getAll('book');
foreach ($books as $book) {
	print("{$book->title} by {$book->author->name}");
}

#--------------------------------------
#	READ 2 [filter one]
#--------------------------------------
$book = DB::find('book','id = :bid', [ 'bid' => 1 ]);
print("{$book->title} by {$book->author->name}");

#--------------------------------------
#	READ 3 [filter all]
#--------------------------------------
$author = DB::find('author','name = :authorName',[ 'authorName' => 'William Shakespare' ]);
$booksByShakespare = DB::findAll('book', 'author_id = :authorId', [ 'authorId' => $author->getID() ]);
print('Books by William Shakespare are :');
foreach ($booksByShakespare as $book) {
	print($book->title);
}
```

### UPDATE

[](#update)

```
#--------------------------------------
#	UPDATE
#--------------------------------------
$product = DB::find('product', 'id = :pid', [ 'pid' => 1 ]);
$product->price = 500;

$book = DB::find('book','id = :bid', [ 'bid' => 1 ]);
$book->author->name = 'New author';
$book->isbn = '3847302-SD';
$book->title = 'New Title';
DB::store($book);
print($book);
```

### DELETE

[](#delete)

```
#--------------------------------------
#	DELETE 1 [delete single record]
#--------------------------------------
$book = DB::find('book','id = :bid', [ 'bid' => 1 ]);
DB::drop($book);

#--------------------------------------
#	DELETE 2 [delete all records]
#--------------------------------------
DB::dropAll('book');
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

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

Total

6

Last Release

2337d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43606892?v=4)[Claret Nnamocha](/maintainers/claretnnamocha)[@claretnnamocha](https://github.com/claretnnamocha)

---

Top Contributors

[![claretnnamocha](https://avatars.githubusercontent.com/u/43606892?v=4)](https://github.com/claretnnamocha "claretnnamocha (26 commits)")

---

Tags

databaseormmysqldbdatabase-ormdb-orm

### Embed Badge

![Health badge](/badges/alpha-orm-alpha-orm/health.svg)

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

###  Alternatives

[rah/danpu

Zero-dependency MySQL dump library for easily exporting and importing databases

64401.8k10](/packages/rah-danpu)[dbout/wp-orm

WordPress ORM with Eloquent.

1279.6k1](/packages/dbout-wp-orm)[davmixcool/php-dbcloud

Easily backup PostgreSql or MySql database to the cloud

111.5k](/packages/davmixcool-php-dbcloud)

PHPackages © 2026

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