Re: XML_Indexing and DB_Dataobject

From: Date: Tue, 05 Oct 2004 22:46:53 +0000
Subject: Re: XML_Indexing and DB_Dataobject
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33665@lists.php.net to get a copy of this message
Justin Patrin wrote:
What do you think about XML native databases management with PHP ? Do you believe XML_Indexing integration with DB_Dataobject is a good idea ?
Well, you could create a Data Driver for DB_DataObject, but that seems not too useful to me. It would create more complexity without adding too much usefulness. Can you think of many other data backends?
Are you talking about a whole new "Data Driver" layer ? No, I don't think this is a good idea, but anyway that is Alan Knowles to decide. I don't know the DB_Dataobject code enough to say how to implement XML containers. Apart from XML I don't see many other data backend, no.
IMHO if you want to store data in XML, it's much more useful to make a DB driver which stores its data in XML. It can even just support a subset of SQL if you want. This way, it takes no change to DB_DataObject and other DB-using projects could make use of it with minimal changes. Of course, this would require SQL parsing....but if you only do a subset, you should be fine. There's also SQL_Parser: http://pear.php.net/package/SQL_Parser.
Well, SQL parsing is heavy... I recognize a DB XML driver is a nice idea. If it's just a small subset, then it may be acceptable, yes. Thanks for this idea :-) But, what I like about Dataobjects is that they sufficiently abstract the database, so that you interact with it using methods (find(), etc...). No need to parse SQL, no overhead. With a such interface, in theory you can use whatever data container you wish.
This also may make XML_Indexer less useful, but it seems like the right place to stick this functionality to me.
It does not change anything about XML_Indexing usefulness : wether you parse SQL or not, you still have to retrieve and update the data efficiently (!= loading the whole XML file into memory). -- og

« previous php.pear.dev (#33665) next »