There seems to be two styles of folder structure in the core Magento when it comes to resources. There are quite a lot using the mysql4 folder and other simple using Resource folder.
I.e. install script would live here: Mycompany_Mymodule_Model_Resource_Setup.
Is there a reason for this, legacy or otherwise - or is this simply a coding style between different core developers?
First: Magento's folder structure exists only because of its autoloader's implementation. If you try to derive too much meaning from where a file is placed in Magento you'll go mad, and different modules seem to follow different conventions. The autoloader will look for
So I'll be talking about naming conventions below, which will indirectly address why a file is in a particular folder.
Originally all database resource were named with the
Mysql4 convention. I've talked to a few of the original developers, and the intention was to denote that the resource was for the then "standard" Mysql 4 database. If a resource used a specific feature of say, Mysql 5, then they'd have used a
As Magento Inc. went through the usual startup churn and other developers took over where the original developers left off, the thinking changed on this. The Magento 1.6 release, which laid the groundwork for Enterprise Edition's support of multiple RDBMS, altered how these resources worked and were named.