RE: [PEAR-DEV] [Proposal] DB_OO
| From: | Lukas Smith | Date: | Fri, 26 Dec 2003 19:00:00 +0000 |
| Subject: | RE: [PEAR-DEV] [Proposal] DB_OO | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24635@lists.php.net to get a copy of this message | ||
> From: Sérgio Carvalho [mailto:sergio.carvalho@portugalmail.com]
> Sent: Friday, December 26, 2003 5:28 PM
> Alan Knowles wrote:
> > I had a brief look though, In general
> >
> > ++ Major feature additions above DataObjects
> > + the proxy creation of objects on the fly.
> > (I will implement this...... promise)
> (...)
> Ok, here I could help. It's difficult for me to completely write
> Dataobject creation of objects on the fly. However, the tedious work
> here is extracting the information from system catalogs. With that done,
> you could write a proxy generator in a matter of minutes.
>
> From what I've been reading on the Pear docs, there's not much in the
> arena of catalog extraction already in Pear. There's some effort done in
> MDB, in the form of an XML database schema generator, and then for
> mysql only.
There is also code for pgsql available.
However for both the problem is that the end result is currently focused on
generating xml schema files with only MDB supported datatypes.
> Reducing DB_OO to the metadata classes is rather trivial. Dumping
> features that colide with DB_Dataobjects, we'd be left with an uniform
> interface to database system catalogs.
There is someone that wrote a set of classes for MDB that generate metadata
about the database schema and I will get to that person again to see if he
is willing to contribute that.
> There's usage for an uniform DB catalog layer outside of DB_Dataobject,
> so the only question that remains is: Is there any significant movement
> in a PEAR project towards such a library, or should I build it as a
> separate module?
Well this could be a separate class which uses either DB or MDB. Again I was
told by someone that such a thing already exists. Generally I feel it fits
better into MDB as has similar features and infrastructure already
developed.
> > + richer dataformat
> > this is something that the MDB schema is getting close to perfecting??
> > :), and should really be the way to go.
> Where is MDB Schema? I can't find it in CVS...
Here is the basic idea:
http://news.php.net/article.php?group=php.pear.dev&article=%3Cphp.pear.dev-2
3345%40news.php.net%3E
Here is some preliminary code that is incomplete especially on the relation
and compare part:
http://www.backendmedia.com/DB_Structure/DB_Structure.zip
I expect to get back to this stuff after the holidays. During the holidays I
am spending time on MDB2 which will make, among other things, the entire
datatype handling much more flexible.
Finally you are not the first to ask about this. There is a huge interest in
this and I will soon compile a little mailinglist with all people that have
asked me about this. Maybe we can coordinate things and get this thing off
the ground faster.
regards,
Lukas