Russell Broadbent

Yorkshire based web developer

MongoDB on php

MySQL has been my database solution of choice for over 5 years now, it’s solid, reliable, easy to use/setup and you can transfer data between databases in a quick, but I was tired of always revising my database schema for every iteration of site that I built. I thus started researching schema-less databases and found only two, real, candidates that would integrate nicely with php, couchdb and mongodb. I tried couchdb but found the query language/Erlang combination to be a bit difficult to get on with on a daily basis. This left me with mongodb.

Firstly I had to install the PECL extension for php, a fairly straight forward task.
Next I simple ssh’d into my VM and apt’d the package mongodb-10gen.
Restarted apache and I was ready.

To help you get started querying straight away the mongodb site provide a very hand sql-to-nosql userguide.

 

Comments are closed.