mongodb

Loading Drupal Nodes into MongoDB with Drush

To do some prototyping, I wanted to load all 32k of our Drupal nodes into MongoDB. At first, the thought of doing this seemed daunting. Then I realized that with Drush I could use a very simple script to perform an entire migration.

The result: With a 14 line PHP script, I transferred all of the nodes (CCK, taxonomy, and all) without a glitch.

Read on for the full explanation.

MapReduce as a Star Trek Episode

Kristina Chodorow, a member of the MongoDB development team, and maintainer of the Mongo PHP driver, wrote a great blog explaining Map Reduce as a Star Trek episode. It's a quick and humorous read.

Kristina is also doing a TEK-X Webinar on MongoDB today. I'm encouraging my dev team to attend.

MongoDB: 5 Things Every PHP Developer Should Know About MongoDB

2010 will be remembered as the year SQL died; the year relational databases were moved off of the front line; the year that developers discovered that they no longer had to force every single object into a tabular structure in order to persist the data.

2010 is the year of the document database. While momentum has been steadily building over the last seven years or so, there are now a wide variety of stable document databases -- from cloud-based ones from Amazon and Google, to a wide variety of Open Source tools, most notably CouchDB and MongoDB.

So what is MongoDB? Here are five things every PHP developer should know about it:

  1. MongoDB is a stand-alone server
  2. It is document based, not table-based
  3. It is schemaless
  4. You don't need to learn another query language
  5. It has great PHP support

Read on to learn a little about each of these.

OS X: Installing MongoDB and the PHP Mongo Driver

MongoDB is a full-featured object database. Since it is fast, versatile, and schema-less, you can develop a very complex data storage layer without an ORM, and without any tedious coding. For this reason, I have been investigating MongoDB as a storage layer for PHP. Here's how to set up an environment on OS X Snow Leopard.

In this blog we'll do the following:

  • Install MongoDB
  • Add some initial data to MongoDB
  • Install the PHP PECL driver for MongoDB
  • Write a short PHP Script that uses MongoDB
  • Shut down the MongoDB server
Syndicate content