top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How does Magento ORM works?

+3 votes
35 views
How does Magento ORM works?
posted Aug 11, 2015 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

0 votes

ORM stands for Object Relational Mapping. It’s a programming technique used to convert different types of data to Objects and vice versa.
In Magento, ORM is shown as Model (based on Zend Framework’s Zend_Db_Adapter), which further breaks down to two types of Models.
First is the “simple” i.e. Regular Models which is nothing but flat table or our regular table structure.
Second Model is EAV (Entity Attribute Value), which is quite complicated and expensive to query.
All Magento Models interacting with database are inherited from Mage_Core_Model_Abstract class, which is further inherited from Varien_Object.
Difference between two Models is, Simple Model is inherited from Mage_Core_Model_Resource_Db_Abstract class,
while EAV is inherited from Mage_Eav_Model_Entity_Abstract.

So, to end up this question, when you want to get some data in Magento, you call it like this: Mage::getModel('module/model')->load(1);
where 1 is the primary key id for some Regular/Simple table, while in EAV so many tables are joined to fetch just single row of data.

answer Aug 25, 2015 by Rajneesh
0 votes

ORM stands for Object-relational Mapping . ORM is the techniques which convert the data into the object and soon. In Magento,ORM is shown as model ie. Zend framework. The model further breaks down into two models ie.
- A regular model which is called as flat table and regular table structure.
- EAV( Entity Attribute Value) which is quite expensive and difficult to use.

answer Jul 23, 2016 by Magento_ocodewire
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...