> There's one piece missing from your answer. How does the schema 'cascade' to
> other tables? If I have a table Menu and a table Menu_Items where Menu is the
> parent. I setup and call the Menu_Items table from Menu (I don't use
> referential integrity!), but to have Menu_Items look at the same database as
> Menu requires me to "pass" the schema to Menu_Items as well. That seems hardly
> right, since you would need to pass the schema to every related table as well?
> Or am I missing the point here?

Actually, I question why you would split an applications data sources
between separate databases?  Are you enforcing different mysql user
privileges on both?  Or is it purely to draw a line between what is admin
data and what is frontend/user data?

Having separate databases makes it harder to enforce constraints (either
logically in PHP or via real constraints in MySQL/Innodb).
 
> BTW, I forgot to mention I actually use my own datamappers that call each
> other, map the database relationships and use Zend_Db_Table as a gateway to
> the tables themselves. However, the problem also arises when I use
> Zend_Db_Table in a datamapper.

Right, as I mentioned, I might rethink the design of the two database system
for your application.  It might prove easier to put a column inside of your
tables that would mark a row as 'admin' or not.

-- 
Ralph Schindler
Software Engineer     | [email protected]
Zend Framework        | http://framework.zend.com/


Reply via email to