mongoDB Management Studio

Posted by Liam McLennan on Geeks with Blogs See other posts from Geeks with Blogs or by Liam McLennan
Published on Sat, 29 May 2010 01:53:14 GMT Indexed on 2010/05/29 8:12 UTC
Read the original article Hit count: 307

Filed under:

This weekend I have been in Sydney at the MS Web Camp, learning about web application development. At the end of the first day we came up with application ideas and pitched them. My idea was to build a web management application for mongoDB.

mongoDB

I pitched my idea, put down the microphone, and then someone asked, “what’s mongo?”. Good question. MongoDB is a document database that stores JSON style documents. This is a JSON document for a tweet from twitter:

 db.tweets.find()[0]
{
        "_id" : ObjectId("4bfe4946cfbfb01420000001"),
        "created_at" : "Thu, 27 May 2010 10:25:46 +0000",
        "profile_image_url" : "http://a3.twimg.com/profile_images/600304197/Snapshot_2009-07-26_13-12-43_normal.jpg",
        "from_user" : "drearyclocks",
        "text" : "Does anyone know who has better coverage, Optus or Vodafone? Telstra is still too expensive.",
        "to_user_id" : null,
        "metadata" : {
                "result_type" : "recent"
        },
        "id" : {
                "floatApprox" : 14825648892
        },
        "geo" : null,
        "from_user_id" : 6825770,
        "search_term" : "telstra",
        "iso_language_code" : "en",
        "source" : "<a href="http://www.tweetdeck.com" rel="nofollow">TweetDeck</a>"
}

A mongodb server can have many databases, each database has many collections (instead of tables) and a collection has many documents (instead of rows).

Development

Day 2 of the Sydney MS Web Camp was allocated to building our applications. First thing in the morning I identified the stories that I wanted to implement:

Scenario: View databases
Scenario: View Collections in a database
Scenario: View Documents in a Collection
Scenario: Delete a Collection
Scenario: Delete a Database
Scenario: Delete Documents

Over the course of the day the team (3.5 developers) implemented all of the planned stories (except ‘delete a database’) and also implemented the following:

Scenario: Create Database
Scenario: Create Collection

Lessons Learned

I’m new to MongoDB and in the past I have only accessed it from Ruby (for my hare-brained scheme). When it came to implementing our MongoDB management studio we discovered that their is no official MongoDB driver for .NET. We chose to use NoRM, honestly just because it was the only one I had heard of. NoRM was a challenge. I think it is a fine library but it is focused on mapping strongly typed objects to MongoDB. For our application we had no prior knowledge of the types that would be in the MongoDB database so NoRM was probably a poor choice.

Here are some screens (click to enlarge):

image image

© Geeks with Blogs or respective owner