I have found that using global sequence for all table is a very good practice. You can mix data ids from all tables in a single place (e.g. search engine index) and do not worry about collisions. Unfortunately MySQL doesn't support sequences and we have to emulate such functional. I will show you how to make it for your database and integrate this solution using Zend_Db.