PHPackages                             utechnology/dbsdk - 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. utechnology/dbsdk

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

utechnology/dbsdk
=================

SDK tools for using DB from php object

1.1.3(1y ago)030PHPCI passing

Since Mar 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/U-Technology/DbSDK)[ Packagist](https://packagist.org/packages/utechnology/dbsdk)[ RSS](/packages/utechnology-dbsdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (20)Used By (0)

🚀 DbSDK – Il tuo ORM per PHP
============================

[](#-dbsdk--il-tuo-orm-per-php)

DbSDK è un **ORM leggero e potente per PHP** che semplifica la gestione del database eliminando la necessità di scrivere query SQL manualmente.
Attualmente supporta **MySQL**, con il supporto a **PostgreSQL** in fase di sviluppo.

---

🌟 Caratteristiche principali
----------------------------

[](#-caratteristiche-principali)

✅ **Gestione automatica delle query** (`INSERT`, `UPDATE`, `DELETE`, `SELECT`)
✅ **Supporto per MySQL** (PostgreSQL in arrivo)
✅ **Configurazione minimale**
✅ **Semplice e intuitivo** – usa le classi come tabelle senza query SQL

---

📚 Installazione
---------------

[](#-installazione)

Installa DbSDK con **Composer**:

```
composer require utechnology/dbsdk
```

---

🔧 Configurazione
----------------

[](#-configurazione)

Configura il database nel tuo progetto:

```
use UTechnology\DbSDK\ConfigConnection;

ConfigConnection::settingConnectionMySQL(
                                        'localhost',
                                        'nome_database',
                                        'utente',
                                        'password'
);
```

---

🛠 Esempio d'uso
---------------

[](#-esempio-duso)

### **1️⃣ Creazione di un modello**

[](#1️⃣-creazione-di-un-modello)

```
use FieldName;
use IsAutoIncrement;
use IsPrimaryKeyField;
use TableName;
use UTechnology\DbSDK\__EntityDB;

#[TableName('UserAssociation')]
class User extends __EntityDB
{
    public function __construct(mixed $ID = null) {
        parent::__construct($ID);
    }

    #[IsPrimaryKeyField]
    #[IsAutoIncrement]
    #[FieldName('ID')]
    public int $ID;

    #[FieldName('Name')]
    public string $name;

    #[FieldName('Email')]
    public string $email;
}
```

### **2️⃣ Inserimento di un record**

[](#2️⃣-inserimento-di-un-record)

```
$user = new User();
$user->name = "Mario Rossi";
$user->email = "mario@example.com";
$user->__save();  // INSERT automatico
```

### **3️⃣ Selezione di un record**

[](#3️⃣-selezione-di-un-record)

```
$user = new User(1);  // Trova l'utente con ID 1
echo $user->name;
```

### **4️⃣ Aggiornamento di un record**

[](#4️⃣-aggiornamento-di-un-record)

```
$user->email = "nuovaemail@example.com";
$user->__save();  // UPDATE automatico
```

### **5️⃣ Eliminazione di un record**

[](#5️⃣-eliminazione-di-un-record)

```
$user->__delete();  // DELETE automatico
```

---

📖 Documentazione
----------------

[](#-documentazione)

Consulta la [documentazione completa](https://github.com/utechnology/dbsdk/wiki) per dettagli su tutte le funzionalità.

---

💜 Licenza
---------

[](#-licenza)

DbSDK è rilasciato sotto la licenza [MIT](LICENSE).

---

🌍 English Version
=================

[](#-english-version)

🚀 DbSDK – Your PHP ORM
======================

[](#-dbsdk--your-php-orm)

\\

DbSDK is a **lightweight and powerful PHP ORM** that simplifies database management by eliminating the need to write SQL queries manually.
Currently supports **MySQL**, with **PostgreSQL** support in development.

---

🌟 Key Features
--------------

[](#-key-features)

✅ **Automatic query handling** (`INSERT`, `UPDATE`, `DELETE`, `SELECT`)
✅ **MySQL support** (PostgreSQL coming soon)
✅ **Minimal configuration**
✅ **Simple and intuitive** – use classes as database tables without writing SQL

---

📚 Installation
--------------

[](#-installation)

Install DbSDK via **Composer**:

```
composer require utechnology/dbsdk
```

---

🔧 Configuration
---------------

[](#-configuration)

Set up your database connection:

```
use UTechnology\DbSDK\ConfigConnection;

ConfigConnection::settingConnectionMySQL(
                                        'localhost',
                                        'nome_database',
                                        'utente',
                                        'password'
);
```

---

🛠 Usage Example
---------------

[](#-usage-example)

### **1️⃣ Creating a Model**

[](#1️⃣-creating-a-model)

```
use FieldName;
use IsAutoIncrement;
use IsPrimaryKeyField;
use TableName;
use UTechnology\DbSDK\__EntityDB;

#[TableName('UserAssociation')]
class User extends __EntityDB
{
    public function __construct(mixed $ID = null) {
        parent::__construct($ID);
    }

    #[IsPrimaryKeyField]
    #[IsAutoIncrement]
    #[FieldName('ID')]
    public int $ID;

    #[FieldName('Name')]
    public string $name;

    #[FieldName('Email')]
    public string $email;
}
```

### **2️⃣ Inserting a Record**

[](#2️⃣-inserting-a-record)

```
$user = new User();
$user->name = "Mario Rossi";
$user->email = "mario@example.com";
$user->__save();  // Automatic INSERT
```

### **3️⃣ Selecting a Record**

[](#3️⃣-selecting-a-record)

```
$user = new User(1);  // Find user with ID 1
echo $user->name;
```

### **4️⃣ Updating a Record**

[](#4️⃣-updating-a-record)

```
$user->email = "nuovaemail@example.com";
$user->__save();  // Automatic UPDATE
```

### **5️⃣ Deleting a Record**

[](#5️⃣-deleting-a-record)

```
$user->__delete();  // Automatic DELETE
```

---

📖 Documentation
---------------

[](#-documentation)

Check out the [full documentation](https://github.com/utechnology/dbsdk/wiki) for more details.

---

💜 License
---------

[](#-license)

DbSDK is released under the [MIT License](LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance49

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.9% 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 ~3 days

Recently: every ~11 days

Total

19

Last Release

374d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cec3d79ddfd573aeef0ff9e11092e6a9b6d92ca569baa752d81f0727222cd826?d=identicon)[U-Technology](/maintainers/U-Technology)

---

Top Contributors

[![FortuRepo](https://avatars.githubusercontent.com/u/55404362?v=4)](https://github.com/FortuRepo "FortuRepo (34 commits)")[![U-Technology](https://avatars.githubusercontent.com/u/200253397?v=4)](https://github.com/U-Technology "U-Technology (3 commits)")

### Embed Badge

![Health badge](/badges/utechnology-dbsdk/health.svg)

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

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