{"id":55351,"date":"2022-08-03T15:15:29","date_gmt":"2022-08-03T09:45:29","guid":{"rendered":"https:\/\/2thenew.online\/blog\/?p=55351"},"modified":"2022-08-03T15:15:29","modified_gmt":"2022-08-03T09:45:29","slug":"how-to-integrate-mongodb-with-drupal","status":"publish","type":"post","link":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/","title":{"rendered":"How to Integrate MongoDB with Drupal"},"content":{"rendered":"<p>In this tutorial we are going to learn how to integrate MongoDB with Drupal.<\/p>\n<p>Before proceeding we should know some of the following basics:<\/p>\n<h2><strong>What is MongoDB?\u00a0<\/strong><\/h2>\n<p>MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License which is deemed non-free by several distributions.<\/p>\n<h2><strong>Install MongoDB on Linux?<\/strong><\/h2>\n<p>These documents provide instructions to install MongoDB Community Edition.<\/p>\n<p><a href=\"https:\/\/www.mongodb.com\/docs\/manual\/administration\/install-on-linux\/\">Install on Linux<\/a><br \/>\nInstall MongoDB Community Edition and required dependencies on Linux.<\/p>\n<p><a href=\"https:\/\/www.mongodb.com\/docs\/manual\/tutorial\/install-mongodb-on-os-x\/\">Install on MacOS<\/a><br \/>\nInstall MongoDB Community Edition on MacOS systems from MongoDB archives.<\/p>\n<p><a href=\"https:\/\/www.mongodb.com\/docs\/manual\/tutorial\/install-mongodb-on-windows\/\">Install on Windows<\/a><br \/>\nInstall MongoDB Community Edition on Windows systems and optionally start MongoDB as a Windows service.<\/p>\n<h2><strong>Install MongoDB PHP driver<\/strong><\/h2>\n<p>Please use below links install MongoDB PHP Driver<\/p>\n<ul class=\"child-menu-list\">\n<li class=\"current\"><a title=\"Installing the MongoDB PHP Driver with PECL\" href=\"https:\/\/www.php.net\/manual\/en\/mongodb.installation.pecl.php\">Installing the MongoDB PHP Driver with PECL<\/a><\/li>\n<li class=\"\"><a title=\"Installing the MongoDB PHP Driver on macOS with Homebrew\" href=\"https:\/\/www.php.net\/manual\/en\/mongodb.installation.homebrew.php\">Installing the MongoDB PHP Driver on macOS with Homebrew<\/a><\/li>\n<li class=\"\"><a title=\"Installing the MongoDB PHP Driver on Windows\" href=\"https:\/\/www.php.net\/manual\/en\/mongodb.installation.windows.php\">Installing the MongoDB PHP Driver on Windows<\/a><\/li>\n<li class=\"\"><a title=\"Building the MongoDB PHP Driver from source\" href=\"https:\/\/www.php.net\/manual\/en\/mongodb.installation.manual.php\">Building the MongoDB PHP Driver from source<\/a><\/li>\n<\/ul>\n<h2><strong>How to start\/stop\/restart\/status MongoDB service<\/strong><\/h2>\n<blockquote>\n<pre>sudo systemctl start mongod\r\nsudo systemctl status mongod\r\nsudo systemctl stop mongod\r\nsudo systemctl restart mongod<\/pre>\n<\/blockquote>\n<h2><strong>Install MongoDB module<\/strong><\/h2>\n<p><a href=\"https:\/\/www.drupal.org\/project\/mongodb\"><span style=\"font-weight: 400;\">https:\/\/www.drupal.org\/project\/mongodb<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><a href=\"http:\/\/www.mongodb.org\/\"><span style=\"font-weight: 400;\">MongoDB<\/span><\/a><span style=\"font-weight: 400;\"> module suite for Drupal 9\/8 stores data in MongoDB instead of the default Drupal SQL database.<\/span><\/p>\n<blockquote><p><span style=\"font-weight: 400;\">mongodb\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | Drupal\/Drush wrapper around mongodb-php-library.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">mongodb_storage\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | Key-value storage in MongoDB.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">mongodb_watchdog\u00a0 \u00a0 \u00a0 | Store logger (watchdog) messages in MongoDB.<\/span><\/p><\/blockquote>\n<h2><\/h2>\n<h2>Configure Drupal to use the MongoDB plugin<\/h2>\n<p>Once module is installed Than you need to put MongoDB connection in your settings.php or local.settings.php<\/p>\n<pre><strong>$settings['mongodb'] = [<\/strong>\r\n<strong>  'clients' =&gt; [<\/strong>\r\n<strong>      \/\/ Client alias =&gt; connection constructor parameters.<\/strong>\r\n<strong>      'default' =&gt; [<\/strong>\r\n<strong>      'uri' =&gt; 'mongodb:\/\/localhost:27017',<\/strong>\r\n<strong>      'uriOptions' =&gt; [],<\/strong>\r\n<strong>      'driverOptions' =&gt; [],<\/strong>\r\n<strong>    ],<\/strong>\r\n<strong>   ],<\/strong>\r\n<strong>  'databases' =&gt; [<\/strong>\r\n<strong>     \/\/ Database alias =&gt; [ client_alias, database_name ]<\/strong>\r\n<strong>    \/\/ 'default' =&gt; ['default', 'drupal'],<\/strong>\r\n<strong>    'keyvalue' =&gt; ['default', 'keyvalue'],\r\n<\/strong>    \/\/ logger is needed when you are using mongodb watchdog module.\r\n<strong>    'logger' =&gt; ['default', 'drupalmongo'],<\/strong>\r\n<strong>   ],<\/strong>\r\n<strong>];\r\n<\/strong>\r\n\r\nNow enable MongoDB Watchdog module and navigate to database log page. \r\nAll the list you will see here is populated from MongoDB.\r\n\r\n<\/pre>\n<h2>Simple Form to save input values in Mongo in Drupal.<\/h2>\n<p>I am expecting you have created custom module ttn_km and MongoDB configuration is done.<\/p>\n<p>In your simple form class file below code can used for Mongo operations.<\/p>\n<blockquote>\n<pre>&lt;?php\r\n\r\nnamespace Drupal\\ttn_km\\Form;\r\n\r\nuse Drupal\\Core\\Form\\FormBase;\r\nuse Drupal\\Core\\Form\\FormStateInterface;\r\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\r\nuse Drupal\\mongodb\\MongoDb;\r\nuse Drupal\\Core\\Url;\r\nuse Drupal\\Core\\Link;\r\n\r\n\/**\r\n* Class MongodbOperationsForm.\r\n*\/\r\nclass MongodbOperationsForm extends FormBase {\r\n\r\n\/**\r\n* Drupal\\mongodb\\DatabaseFactory definition.\r\n*\r\n* @var \\Drupal\\mongodb\\DatabaseFactory\r\n*\/\r\nprotected $mongodbDatabaseFactory;\r\nprotected $messenger;\r\nprotected $current_request;\r\n\r\n\/**\r\n* {@inheritdoc}\r\n*\/\r\npublic static function create(ContainerInterface $container) {\r\n$instance = parent::create($container);\r\n$instance-&gt;mongodbDatabaseFactory = $container-&gt;get('mongodb.database_factory');\r\n$instance-&gt;messenger = $container-&gt;get('messenger');\r\n$instance-&gt;current_request = $container-&gt;get('request_stack');\r\nreturn $instance;\r\n}\r\n\r\n\/**\r\n* {@inheritdoc}\r\n*\/\r\npublic function getFormId() {\r\nreturn 'mongodb_operations_form';\r\n}\r\n\r\n\/**\r\n* {@inheritdoc}\r\n*\/\r\npublic function buildForm(array $form, FormStateInterface $form_state) {\r\n$id = $this-&gt;current_request-&gt;getCurrentRequest()-&gt;get(\"id\");\r\nif (!empty($id)) {\r\n\/\/ $this-&gt;getRowsById($id);\r\n}\r\n$form['first_name'] = [\r\n'#type' =&gt; 'textfield',\r\n'#title' =&gt; $this-&gt;t('First Name'),\r\n'#maxlength' =&gt; 64,\r\n'#size' =&gt; 64,\r\n'#weight' =&gt; '0',\r\n];\r\n$form['last_name'] = [\r\n'#type' =&gt; 'textfield',\r\n'#title' =&gt; $this-&gt;t('Last Name'),\r\n'#maxlength' =&gt; 64,\r\n'#size' =&gt; 64,\r\n'#weight' =&gt; '0',\r\n];\r\n$form['submit'] = [\r\n'#type' =&gt; 'submit',\r\n'#value' =&gt; $this-&gt;t('Save'),\r\n'#weight' =&gt; '0',\r\n];\r\n\r\n$form['rows'] = [\r\n'#theme' =&gt; 'table',\r\n'#header' =&gt; ['id', 'frist name', 'last name', 'link'],\r\n'#rows' =&gt; $this-&gt;getRowsFromMongo(),\r\n'#empty' =&gt;t('Your table is empty'),\r\n];\r\n$form['#cache'] = ['max-age' =&gt; 0];\r\nreturn $form;\r\n}\r\n\r\n\/**\r\n* {@inheritdoc}\r\n*\/\r\npublic function validateForm(array &amp;$form, FormStateInterface $form_state) {\r\nif (!empty($form_state-&gt;getValues()['first_name'])) {\r\n$database = $this-&gt;mongodbDatabaseFactory-&gt;get(\"logger\");\r\n$collection = $database-&gt;selectCollection('mongodb_operations_form');\r\n$rows = $collection-&gt;find(['first_name' =&gt; $form_state-&gt;getValues()['first_name']]);\r\nif (count($rows-&gt;toArray())) {\r\n$form_state-&gt;setErrorByName(\"first_name\", \"Fname Already exists\");\r\n}\r\n}\r\nparent::validateForm($form, $form_state);\r\n}\r\n\r\n\/**\r\n* {@inheritdoc}\r\n*\/\r\npublic function submitForm(array &amp;$form, FormStateInterface $form_state) {\r\nif (!empty($id)) {\r\n\/\/@todo update record with ID match.\r\n} else {\r\n$database = $this-&gt;mongodbDatabaseFactory-&gt;get(\"logger\");\r\n$collection = $database-&gt;selectCollection('mongodb_operations_form');\r\n$collection-&gt;insertOne([\r\n\"first_name\" =&gt; $form_state-&gt;getValue(\"first_name\"),\r\n\"last_name\" =&gt; $form_state-&gt;getValue(\"last_name\"),\r\n]);\r\n$this-&gt;messenger-&gt;addMessage(\"Mongo insertion done!!\");\r\n}\r\n\r\n}\r\n\r\nprotected function getRowsById($id = \"\") {\r\n$database = $this-&gt;mongodbDatabaseFactory-&gt;get(\"logger\");\r\n$collection = $database-&gt;selectCollection('mongodb_operations_form');\r\n$rows = $collection-&gt;findOne([\"_id\" =&gt; new \\MongoDB\\BSON\\ObjectID($id)]);\r\ndump($rows-&gt;toArray());\r\ndie;\r\n}\r\n\r\n\r\npublic function getRowsFromMongo() {\r\n$database = $this-&gt;mongodbDatabaseFactory-&gt;get(\"logger\");\r\n$collection = $database-&gt;selectCollection('mongodb_operations_form');\r\n$rows = $collection-&gt;find();\r\n$tableRows = [];\r\nforeach( $rows as $row) {\r\n$url = Url::fromRoute('ttn_km.mongodb_operations_form', array('id' =&gt; (string)$row-&gt;_id));\r\n$project_link = Link::fromTextAndUrl(t('Edit'), $url);\r\n\r\n$tableRows[] = [\r\n'id' =&gt; (string)$row-&gt;_id,\r\n'fname' =&gt; $row-&gt;first_name,\r\n'lname' =&gt; $row-&gt;last_name,\r\n'link' =&gt; $project_link-&gt;toString(),\r\n];\r\n}\r\nreturn $tableRows;\r\n}\r\n\r\n}<\/pre>\n<\/blockquote>\n<pre><\/pre>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB?\u00a0 MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and [&hellip;]<\/p>\n","protected":false},"author":1368,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":138,"footnotes":""},"categories":[3602],"tags":[4862],"class_list":["post-55351","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal"],"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 tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Rajveer Singh\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/\" \/>\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=\"How to Integrate MongoDB with Drupal | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.online\/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=\"How to Integrate MongoDB with Drupal | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.online\/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\\\/how-to-integrate-mongodb-with-drupal\\\/#article\",\"name\":\"How to Integrate MongoDB with Drupal | TO THE NEW Blog\",\"headline\":\"How to Integrate MongoDB with Drupal\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rajveer-singh\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2022-08-03T15:15:29+05:30\",\"dateModified\":\"2022-08-03T15:15:29+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#webpage\"},\"articleSection\":\"Drupal, Drupal\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#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\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"position\":2,\"name\":\"Drupal\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#listItem\",\"name\":\"How to Integrate MongoDB with Drupal\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#listItem\",\"position\":3,\"name\":\"How to Integrate MongoDB with Drupal\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/drupal\\\/#listItem\",\"name\":\"Drupal\"}}]},{\"@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\\\/rajveer-singh\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rajveer-singh\\\/\",\"name\":\"Rajveer Singh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/69db7071-beb6-4673-aa20-5c7b9af9de0a_Rajveer-Singh-Profile-Pitcure.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Rajveer Singh\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/\",\"name\":\"How to Integrate MongoDB with Drupal | TO THE NEW Blog\",\"description\":\"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-integrate-mongodb-with-drupal\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rajveer-singh\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/rajveer-singh\\\/#author\"},\"datePublished\":\"2022-08-03T15:15:29+05:30\",\"dateModified\":\"2022-08-03T15:15:29+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":"How to Integrate MongoDB with Drupal | TO THE NEW Blog","description":"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and","canonical_url":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#article","name":"How to Integrate MongoDB with Drupal | TO THE NEW Blog","headline":"How to Integrate MongoDB with Drupal","author":{"@id":"https:\/\/2thenew.online\/blog\/author\/rajveer-singh\/#author"},"publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"},"datePublished":"2022-08-03T15:15:29+05:30","dateModified":"2022-08-03T15:15:29+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#webpage"},"articleSection":"Drupal, Drupal"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/drupal\/#listItem","name":"Drupal"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/drupal\/#listItem","position":2,"name":"Drupal","item":"https:\/\/2thenew.online\/blog\/category\/drupal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#listItem","name":"How to Integrate MongoDB with Drupal"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#listItem","position":3,"name":"How to Integrate MongoDB with Drupal","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/drupal\/#listItem","name":"Drupal"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.online\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.online\/blog\/author\/rajveer-singh\/#author","url":"https:\/\/2thenew.online\/blog\/author\/rajveer-singh\/","name":"Rajveer Singh","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/69db7071-beb6-4673-aa20-5c7b9af9de0a_Rajveer-Singh-Profile-Pitcure.jpeg","width":96,"height":96,"caption":"Rajveer Singh"}},{"@type":"WebPage","@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#webpage","url":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/","name":"How to Integrate MongoDB with Drupal | TO THE NEW Blog","description":"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.online\/blog\/author\/rajveer-singh\/#author"},"creator":{"@id":"https:\/\/2thenew.online\/blog\/author\/rajveer-singh\/#author"},"datePublished":"2022-08-03T15:15:29+05:30","dateModified":"2022-08-03T15:15:29+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.online\/blog\/#website","url":"https:\/\/2thenew.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"How to Integrate MongoDB with Drupal | TO THE NEW Blog","og:description":"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and","og:url":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/","og:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"How to Integrate MongoDB with Drupal | TO THE NEW Blog","twitter:description":"In this tutorial we are going to learn how to integrate MongoDB with Drupal. Before proceeding we should know some of the following basics: What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and","twitter:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"55351","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","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":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","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":{"id":"#aioseo-article-65e051eac5b01","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","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":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2022-08-02 12:14:33","updated":"2024-02-29 09:44:10","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:\/\/2thenew.online\/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:\/\/2thenew.online\/blog\/category\/drupal\/\" title=\"Drupal\">Drupal<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Integrate MongoDB with Drupal\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.online\/blog"},{"label":"Drupal","link":"https:\/\/2thenew.online\/blog\/category\/drupal\/"},{"label":"How to Integrate MongoDB with Drupal","link":"https:\/\/2thenew.online\/blog\/how-to-integrate-mongodb-with-drupal\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/55351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/users\/1368"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/comments?post=55351"}],"version-history":[{"count":2,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/55351\/revisions"}],"predecessor-version":[{"id":55356,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/55351\/revisions\/55356"}],"wp:attachment":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/media?parent=55351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/categories?post=55351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/tags?post=55351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}