MongoDb trials

Posted: January 9, 2011 in database, mongodb

Alright I am a sucker for new technology and well I have been sucked into a new NoSql solution called MongoDb (http://www.mongodb.org/).  Basically I dislike Sql as it lacks the performance of most alternatives on the market (CouchDB, MongoDb, etc.)  and the Sql Management studio is a poorly designed user interface.  Wait can it really perform that much better than my good ol’ SQL?  Check out Kennedy’s blog (http://www.michaelckennedy.net/blog/2010/04/29/MongoDBVsSQLServer2008PerformanceShowdown.aspx) for some background; he has done some extensive testing on this subject and came up with some stunning results.  I have posted his results at the end of this post for your inspection.  There is the source, C# driver, and a few other source code goodies here (https://github.com/mongodb).  I will post a separate article on using the C# driver later on but wanted to give an introduction for now.

So what is MongoDb?    A high performance DOCUMENT database and by document I mean Java Script Object Notation (JSON, http://bsonspec.org/).  What does this mean for me?  I can store nested and often very complex data structures in this database and still be able to query such a thing.

So is it hard to install and run on Windows?  Nope, just create a C:\data directory then create a C:\data\db sub-directory…..Mongo won’t do this by itself which feels kind of lame in my opinion but I still like it.  Then download the version of your desire ( I am currently Windows 7 64 bit) from http://www.mongodb.org/downloads then unzip it and stick wherever you want it.  After doing this you will need to start up mongod.exe under the bin directory (from unzipping) which is the server then mongo.exe which is the command line client.  You will see something similar to this:

where the top window is the server and the bottom is the client.  From here you should be able to run through the many examples floating out on the internet.  Have fun and remember Kennedy’ s findings…it is worth the pain to learn a new technology IF the gain justifies the costs:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s