Jul
21st

Learning Zend_Db_Table

Here are some quick notes taken from the Zend Framework documentation about this class. I’ll aggregate the parts I feel are most useful… :

Introduction to Table Class

The Zend_Db_Table class is an object-oriented interface to database tables. It provides methods for many common operations on tables. The base class is extensible, so you can add custom logic.

Defining a Table Class

For each table in your database that you want to access, define a class that extends Zend_Db_Table_Abstract.

My feeling on this, is that it’s a little bit “overkill”, at least for a website with a DB that handles hundreds of tables. I feel some tables will always be used in some kind of logical grouping into some class.  In those cases you will not want to create systematically all those class… Unless you have a lot more time available than I do ;)

Learning Zend_Db_Table