Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the purpose of using these two models collection.

  1. Resource
  2. Mysql4

why can't we use resource model for all collections.

Why we are using MySql4 collection for simple module

Some one explain.

share|improve this question
Did you manage to find an answer that covered your question? – Sander Mangel Feb 24 '14 at 21:03

Mysql4 was deprecated after Magento CE 1.6. This answer gives some more information about it. A bit more lengthy explanation can be found in this PDF.

Still, using Mysql4 classes shouldn't be an issue since it should be backwards compatible.

share|improve this answer
Bummer the PDF link no longer available. – philwinkle Jul 15 at 13:30

I would say in magento 1.8 all collections are resource collections.

Resource collections depend on generic implementations for all the SQL-stuff. the idea is to only reimplement the base class to offer support for another sql database, like postgre, oracle or mssql.

The still existing Mysql4 classes are only for backwards compatibility but only extend the resource collection


Could you tell me what are the three type of models in magento ?

I'm not sure about this, but I would say you are maybe talking about Models (extending Mage_Core_Model_Abstract), Resource Models (extending Mage_Core_Model_Resource_Db_Abstract) and Collections (extending Mage_Core_Model_Resource_Db_Collection_Abstract).

share|improve this answer
Could you tell me what are the three type of models in magento ? – Vijay S Feb 20 '14 at 9:25
Updated the answer. – Fabian Blechschmidt Feb 20 '14 at 9:35
Thanks for updating answer.. – Vijay S Feb 20 '14 at 10:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.