I searched for that information quite a while but did not found any explanation.
Many examples and tutorials for custom modules with custom database tables suggest the following for the config.xml file of corresponding module:
<resources>
<[modulename]_setup>
<setup>
<module>[NAMESPACE]_[MODULENAME]</module>
<class>Mage_Eav_Model_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</[modulename]_setup>
<[modulename]_write>
<connection>
<use>core_write</use>
</connection>
</[modulename]_write>
<[modulename]_read>
<connection>
<use>core_read</use>
</connection>
</[modulename]_read>
</resources>
So my questions are:
- What are
[modulename]_write
and[modulename]_read
for? - What is the connection definition in
[modulename]_setup
for? - What is
<class>Mage_Eav_Model_Entity_Setup</class>
for?
I ask this, because it works well with just
<resources>
<[modulename]_setup>
<setup>
<module>[NAMESPACE]_[MODULENAME]</module>
</setup>
</[modulename]_setup>
</resources>