{"id":9759,"date":"2013-03-07T17:12:40","date_gmt":"2013-03-07T11:42:40","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=9759"},"modified":"2016-11-30T12:38:09","modified_gmt":"2016-11-30T07:08:09","slug":"multiple-db-tables-in-single-custom-module-in-magento","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/","title":{"rendered":"Multiple db tables in single custom module in Magento"},"content":{"rendered":"<p>Creating a module which interact with a database table is quite simple. Most of the <a title=\"custom cms development services\" href=\"http:\/\/www.tothenew.com\/wcm\/web-content-management-services\">developers use magento<\/a> module creator to create such a module. However, what if you want a module with multiple database tables. Following is the example of module with two database tables.<\/p>\n<p>Step 1. Create setup file of your custom module with following queries.<\/p>\n<p>[php]<br \/>\nCREATE TABLE `test` (<br \/>\n`test_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,<br \/>\n`name` VARCHAR( 25 ) NOT NULL<br \/>\n) ENGINE = MYISAM <\/p>\n<p>CREATE TABLE `test2` (<br \/>\n`test2_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,<br \/>\n`name` VARCHAR( 25 ) NOT NULL<br \/>\n) ENGINE = MYISAM<br \/>\n[\/php]<\/p>\n<p>Step 2. Create pool file to register your module under app\/etc\/modules\/Mypackage_Mymodule.xml<\/p>\n<p>[php]<br \/>\n&lt;?xml version=&quot;1.0&quot;?&gt;<br \/>\n&lt;config&gt;<br \/>\n    &lt;modules&gt;<br \/>\n        &lt;Mypackage_Mymodule&gt;<br \/>\n            &lt;active&gt;true&lt;\/active&gt;<br \/>\n            &lt;codePool&gt;local&lt;\/codePool&gt;<br \/>\n        &lt;\/Mypackage_Mymodule&gt;<br \/>\n    &lt;\/modules&gt;<br \/>\n&lt;\/config&gt;<br \/>\n[\/php]<\/p>\n<p>Step 3. Your module configuration file should looks like following<\/p>\n<p>app\/code\/local\/ Mypackage\/Mymodule\/etc\/config.xml<\/p>\n<p>[php]<br \/>\n&lt;?xml version=&quot;1.0&quot;?&gt;<br \/>\n&lt;config&gt;<br \/>\n    &lt;modules&gt;<br \/>\n        &lt;Mypackage_Mymodule&gt;<br \/>\n            &lt;version&gt;0.1.0&lt;\/version&gt;<br \/>\n        &lt;\/Mypackage_Mymodule&gt;<br \/>\n    &lt;\/modules&gt;<br \/>\n    &lt;global&gt;<br \/>\n        &lt;models&gt;<br \/>\n\t\t\t&lt;Mymodule&gt;<br \/>\n\t\t\t\t&lt;class&gt;Mypackage_Mymodule_Model&lt;\/class&gt;<br \/>\n\t\t\t\t&lt;resourceModel&gt;mymodule_mysql4&lt;\/resourceModel&gt;<br \/>\n\t\t\t&lt;\/mymodule&gt;<\/p>\n<p>\t\t\t&lt;!&#8211; model vs db table relation &#8211;&gt;<br \/>\n            &lt;mymodule_mysql4&gt;<br \/>\n                &lt;class&gt;Mypackage_Mymodule_Model_Mysql4&lt;\/class&gt;<br \/>\n\t\t\t\t&lt;!&#8211; db table with name test &#8211;&gt;<br \/>\n                &lt;entities&gt;<br \/>\n                    &lt;test&gt;<br \/>\n                        &lt;table&gt;test&lt;\/table&gt;<br \/>\n                    &lt;\/test&gt;<br \/>\n\t\t     &lt;test2&gt;<br \/>\n                        &lt;table&gt;test2&lt;\/table&gt;<br \/>\n                    &lt;\/test2&gt;<\/p>\n<p>                &lt;\/entities&gt;<br \/>\n            &lt;\/mymodule_mysql4&gt;<br \/>\n        &lt;\/models&gt;<br \/>\n\t\t&lt;resources&gt;<br \/>\n\t\t\t&lt;mymodule_write&gt;<br \/>\n\t\t\t\t&lt;connection&gt;<br \/>\n\t\t\t\t\t&lt;use&gt;core_write&lt;\/use&gt;<br \/>\n\t\t\t\t&lt;\/connection&gt;<br \/>\n\t\t\t&lt;\/mymodule_write&gt;<br \/>\n\t\t\t&lt;mymodule_read&gt;<br \/>\n\t\t\t\t&lt;connection&gt;<br \/>\n\t\t\t\t\t&lt;use&gt;core_read&lt;\/use&gt;<br \/>\n\t\t\t\t&lt;\/connection&gt;<br \/>\n\t\t\t&lt;\/mymodule_read&gt;<br \/>\n\t\t&lt;\/resources&gt;<br \/>\n    &lt;\/global&gt;<br \/>\n&lt;\/config&gt;<br \/>\n[\/php]<\/p>\n<p>Step 4. Now create models Test.php and Test2.php. Here we configure these model with the handler of table test and test2.<\/p>\n<p>\/app\/code\/local\/Mypackage\/Mymodule\/Model\/Test.php<\/p>\n<p>[php]<br \/>\n&lt;?php<\/p>\n<p>class Mypackage_ Mymodule_Model_Test extends Mage_Core_Model_Abstract<br \/>\n{<\/p>\n<p>\tpublic function _construct()<br \/>\n    {<br \/>\n        parent::_construct();<br \/>\n        $this-&gt;_init(&#8216;mymodule\/test&#8217;);<br \/>\n    }<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\/app\/code\/local\/Mypackage\/Mymodule\/Model\/Test2.php<\/p>\n<p>[php]<br \/>\n&lt;?php<\/p>\n<p>class Mypackage_Mymodule_Model_Test2 extends Mage_Core_Model_Abstract<br \/>\n{<\/p>\n<p>\tpublic function _construct()<br \/>\n    {<br \/>\n        parent::_construct();<br \/>\n        $this-&gt;_init(&#8216;mymodule\/test2&#8217;);<br \/>\n    }<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>Step 5. Now create the resource models for model test and test2. In these files we also set the primary key of both the tables test and test2.<\/p>\n<p>\/app\/code\/local\/Mypackage\/Mmodule\/Model\/Mysql4\/Test.php.<\/p>\n<p>[php]<br \/>\n&lt;?php<\/p>\n<p>class Mypackage_Mymodule_Model_Mysql4_Test extends Mage_Core_Model_Mysql4_Abstract<br \/>\n{<br \/>\n    public function _construct()<br \/>\n    {<br \/>\n        $this-&gt;_init(&#8216;mymodule\/test&#8217;, &#8216;test_id&#8217;);<br \/>\n    }<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\/app\/code\/local\/Mypackage\/Mmodule\/Model\/Mysql4\/Test2.php.<\/p>\n<p>[php]<br \/>\n&lt;?php<\/p>\n<p>class Mypackage_Mymodule_Model_Mysql4_Test2 extends Mage_Core_Model_Mysql4_Abstract<br \/>\n{<br \/>\n    public function _construct()<br \/>\n    {<br \/>\n        $this-&gt;_init(&#8216;mymodule\/test2&#8217;, &#8216;test2_id&#8217;);<br \/>\n    }<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>Step 6. Create a collection classes so that we can retrieve data from table test and test2.<\/p>\n<p>\/local\/Mypackage\/Mymodule\/Model\/Mysql4\/Test\/Collection.php<\/p>\n<p>[php]<br \/>\n&lt;?php<\/p>\n<p>class Mypackage_Mymodule_Model_Mysql4_Test_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract<br \/>\n{<br \/>\n    public function _construct()<br \/>\n    {<br \/>\n        parent::_construct();<br \/>\n        $this-&gt;_init(&#8216;mymodule\/test&#8217;);<br \/>\n    }<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\/local\/Mypackage\/Mymodule\/Model\/Mysql4\/Test2\/Collection.php<\/p>\n<p>[php]<br \/>\n&lt;?php<\/p>\n<p>class Mypackage_Mymodule_Model_Mysql4_Test2_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract<br \/>\n{<br \/>\n    public function _construct()<br \/>\n    {<br \/>\n        parent::_construct();<br \/>\n        $this-&gt;_init(&#8216;mymodule\/test2&#8217;);<br \/>\n    }<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>So, now you have a custom module with two tables. Your module can interact with these tables with their models and respective collections as follows :<\/p>\n<p>[php]<br \/>\n$testModel = Mage::getModel(&#8216;mymodule\/test&#8217;)<br \/>\n\t-&gt;setName(&quot;abcd&quot;)<br \/>\n\t-&gt;save();<\/p>\n<p>$test2Model = Mage::getModel(&#8216;mymodule\/test2&#8217;)<br \/>\n\t-&gt;setName(&quot;abcd&quot;)<br \/>\n\t-&gt;save();<br \/>\n[\/php]<\/p>\n<p>That&#8217;s it. Hope this will help you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a module which interact with a database table is quite simple. Most of the developers use magento module creator to create such a module. However, what if you want a module with multiple database tables. Following is the example of module with two database tables. Step 1. Create setup file of your custom module [&hellip;]<\/p>\n","protected":false},"author":62,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":20,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9759","post","type-post","status-publish","format-standard","hentry","category-technology"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In this blog, we will show you how to create a module with multiple database tables.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"amatya\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Multiple db tables in single custom module in Magento | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In this blog, we will show you how to create a module with multiple database tables.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Multiple db tables in single custom module in Magento | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In this blog, we will show you how to create a module with multiple database tables.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#article\",\"name\":\"Multiple db tables in single custom module in Magento | TO THE NEW Blog\",\"headline\":\"Multiple db tables in single custom module in Magento\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amatya\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2013-03-07T17:12:40+05:30\",\"dateModified\":\"2016-11-30T12:38:09+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":13,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#webpage\"},\"articleSection\":\"Technology\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#listItem\",\"name\":\"Multiple db tables in single custom module in Magento\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#listItem\",\"position\":3,\"name\":\"Multiple db tables in single custom module in Magento\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amatya\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amatya\\\/\",\"name\":\"amatya\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98bb25c159475972796bfc713a7342c003e4b5ec97c0405283e939843153e6ee?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"amatya\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/\",\"name\":\"Multiple db tables in single custom module in Magento | TO THE NEW Blog\",\"description\":\"In this blog, we will show you how to create a module with multiple database tables.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/multiple-db-tables-in-single-custom-module-in-magento\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amatya\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/amatya\\\/#author\"},\"datePublished\":\"2013-03-07T17:12:40+05:30\",\"dateModified\":\"2016-11-30T12:38:09+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Multiple db tables in single custom module in Magento | TO THE NEW Blog","description":"In this blog, we will show you how to create a module with multiple database tables.","canonical_url":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#article","name":"Multiple db tables in single custom module in Magento | TO THE NEW Blog","headline":"Multiple db tables in single custom module in Magento","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/amatya\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2013-03-07T17:12:40+05:30","dateModified":"2016-11-30T12:38:09+05:30","inLanguage":"en-US","commentCount":13,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#webpage"},"articleSection":"Technology"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/www.tothenew.com\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#listItem","name":"Multiple db tables in single custom module in Magento"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#listItem","position":3,"name":"Multiple db tables in single custom module in Magento","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/amatya\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/amatya\/","name":"amatya","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/98bb25c159475972796bfc713a7342c003e4b5ec97c0405283e939843153e6ee?s=96&d=mm&r=g","width":96,"height":96,"caption":"amatya"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/","name":"Multiple db tables in single custom module in Magento | TO THE NEW Blog","description":"In this blog, we will show you how to create a module with multiple database tables.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/amatya\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/amatya\/#author"},"datePublished":"2013-03-07T17:12:40+05:30","dateModified":"2016-11-30T12:38:09+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Multiple db tables in single custom module in Magento | TO THE NEW Blog","og:description":"In this blog, we will show you how to create a module with multiple database tables.","og:url":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Multiple db tables in single custom module in Magento | TO THE NEW Blog","twitter:description":"In this blog, we will show you how to create a module with multiple database tables.","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"9759","title":null,"description":"In this blog,  we will show you how to create a module with multiple database tables.","keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 11:52:24","updated":"2024-02-29 08:14:46","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMultiple db tables in single custom module in Magento\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Technology","link":"https:\/\/www.tothenew.com\/blog\/category\/technology\/"},{"label":"Multiple db tables in single custom module in Magento","link":"https:\/\/www.tothenew.com\/blog\/multiple-db-tables-in-single-custom-module-in-magento\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/9759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=9759"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/9759\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=9759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=9759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=9759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}