PHPackages                             picoweb/db - 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. picoweb/db

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

picoweb/db
==========

this is a object relational database connection making and database creation simple library for php web application creation

00PHP

Since Jan 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/danukaji-M/picowebdb)[ Packagist](https://packagist.org/packages/picoweb/db)[ RSS](/packages/picoweb-db/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

**Under Development**
=====================

[](#under-development)

MyORM - A Modern PHP ORM
========================

[](#myorm---a-modern-php-orm)

MyORM is a lightweight, powerful, and developer-friendly Object-Relational Mapper (ORM) for PHP. It combines the best features of existing ORMs like Doctrine and Eloquent while introducing innovative functionalities such as dynamic schema updates, GraphQL-like queries, and AI-powered query optimization. MyORM simplifies database interactions, enhances productivity, and supports modern database technologies like NoSQL and graph databases.

---

**Key Features**
----------------

[](#key-features)

- **Annotations/Attributes-Based Mapping**: Define database mappings using PHP annotations or attributes.
- **Zero Configuration**: Automatically detect entities and mappings without complex configuration files.
- **Dynamic Schema Updates**: Update database schemas automatically based on entity changes.
- **Custom Query Builder**: Use an intuitive, chainable query builder for complex queries.
- **GraphQL-Like Queries**: Perform nested queries declaratively.
- **Lifecycle Hooks**: Support for `beforeInsert`, `afterUpdate`, and other entity lifecycle events.
- **Data Transformations**: Automatically hash, encrypt, or transform entity data.
- **Relationship Management**: Includes polymorphic relationships and custom join conditions.
- **Query &amp; Entity Caching**: Built-in support for caching queries and serialized entities.
- **Multi-Database Support**: Easily connect to multiple databases or shards.
- **JSON and NoSQL Support**: Native handling of JSON columns and integration with NoSQL databases.
- **Schema Visualization**: Auto-generate visual diagrams of the database schema.
- **AI Query Optimization**: Optimize queries using machine learning insights.
- **Event Sourcing**: Built-in support for event sourcing to track changes over time.
- **Plugin System**: Extend functionality with custom plugins.

---

**Installation**
----------------

[](#installation)

Install MyORM using Composer:

```
composer require ninja/db
```

---

**Getting Started**
-------------------

[](#getting-started)

### **1. Define an Entity**

[](#1-define-an-entity)

Use PHP attributes to define your database entities:

```
