On Thu, 3 Jan 2002, Tim Bunce wrote: > Typically a 'Sales Order Handling' database could now be given > a SalesOrderDBI::db class containing high-level methods that deal > directly with Sales Order Handling concepts and could do things > like automatically trigger re-ordering when stocks get low.
This is very similar to what Alzabo aims to provide a foundation for. Alzabo does this by providing objects that are based on tables and rows in a table but that are easy to add aditional logic into. So with Alzabo its quite easy to create a method like $product_table->available( type => $foo ); Even better, its easily possible to add methods to objects that represent individual rows like: $product->reorder which could maybe do something like insert a row into another table that represents the need to reorder the product. Alzabo has tried to somewhat mask differences between databases inasmuch as is possible, moreso than DBI does currently. Some things that Alzabo does in a cross-platform (Mysql and Pg, for now) manner are: - 'sequenced' columns (auto_increment or a real sequence) - select distinct(a, b) (doesn't work in Pg but can be emulated in code) - left/right outer joins - limits/offset (both MySQL and Pg support this but there is emulation in code for these in preparation for Oracle, Sybase, etc support) - schema/table creation/dropping/alteration > AUTOLOAD (ala Autoloader, SelfLoader etc) could be put to good > and interesting uses in either handling large libraries of queries > (load in demand) or even automatically generating methods with > logic based on the method name: > $dbh->Delete_from_table($table, $key) Alzabo, because it knows a lot about your schema, can auto-generate a _lot_ of different methods for you. Among the most interesting is that it can generate appropriate methods for following foreign keys so you can do something like: $product->Components to find out all the components in a product. That 'Components' method can be completely auto-generated by Alzabo. I'm not sure how much this relates to DBI but I figured I'd point out that A) I've at least thought about some of this stuff and B) some of the ideas in Alzabo may be useful for DBI, and maybe even some code. Also, since it looks like DBI is going into some interesting areas I'll want to get my 2 cents in for features that can help support Alzabo ;) -dave /*================== www.urth.org we await the New Sun ==================*/
