[PEPr] Comment on Database::DB_Table_Database

From: Date: Sat, 18 Nov 2006 07:24:09 +0000
Subject: [PEPr] Comment on Database::DB_Table_Database
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44960@lists.php.net to get a copy of this message
David Morse (http://pear.php.net/user/morse) has commented on the proposal for Database::DB_Table_Database. Comment: It is possible to join on multiple-column keys. This is true in a trivial sense because the select* methods allow one to enter any string for the WHERE clause. More signficantly, the autoJoin method can automatically generate appropriate join conditions for multi-column foreign key references. I'd prefer not to attempt an explanation of the differences between DB_Table_Databse and DB_DataObject. Many of these arise from differences in the design and goals of DB_Table and DB_DataObject, which have been discused previously. Given that both of these classes exist in PEAR and have attracted users, perhaps it is sufficient to say that DB_Table_Database adds to DB_Table various features that require information about the database schema and foreign key references, some of which have already been added to DB_DataObject. I do think, however, that the approach to automating generation of join conditions taken in the autoJoin method of DB_Table_Database is easier to use for multi-table joins and more powerful than that taken in DB_DataObject. Anyone sufficiently interested might want to consider the 5 table join auto-generated in the tutorial for DB_Table_Database, which required the user to specify only the names of columns from 3 of the five tables, and consider how that would be implemented using DB_DataObject. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=456 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

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