Re: XML_Indexing and DB_Dataobject

From: Date: Tue, 05 Oct 2004 23:59:07 +0000
Subject: Re: XML_Indexing and DB_Dataobject
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33666@lists.php.net to get a copy of this message
On Wed, 06 Oct 2004 00:46:53 +0200, Olivier Guilyardi <ml@xung.org> wrote: > 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. > You say you don't want a data driver, but you still want to use DataObject with XML? Ir do you mean making an XML_DataObject? > 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. Sure, but DB_DataObject is currently highly tied to DB, hence its name. It's also highly tied to SQL. A new DataObject could be made with a data driver backend to support either way, but, as we both have said, this would be overkill. If you want to make an XML_DataObject, I don't think anyone would mind. > > > 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). > -- paperCrane --Justin Patrin--

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