A Quick Look at MongoDB

MongoDB is an open source database system that works with JSON style documents (as opposed to traditional SQL databases with rows and columns). I hadn’t worked with MongoDB for quite a long time, so I thought I’d take the latest version, v3.4.2, out for a test drive.

Installation was quick and easy. I accepted all default except for installing at C:\mongodb instead of C:\Program Files. I created directories C:\Data\db and C:\Data\log which are the defaults to hold data and log files respectively.

The MongoDB system can run as a Windows service or as a more traditional Linux-style daemon. I used the service approach.

My tiny demo first connected to the running service and listed existing system databases (admin and local):

C:\mongodb\bin > mongo
> show dbs

Next I created a dummy database named mydb with a single entry:

> use mydb
> db.users.insert({first: 'John', last: 'Smith'})

Then I cleaned up by deleting the dummy database:

> use mydb
> db.dropDatabase()

Bottom line: MongoDB is very, very nice. Technical thumbs up!

This entry was posted in Miscellaneous. Bookmark the permalink.