Re: Mapping objects to tables: the actual database object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 03/03/2003 02:19 PM, Alexander Deruwe wrote:
I'm investigating using PHP's OOP functionality instead of the
traditional model to implement a project.  I've been looking at
information about mapping objects to tables, and have mostly found what
In that case you may be interested in Metastorage. It is a persistence layer generator application that generates classes of objects that are mapped to database tables.

It just takes a very simple description in a XML format of your classes with their variables, validation rules, relationships between objects and the types of functions that you need. Then it generates all for you including the code to install the database schema without any need for you to write a single line of code or SQL.

It is Open Source and you may find more about it here:

http://www.meta-language.net/news-2002-12-05-metastorage.html

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html


When mapping objects to tables, how would one usually handle the actual
database object?  Suppose we have a class Database derived from
The standard solution that Metastorage implements is to have a factory class that takes care of the creation of all objects, either retrieved from the database or created from scratch. The initialization of the factory class takes care of the database setup. Any database connection handles are passed to the new class objects when they are instantiated.


--

Regards,
Manuel Lemos


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux