ZF-2921: Allow defining of the schema separator in Zend_Db_Adapter
To simulate the schema system in RDBMS which don't support it (as MySQL, where SCHEMA is a DATABASE) I thought to patch the Zend_Db_Adapter_Abstract by adding a protected attribute called Zend_Db_Adapter_Abstract::$_schemaSeparator (default to '.') and a public method Zend_Db_Adapter_Abstract::getSchemaSeparator()
Then by simply changing the '.' string with a call to Zend_Db_Adapter_Abstract::getSchemaSeparator() in the following methods: Zend_Db_Table_Abstract::_setupMetadata() Zend_Db_Table_Abstract::_setupTableName() Zend_Db_Table_Abstract::_setupPrimaryKey() Zend_Db_Table_Abstract::insert() Zend_Db_Table_Abstract::update Zend_Db_Table_Abstract::delete() Zend_Db_Select::__toString() Zend_Db_Select::_join()
So you could extend an Adapter (eg MySQLi) by definig the attribute $_schemaSeparator (say with '__') and you get a sort of schema management analogue of PostgreSQL one (for example), to group table in namespaces.
I've also build a patch you could find in http://dev.tesio.it/patch.Zend_Db
The work estimate contain simply adding the patch to the core CVS and testing more widely...