Today I created my first MongoDB application. Please no applause, this app is incredibly boring. At the time I was fresh out of cool ideas, especially ideas that required a nice amount of data.
So I went with a simple US Population search script. I actually had a copy of the 2009 census data in a mysql table from some time ago. I have no idea why, I guess I’m a hoarder like that.
But basically I built this just for the experience. I’ve been hearing a lot of hub bub about MongoDB and thought I should give it a try. I have to say from what I’ve fiddled with so far it is pretty interesting. If you’re coming from a RDBMS like I was, it’s going to take some time to change your thought process.
MongoDB store its data in what they call documents which are somewhat like table rows. I’m not going to go down that road because I’m still a newbie myself and I don’t want to put anyone on the wrong path. But what helped me get along was that I envisioned accessing data from a XML feed. Of course MongoDB documents are not XML feeds but they are structured a bit like a feed.
For example goto Buy.com and view the source of one of their product feeds (Example Product Feed) look specifically at each product node. When accessing data from MongoDB document I put myself in the mindset as if I’m grabbing data from a XML product feed. Crazy, but it works for me.
Bottom line I think MongoDB is pretty interesting, I’m still new to it so I’m not quite ready to ditch MySql.
During my quest for knowledge I found myself looking for examples to help me get started. In my opinion there wasn’t that much out there but that’s probably because it’s fairly still new. But here are few sites that help me get started.
- http://learnmongo.com/ – He/She had some good PHP examples.
- http://www.php2all.de/manual/mongo.tutorial.html – Also has some good PHP & MongoDB example
- http://www.mongodb.org/ – The MongoDB Official site
- http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart – The Sql to MongoDB mapping chart is pretty cool.
- http://blog.mongovue.com/ – I think it’s a great tool for view your collections and documents.
- Also check around for other presentations on slideshare.com there a bunch of good one out there.