PHP Classes

Map database records to objects: Store and retrieve objects without writing native SQL again

Recommend this page to a friend!
  All requests RSS feed  >  Map database records to objects  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

Map database records to objects

Edit

Picture of Yazan Tommalieh by Yazan Tommalieh - 9 years ago (2015-06-21)

Store and retrieve objects without writing native SQL again

This request is clear and relevant.
This request is not clear or is not relevant.

+7

I would like a class that allows you to use objects to perform database operations (ORM). It should simplify database handling and data manipulation to make it much easier.

Ask clarification

5 Recommendations

Wepesi PHP ORM Framework: Execute common SQL queries using object functions

This package can execute common SQL queries using object functions.

It provides classes with a fluent interface that allows developers to compose common queries using functions to set query parameters like table names, fields, field values, and condition clauses.

Currently, the main classes provide functions to execute SQL SELECT, INSERT, UPDATE AND DELETE queries.

It also provides functions that can:

- Return the count of table records

- Get the last table record identifier that results from the last insert query

- The last query execution error

- The number of table rows affected by the last query
This recommendation solves the problem.
This recommendation does not solve the problem.

+1

Picture of Boss Ibrahim Mussa by Boss Ibrahim Mussa package author package author Reputation 55 - 2 years ago (2022-12-30) Comment

Simple to use and simple to configure. Predefined method to do your request to (insert,update,delete and select.); Based on PDO class configuration and support transaction, with a method that help you to convert your database ingine to innodb engine in order to support transactions.


MySQL Class Generator: Generate classes to access MySQL as objects

This package can automatically generate PHP classes from MySQL tables.

It can access a given MySQL database and retrieve schema tables and fields.

For each table, it generates a class that uses object-oriented programming logic to provide methods for accessing, reading, and writing its records.
This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of Saro Carvello by Saro Carvello package author package author Reputation 515 - 8 years ago (2017-01-23) Comment

The utility generates automatically classes for any tables of a given database schema.

An auto generated MySQL class provides the following services:

A constructor for managing a fetched table’s row or for a adding a new one

Management for both single or composite Primary Keys

Automatic mapping of the different date formats may occurs between application and database Destructor to automatically close database connection

Defines a set of attributes corresponding to the table fields

Setter and Getter methods for each attribute

OO methods for simplify DML SELECT, INSERT, UPDATE and DELETE operations

A facility for quickly updating a previously fetched row

Useful methods to obtain table DDL and the last executed SQL statement

Error handling of SQL statements

Camel/Pascal case naming convention for Attributes/Class used for mapping Fields/Table

Useful PHPDOC information about table, fields and the usage of class, attributes and methods

Template based source code generation.


Caribu ORM: Map objects to databases records using annotations

This package can map objects to databases records using annotations.

It provides base classes that can store and retrieve objects from database tables. The base classes should be extended by implementation classes.

The object-relational mapping information is extracted from annotation comments read from the implementation classes as well using PHP reflection. So it is possible to map complex datatypes such as DateTime into database column datatypes seamlessly.

The ORM classes provide means to retrieve, store and remove objects from the configured database tables. It supports MySQL, Postgresql and SQLite using PDO.

It supports objects that reference other objects, allowing to save also the referenced objects when a given object is saved if the relationship is set to @cascade.

The package also supports mapping classes to existing database tables using the attributes @id, @table and @column to define class mapping to legacy tables.
This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of Maik Greubel by Maik Greubel package author package author Reputation 185 - 9 years ago (2015-07-06) Comment

Caribu provides annotation based database table to php object mappings. Feel free to ask if something is unclear.


Database ORM Builder: Generate MySQL Object Relational Mapping classes

This package can generate MySQL Object Relational Mapping classes.

It can retrieve the list of tables and fields of a MySQL database and generates classes with functions for storing and retrieving objects in the given MySQL database tables.

The generated code is stored in a file with the name based on the database name. For each table it generates a class for accessing fields, table data and execute SQL SELECT, INSERT, UPDATE and DELETE queries.
This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of Anthony Amolochitis by Anthony Amolochitis package author package author Reputation 505 - 9 years ago (2015-07-01) Comment

I wrote this class that builds the php code to supply basic wrappers for select, insert, update, and delete if the tables have an primary index. I use this class to build a class library for all my databases. It provides a consistent means to access your data from mysql.

Classes that are built are field, data, and query classes. The variables that represent the row columns are also type hinted so netbeans IDE can display the type and size of the field. I'm not sure if other IDE's will display it. Maybe eclipse will.

The example usage is at the bottom of the class. It is written a bit on the dirty side, but it works fast. If you have 80 tables, your code will be written in about a minute. Imagine writing all the class wrappers for 80 tables in a database.

Anyways, if you have issues using it, you can use the support option, and I'll respond.


DB Accelerator: Map MySQL table records to objects using MySQLi

This class can map MySQL table records to objects using MySQLi.

It can perform several Object-Relational mapping operations to store and retrieve objects in MySQL database tables.

Currently it can add a given object as a new table record, retrieve objects from the table matching a given criteria, delete a saved object from the table, update an object table record with new values, count or retrieve all objects from the table, etc..
This recommendation solves the problem.
This recommendation does not solve the problem.

+4

Picture of Dave Smith by Dave Smith Reputation 7620 - 9 years ago (2015-06-21) Comment

Looks like you are trying to recommend your own package, so here it is.

There are plenty of ORM database mappers out there, is this the best one? I will let the other authors add theirs and we will see.


Recommend package
: 
: