Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Application Program Interviews:AutoCADBEA WeblogicBioinformaticsBizTalk ServerBug Tracking ToolsBugzillaClarify CRMCoding StandardsComputer Aided Design (CAD) DesignerCVSGIMPJMXLINQLoadRunnerMagentoMATLABMicrosoft AccessMicrosoft ExcelMicrosoft OfficeMicrosoft OutlookMicrosoft WordModel View Controller (MVC)OLAPOOADQuickbookRational RobotRDFSchemaSiebelSilkTestSVGTest PlanTesting ToolsUnity 3D DeveloperVRMLWCF SDKWPFXML DOMXPointer
Copyright © 2018. All Rights Reserved
Magento Interview Question:
How Magento ORM works?
Submitted by: AdministratorORM 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.
1) First is the "simple" i.e. Regular Models which is nothing but flat table or our regular table structure.
2) 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.
When you want to get some data in Magento, you can call it like this: Mage::getModel('module/model')->load(1); ie. 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.
Submitted by:
In Magento, ORM is shown as Model (based on Zend Framework's Zend_Db_Adapter), which further breaks down to two types of Models.
1) First is the "simple" i.e. Regular Models which is nothing but flat table or our regular table structure.
2) 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.
When you want to get some data in Magento, you can call it like this: Mage::getModel('module/model')->load(1); ie. 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.
Submitted by:
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.