Getting Started with MongoDB – Part 1

Getting Started with MongoDB – Part 1

Tutorial Details
  • Topic: MongoDB
  • Version: 1.6.5
  • Difficulty: Intermediate
  • Estimated Completion Time: 45 mins

Ready to get in and start learning about MongoDB, one of the coolest technologies for web developers?

In this new series, you’ll go from beginner to pro and be able to use Mongo just as easily as MySQL in your web apps. But first, let’s look at the basics.


Why MongoDB?

What if you could store the programmatic models almost exactly like you model them?

In object-oriented development, we’re encouraged to approach code development through logical models, so that we can more readily conceptualise it in our mind. When we do this, we’re better able discern the logical operations used to interact with it and information that it would contain at different times.

What if you could store the programmatic models almost exactly like you model them? What if you could store them as they are instead of in a series of rows in tables? By learning about MongoDB, you’re going to be able to do just that!

In this series, we’ll be learning everything from the basics of MongoDb, such as creating, updating and deleting databases and records, to being able to perform complex searches for data and elementary data mining with MapReduce. So, without much ado – let’s get started!

Note: This tutorial is done from the perspective of NIX based system a la Mac OSX, Linux BSD and so on. But you should be able to follow along if you’re running Windows pretty well as there are builds for most platforms.


Step 1 : Installing Mongo

Ok, so here’s where the fun begins. We’re going to get started by installing Mongo. Go to the MongoDb website and click on the downloads link.

The MongoDb link to downloads

This will bring you to a page where you can grab a build for your platform and architecture.

The MongoDb download options

This tutorial only covers stable releases, so please do not grab a nightly build. Once it’s downloaded, please install it as per the requirements of your platform.

If you’re on a Nix machine, then please use its package manager to install the latest version for your platform.

With that out of the way, fire up a terminal and type in mongo. That will open up the Mongo shell and let us get under way. All being well, you’ll see output similar to below:

The MongoDb shell

If you see that, then you’re ready to go.


Step 2 : Creating a Database/Inserting Records

Initially, no database is created. But don’t worry, they’ll instantly be created when we start inserting our records, which we’re going to do right now. Copy the content below and paste it in your mongo shell

db.nettuts.insert({
    first: 'matthew',
    last: 'setter',
    dob: '21/04/1978',
    gender: 'm',
    hair_colour: 'brown',
    occupation: 'developer',
    nationality: 'australian'
});
        db.nettuts.insert({
    first: 'james',
    last: 'caan',
    dob: '26/03/1940',
    gender: 'm',
    hair_colour: 'brown',
    occupation: 'actor',
    nationality: 'american'
});
db.nettuts.insert({
    first: 'arnold',
    last: 'schwarzenegger',
    dob: '03/06/1925',
    gender: 'm',
    hair_colour: 'brown',
    occupation: 'actor',
    nationality: 'american'
});
db.nettuts.insert({
    first: 'tony',
    last: 'curtis',
    dob: '21/04/1978',
    gender: 'm',
    hair_colour: 'brown',
    occupation: 'developer',
    nationality: 'american'
});
db.nettuts.insert({
    first: 'jamie lee',
    last: 'curtis',
    dob: '22/11/1958',
    gender: 'f',
    hair_colour: 'brown',
    occupation: 'actor',
    nationality: 'american'
});
db.nettuts.insert({
    first: 'michael',
    last: 'caine',
    dob: '14/03/1933',
    gender: 'm',
    hair_colour: 'brown',
    occupation: 'actor',
    nationality: 'english'
});
db.nettuts.insert({
    first: 'judi',
    last: 'dench',
    dob: '09/12/1934',
    gender: 'f',
    hair_colour: 'white',
    occupation: 'actress',
    nationality: 'english'
});
		  
		  

All good? Excellent! To confirm that the database and accompanying records have been created, type in the following command:

db.nettuts.find()

If everything went to plan, then you will see the following output:

Finding all records

This shows that all of the records were created in the database. One thing to note before we go any further is the id field. This is auto generated by Mongo for you, if you don’t specify an id. The reason is that every record must have a unique id field.

You can see that we have one record for each of the ones that we insert – now we’re ready to start querying them.


Step 3 : Searching For Records

You remember the previous command? It retrieved and displayed every record in the database. Helpful, yes, but how do you be more specific? How do you find all female actors, filtering out the males? That’s a good question and the answer is selectors.

Selectors

Selectors are to Mongo what where clauses are to SQL. As with where clauses, Mongo selectors allow us to do the following:

  • specify criteria that MUST match. i.e., an AND clause
  • specify criteria that CAN optionally match. i.e., an OR clause
  • specify criteria that MUST exist
  • and much more…

Records That MUST Match

Let’s start with a basic selector. Say that we want to find all actors that are female
. To accomplish that, you’ll need to run the following command:

db.nettuts.find({gender: 'f'});

Here we have specified that gender must be equal ‘f’.

Running that command will return the following output:

Finding all female records

What if we wanted to search for male actors? Run the following command:

db.nettuts.find({gender: 'm'});

We’ll get the following results:

Finding all male records

Searching with Multiple Criteria

Let’s step it up a notch. We’ll look for male actors that are English.

db.nettuts.find({gender: 'm', $or: [{nationality: 'english'}]});

Running that will return the following results:

Finding all male, English, records

What about male actors who are English or American. Easy! Let’s adjust our earlier command to include the Americans:

db.nettuts.find({gender: 'm', $or: [{nationality: 'english'}, {nationality: 'american'}]}); 

For that query, we’ll see the following results:

Finding all male, English or American, records

Step 4 : Sorting Records

What if we want to sort records, say by first name or nationality? Similar to SQL, Mongo provides the sort command. The command, like the find command takes a list of options to determine the sort order.

Unlike SQL, however we specify ascending and descending differently. We do that as follows:

  • Ascending: -1
  • Descending: 1

Let’s have a look at an example:

db.nettuts.find({gender: 'm', $or: [{nationality: 'english'}, {nationality: 'american'}]}).sort({nationality: -1}); 

This example retrieves all male, English or American, actors and sorts them in descending order of nationality.

Finding all male, English or American, records sorted by nationality

What about sorting by nationality in descending order and name in ascending order? No problem at all! Take a look at the query below, which is a modified version of the last one we ran.

db.nettuts.find({gender: 'm', $or: [{nationality: 'english'}, {nationality: 'american'}]}).sort({nationality: -1, first: 1}); 

This time we retrieve the following results et:

Finding all male, English or American, records sorted by nationality first and first name second

You can see that this time Arnold Schwarzenegger is placed before Tony Curtis.


Step 5 : Limiting Records

What if we had a pretty big data set (lucky us, we don’t) and we wanted to limit the results to just 2? Mongo provides the limit command, similar to MySQL and allows us to do just that. Let’s update our previous query and return just 2 records. Have a look at the following command:

db.nettuts.find({gender: 'm', $or: [{nationality: 'english'}, {nationality: 'american'}]}).limit(2); 

From that command, we’ll get the following results:

Limit output to 2 records

If we wanted the third and fourth records, i.e., skip over the first two? Once again, Mongo has a function for that. Have a look at the further customisation of the previous command:

db.nettuts.find({gender: 'm', $or: [{nationality: 'english'}, {nationality: 'american'}]}).limit(2).skip(2); 

Running that will return the following results:

Limit output to the 3rd and 4th records

You can see from the original result set that the first two were skipped.


Step 6 : Updating Records

As expected, Mongo provides an option to update records as well. As with the find method and SQL queries, you need to specify the criteria for the record that you want to modify, then the data in that record that’s going to be modified.

Let’s say that we need to update the record for James Caan specifying that his hair is grey, not brown. Well for that we run the update function. Have a look at the example below:

db.nettuts.update({first: 'james', last: 'caan'}, {$set: {hair_colour: 'brown'}});

Now when you run that, if all went well, there won’t be anything to indicate whether it was a success or failure. To find out if the record was update properly, we need to search for it. So let’s do that.

db.nettuts.find({first: 'james', last: 'caan'});

After this you will see the following result:

Update record

This shows that the update worked. One word of caution though, if you don’t pass in the $set modifier, then you will replace the record, if it’s available, instead of updating it. Be careful!


Step 7 : Deleting Records

I think by this stage, you have really started to get the idea of working with Mongo. That’s right, if you want to delete a record, you have to pass in a set of selectors, as you also would with SQL, to determine the set of records to delete. If you don’t do this, you will delete all records – and the database.

So, let’s say that we don’t want James Caan in our list of actors. Let’s remove him from the database using the following command:

db.nettuts.remove({first: 'james', last: 'caan'});

As with update, no visible output is provided to indicate whether we were successful or not – so let’s do a search to double check.

db.nettuts.find({first: 'james', last: 'caan'});

After this, you should see no results returned. If that’s what you’ve found, then we’ve successfully deleted James Caan from our database. But what if we want to delete all the records from the database?

Well, to do that, just remove the selectors from the previous call to remove, as below.

db.nettuts.remove();
 db.nettuts.find();

After running both commands above, we’ll see no output, indicating that the database, with all records have now been removed.

Remove all records

Conclusion

In this rapid introduction to using MongoDB we looked at:

  • What Mongo is
  • How to install it
  • How to create, find, update and delete records

With this knowledge, you can go, practice, and learn more about this wonderful technology. If you want more information, feel free to check out the MongoDb website or follow @mongodb on Twitter.

In the next tutorial, we’re going to start to learn more about complex queries. So stay tuned and thank you so much for reading.

Update: The second part of this series has been posted and can be found here.

Tags: Databases
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • chichibek

    gracias por el tutorial, e estado esperando esto desde ya un rato

    • http://www.maltblue.com/getting-started Matthew Setter

      Hi Chichibek,

      Sorry if this is a poor translation, but: “Tengo el placer. Me alegro de que fue de ayuda. Parte 2 estará disponible muy pronto.”

      best,

      Matt

  • Joseph Moglia

    Thanks for this tutorial! MongoDB is amazing!

  • http://imrobertpicard.com Robert Picard

    I’ve been looking for this article for the past few days and today I see it sitting in Google Reader. Thanks for writing it.

    • http://www.maltblue.com/getting-started Matthew Setter

      Hi Robert,

      I’m really glad that you liked it. Is there anything specific that you’d like to see in the second part of this series?

      Matt

  • http://blue-fx.org Daniel

    Much appreciated.
    Hope to see an entire session about MongoDB

    • http://www.maltblue.com/getting-started Matthew Setter

      Daniel,

      It would take quite some time to write a whole series on Mongo, but in the follow-up to this post, we’re going to be looking at more advanced selectors and some MapReduce, which is sure to please. Hope you get a lot out of it.

      Matt

  • rahman1604

    great., i’ve been waiting for this.

    tq for this.

  • http://crpunderground.wordpress.com Caio Ribeiro Pereira

    Nice post!! MongoDB is a good choice to create a quick and scalable database.

    And MongoDB with Node.js is a perfect couple!

    Hey Take look on my post about this marriage:

    http://udgwebdev.wordpress.com/2011/11/16/um-pouco-de-node-js-e-mongodb-na-pratica/

  • kankuro

    Nice article…. i hope you can post mongo for php and javascript…. hope to read it soon… thanks a lot once again :D

  • http://www.web4you.co.in Deven

    Seems to be new , easy and intresting will have to give a try. But will it be good for big ecommerce or community management web applications ? Thankyou for the tutorial …

  • http://www.jsxtech.com Jaspal Singh

    Great article. Looking for more articles on MongoDB.
    Thanks for sharing.

  • http://blog.swapnilsarwe.com/ Swapnil Sarwe

    Hey nice tutorial.
    All very basic requirements are covered and that too very nicely….

    Looking forward for some advanced tutorial on mongodb in future.

    Good work!!!

    • http://www.maltblue.com/getting-started Matthew Setter

      Hey Swapnil,

      glad that you enjoyed it so much. Is there any particular advanced topic you would like to see covered?

      Matt

  • Marios Hadjimichael

    Excellent Tutorial!

    Will try it soon.
    (English Nationality = British Nationality)

  • http://Www.sanusart.com Sasha

    Is it lacks join functionality or am I blind?

    • http://www.shopcade.com Nav

      As this is a tutorial aimed at those just getting started with MongoDB (and potentionally the JSON format) it maybe of some use in terms of readability to be aware that adding the pretty() function at the end of your query will format the output in the shell – might (esp with large records) make it easier to understand.

      eg:
      db.nettuts.find().pretty()

      Looking forward to the rest of the series!

      • http://www.maltblue.com/getting-started Matthew Setter

        Nav,

        thanks for the update on the pretty function. That which enhances usability is always a good thing to have.

        Matt

    • cahva

      Yeah it lacks join functionality, probably because MongoDB is not a relational database :)

      • http://www.maltblue.com/getting-started Matthew Setter

        Cahva & Sasha,

        Yes, MongoDB is non-relational, but does provide ways of achieving the same or similar results. For more specific information about it, check out the MongoDb documentation – http://www.mongodb.org/display/DOCS/Database+References.

        Matt

  • Matthew Laver

    Fantastic post, it has just confirmed for me that this is the next thing for me to learn along with node.js.

    Just a little point, I got stuck on the ‘Update’ section for a while because it wasn’t very easy to see that hair colour had an underscore in it i.e. hair_colour. (it might help someone)

    Thanks for everything again guys.

  • http://www.ltheobald.co.uk Lee Theobald

    Nice introduction into MongoDB. I’d also recommend people trying the findOne command as well as find if you only are interested in one record. It returns that one record nicely formatted so it’s a little easier to read.

  • Dels

    The funny thing was we used flat-file as database before we invented RDBMS, and now we begin to use “flat-file” (read: non-relational) as database

    Out of topic:
    same thing with input device
    finger -> stick -> pencil -> ballpoint -> stylus -> finger (touchscreen anyone?)

    • http://www.maltblue.com/getting-started Matthew Setter

      Dels,

      whilst I understand what you’re saying, I disagree that we’re reverting to a flat-file implementation. I see it as an evolution of persisting data structures. Databases provide one way of storing content in an efficient way, see normalisation through it’s various forms. But document-oriented databases also provide efficient ways of storing data structures – specifically in a way that are more logical to model and manage.

      Matt

  • http://www.maltblue.com/getting-started Matthew Setter

    Hey folks,

    thanks for all the positive feedback so far. I’ve not looked too much at Node.js so far, but with the consistent mention of it, I’m definitely going to be checking it out soon.

    – @Matthew, thanks for pointing out the difficulty in reading hair_colour.
    – @Lee, thanks for the pointer about findOne

    I’ll see about adding in some amendments.

    So, who’s interested in MapReduce?

    Matt

  • http://dan.cx/ Daniel15

    Interesting tutorial! What’s the performance of querying with criteria like this? Do you need to index MongoDB databases like traditional SQL databases for optimum performance?

  • http://www.dz-tchat.com megainfo

    Excelent article !

    thank you

  • http://www.shopcade.com Nav

    As this is a tutorial aimed at those just getting started with MongoDB (and potentionally the JSON format) it maybe of some use in terms of readability to be aware that adding the pretty() function at the end of your query will format the output in the shell – might (esp with large records) make it easier to understand.

    eg:
    db.nettuts.find().pretty()

    Looking forward to the rest of the series!

  • Darren

    Matt, nice concise article, and just enough for a starter.

    Is there a templating solution available for this when I build web pages, to pull directly from the database or do you have to transform the returned data yourself?

    I am really looking forward to the next article… crackerjack stuff.

    • http://www.maltblue.com/getting-started Matthew Setter

      Darren,

      thanks for the feedback. I was hoping that I’d pitch it at the appropriate level and it’s rewarding to know that I did. By templating, do you mean libraries to make using it simple to work with or code examples? For code examples, I don’t have any to hand, but can get some.

      For code libraries:
      – There’s the mongo extension for PHP (http://php.net/manual/en/book.mongo.php)
      – There’s the excellent Shanty Mongo library (https://github.com/coen-hyde/Shanty-Mongo) for Zend Framework by Coen Hyde
      – I wrote a post on combining Zend and Shanty Mongo (http://www.maltblue.com/zend-framework/zend-framework-and-mongodb-%e2%80%93-how-to-put-them-together) a little while ago which may also help

    • http://www.facebook.com/profile.php?id=100000494068652 Andi

      Thanks, Depp. Glad you enjoy the viedos.There are a number of situations that could cause the error you mention, but suffice it to say that if the full-round fails, you have two options: 1) try to make a different type of fillet work, or 2) try to figure out what’s causing the failure. Obviously number 2 is the better option in the long run, but it’s also more difficult, and takes more experience and experimentation.There is about a 90% chance that with this form, the root of your problem is the surface creating the pour spout. If there is anything wrong with that surface, it may cause the full-round fillet to fail. Try adjusting the size and tension of pour spout and see if you can get the fillet to work.Good luck!Adam

  • Michael

    Thank you for giving me a glimpse at MongoDB.

    I don’t see what advantages this has over SQL based databases, as everything that was shown was compared to a SQL query as a comparison.

    Is MongoDB relational? All the data you entered into the database appears to be of the same type, and would sit in one table in a MySQL database. What about different types of data, for example agencies that handle these actors? Would the agency information need to be repeated for each actor?

    Perhaps I am jumping the gun, and you are going to cover this in further tutorials, but I’m just not sure from this one what makes MongoDB “one of the coolest technologies for web developers”.

    • http://www.maltblue.com/getting-started Matthew Setter

      Michael,

      It is a bit hard to give a full overview of Mongo in a getting started type tutorial. But I hope to deliver more in the second part to the series. I appreciate also that the data structures were rather simple in nature, so they won’t really highlight the benefits of using Mongo over a database, such as MySQL.

      One of the best benefits that I see for it are that it’s more natural to model it. Instead of thinking about it in terms of tables, rows, columns etc, as you would for a traditional RDBMS, you can think more of a document or a model as you do in OO programming. I believe that makes interacting with it simpler and more efficient.

      Another, is that there, can be, less to consider with respect to caching. Given that Mongo holds documents in memory, the response time should be higher. However, buyer beware, that has a direct impact on the size of your documents, the number of documents etc when weighed against your hosting setup.

      A third benefit are the mongo capped collections – http://www.mongodb.org/display/DOCS/Capped+Collections which act a lot like a FIFO data structure. In capped collections, you can set the size of a collection, to say 40mb. When the collection is filled, the oldest record will be removed to make way for the new entry. This could be used in several ways, on example would be to store hourly/daily log data.

      I’ll be exploring more of the benefits of Mongo in the follow up to the series.

      Matt

  • http://dagrevis.lv/ daGrevis

    > We’ll look for male actors that are English.

    `db.nettuts.find({gender: ‘m’, $or: [{nationality: 'english'}]});`

    I don’t understand this from logical aspect. Why there’s ‘or’? In my opinion, there should be ‘and’ because we want to find all people that are male **and** are English too. Not people who are male or English because it would return also females that are English, right?

    Please explain this to me, guys. I’m new to MongoDB. One thing I’m sure – it’s exciting. :)

    P.S. Superb review. Can’t wait for next part! :)

  • http://dagrevis.lv/ daGrevis

    Got it.

    This may help you to understand too:

    MongoDB:

    `{gender: ‘m’, $or: [{nationality: 'english'}, {nationality: 'american'}]}`

    MySQL:

    `WHERE gender=”m” AND (nationality=”english” OR nationality=”american”)`

    • http://alexevans.name Alex

      Yes i think the male and english example was a mistake, allthough it may very well work like so;
      `db.nettuts.find({gender: ‘m’, $or: [{nationality: 'english'}]});`

      I think this is how it should be written;
      `db.nettuts.find({gender: ‘m’, nationality: ‘english’});`

      • http://www.maltblue.com/getting-started Matthew Setter

        Alex & daGrevis,

        thanks for picking me up on a not so clear example. Much appreciated.

        Matt

  • http://www.charithsaranga.com Charith Saranga

    When I try to install and run MongoDB on Windows XP, I get the following error

    “Error: couldn’t connect to server 127.0.0.1 shell/mongo.js:84
    exception: connect failed”

    I even disabled my firewall, but the problem persist. Could anyone please tell me what could be the reason?

    • Christopher

      CS,

      See if this Microsoft link has any information that could help:

      http://support.microsoft.com/kb/884020

      Christopher

      • http://www.charithsaranga.com Charith Saranga

        No, I doesn’t seem to work Christopher. I have WinXP with Service Pack 3. That patch is for Service Pack 2. Can’t still understand what the problem is.

        Anyway thanks very much! :)

    • Dan

      In Windows you need to run mongod.exe to start the database server. This isn’t run automatically like it would be on a unix system.

  • http://www.stuff4you.biz dan web developer

    looks like MongoDB is not for me since the syntax is ugly looking and annoying to type (excessive characters like brackets, squiggly bracelets, commas and other non-letters.)

    • http://www.maltblue.com/getting-started Matthew Setter

      Hey Dan,

      you don’t need to interact with it directly. There are a host of extensions (or drivers) for it available for just about any modern, web, language. Check out: http://www.mongodb.org/display/DOCS/Drivers

      Matt

  • http://www.code2learn.com Code 2 Learn

    A very interesting post. I have just started using Momgo DB for my Project and i think it is great tutorial to for the amateurs to start with.. Code 2 Learn

    If interested in link exchange then please email me

  • Christopher

    This method is such a throw-back for me to the days of COBOL and Data Files, where data was stored conceptually as rows — no columns and as such, no tables and no relations. This is more a walk down memory lane for me. I would like to see this data storage and retrieval type expounded upon however. The jQuery type of language syntax leads me to evaluate MongoDB as a type of primer for beginners pursuing database theory, much the same way that Pascal was intended as a primer to a structured approach to programming. Having worked with relational database systems for ten years now, I cannot see much of a serious, high data volume use case for MongoDB. But that doesn’t mean I won’t play with it. Thank you for the interesting article.

  • http://onecore.net Mahesh

    I need to get MonoDB to work with python now as i work with python most of the time. This introductory tutorial is going to be very useful while working with mongo and python. Thanks Matthew :)

  • http://parkerituk.com Parker

    so which folder does mongoDB stores the document?

  • http://martinodf.com Martino di Filippo

    I’m a MongoDB noob, but wouldn’t

    db.nettuts.find({gender: ‘m’, nationality: {$in: ['english', 'american']}});

    be better and easier to understand than

    db.nettuts.find({gender: ‘m’, $or: [{nationality: 'english'}, {nationality: 'american'}]});

  • http://sirwan.me Sirwan Qutbi

    What about nested data ?

  • http://www.amkosys.com Amar

    There is a mistake In Step 4 (Sorting Records)

    Ascending should be : 1
    Descending should be : -1

    Please make it change..

  • http://8gramgorilla.com/ 8 Gram Gorilla

    I really need to give MongoDB a shot sometime as I’ve heard a lot of great things about it. I think it would quite a hard leap for me to make conceptually though after using MySQL for so many years. Also, are there are technical advantages to using it over MySQL? Such as speed etc?

  • Ferry Ardhana

    Hope this will be “MongoDB Series” :D
    Great tutorial, thank you so much!

  • Justin

    Great post. I would like to see information about JavaScript drivers for mongo in the next post. Cheers.

  • Justin

    Great post. I would like to see information about JavaScript drivers for mongo in the next post. Cheers.

  • Sasikala

    would like to see information and programming related to mapreduce on MongoDB

  • nik

    Why not making a tut of something usefull like hbase or oracle g11?

  • Michael

    The introductory article was good. My only suggestion is to improve the English (grammar and punctuation, specifically). (“Eats, Shoots & Leaves”? :) )

  • http://twitter.com/gbaldera Gustavo Rod. Baldera

    very helpful!! excellent

  • http://99techtips.com Shekhar

    Fantastic article for beginners..

  • Wil Keenan

    This is really helpful. Got a mongo db up and running – walked through this tutorial, in half an hour.

    I get how to modify the db from the mongo shell but.. Can you give me some quick tips on how I can connect my simple contact manager app built on Backbone.js to my local instance of mongo db?

    Would I just be executing simple JS calls? How do I cross this divide between the simplicity of these mongo calls and what I would actually execute from my app?

  • http://www.comcure.com Nick Nelson

    Would love mention of backing up MongoDB. The Comcure team would be happy to write that article.

  • Fernando Lozano

    Hi, Matthew!

    Thanks for writing this tutorial about MongoDB. I am new with this and it was very helpful as an introduction guide.

  • sundaram

    The tutorial is simple, with examples and self explanatory containing screen dumps.
    thanks

  • Karma Dice

    You sir! Rock! Beautiful explanation. Thank you.

  • http://net.tutsplus.com/tutorials/databases/getting-started-with-mongodb/ RNA

    Hi,
    I want to install mongoDB into my application specific unix environment. Can anyone help me how to do that.

  • rock

    it is very good and it is very useful

  • harjot

    hi
    i need to open existing mongodb database files on my machine (in fedora17) which is created on another machine
    m not able to open that database

  • http://twitter.com/robertjmoore Robert J. Moore

    This is awesome, thanks! In case someone finds it useful, I recently built this MySQL to MongoDB query translator tool for figuring out how to express different kinds of SQL queries in Mongo syntax: http://www.querymongo.com