DownloadMySQLReflection
A useful utility for the Object Relation Mapping of MySQL databases
The utility generates automatically classes for any tables of a given database
schema.
It's extracted from my PHP Web MVC Framework
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
Developers can quickly use these generated classes on their application.
Into the beans directory are located some auto generated classes of a MySQL schema.
DDL for MySQL schema is into a script file located into "sql" directory.
Overview
UML Class Model
Convert MySQL into PHP Classes automatically - Video Tutorial
|