5 Reasons MongoDB is better than DynamoDB

Posted on May 30, 2014 by Sankeerth Reddy | Comments(0)

With NoSQL databases leading the next generation data stores, MongoDB and DynamoDB are two very viable options for quite a number of usecases. While MongoDB is a open source document store database, DynamoDB is a managed key-value store which is offered as a service by Amazon. MongoDB, being available as open source and has support for various platforms (cloud and in-house), offers higher control over the database when compared to managed datastore like DynamoDB. My colleague wrote and article 5 reasons why DynamoDB is better than MongoDB. In response to that below I give five reasons to choose DynamoDB over MongoDB. Reason 1: It’s all about the data model and indexes Proper indexing is arguably the most important part in a NoSQL database design. MongoDB allows you to have arbitrary index on any of the fields. It also allows you to have many other kind of indexes which include compound indexes, multi-indexes on arrays and geospatial indexes. In version 2.6, MongoDB has support for full text indexes to enable faster text pattern searches. DynamoDB on the other hand provides limited indexing capabilities. Primary key is indexed, and now it allows indexing based on other keys via Local Secondary Indexes (LSI)

Continue reading…

MongoDB Monitoring Service – Installation and Set Up

Posted on May 21, 2014 by Sankeerth Reddy | Comments(0)

MongoDB Monitoring Service or MMS is a free monitoring application developed by the MongoDB team to manage and troubleshoot MongoDB deployments. Once set up correctly, you get a bunch of metrics that can be very useful during troubleshooting production issues. MMS is also used by MongoDB team to provide suggestions and optimization techniques. In this post, I will be briefing about the steps to install and few tips and tricks to setup MMS for one’s MongoDB cluster, without having to spend a lot of time. On the whole, there are two steps to set up MMS for a sharded cluster. 1: Install and start monitoring agent on one of the nodes. Preferably on a mongos machine as it has access to all the nodes ( Shards and Config Servers ) 2: Add the nodes to the MMS Console for monitoring Task 1: 1. Firstly, create an account on mms.mongodb.com and login into MMS. 2. Get the monitoring agent installation instructions on the settings page. 3. Select the platform on which MMS agent needs to be installed to get the corresponding instructions. 4. The API keys would be needed to be updated on the configuration file after installing the agent. The

Continue reading…

5 Reasons why DynamoDB is better than MongoDB

Posted on April 29, 2014 by Bhavesh Goswami | Comments(2)

If you are considering MongoDB or any other NoSQL databases, its a must that you consider DynamoDB. In the MongoDB vs DynamoDB matchup, DynamoDB has a lot of brilliant features that help ease the pain of running NoSQL clusters. Below I give five reasons to choose DynamoDB over MongoDB. Reason 1: People don’t like being woken up in the middle of the night One sure-shot way to motivate someone to rethink their priorities in life, and reconsider their choice in becoming an IT professional, is to hand them pager-duty for a MongoDB cluster. Maintaining a MongoDB cluster requires keeping the servers up and running, keeping the MongoDB processes up and running, and performance monitoring for the cluster. Check this image for example (time there are in UTC). In the middle of the night, a client’s MongoDB Cluster generated few automated CloudWatch alarms. At 4 AM the conversation between a systems engineer and me is like following: Engineer: Hey, got woken up by the pager, seems like CPU utilization is spiking, but requests are running fine. I looked around but found nothing. Can I just resolve this issue and look at it tomorrow? Me: You woke me up to just ask this?

Continue reading…

Sample Questions for MongoDB Certified DBA (C100DBA) exam – Part II

Posted on April 21, 2014 by Sankeerth Reddy | Comments(7)

Here are some more sample questions for C100DBA: MongoDB Certified DBA Associate Exam. Please give them a try and the answers are at the end of this blog post. If you have not yet attempted Part I of sample questions – they are available here. Section 1: Philosophy & Features: 1. Which of the following are valid json documents? Select all that apply. a. {“name”:”Fred Flintstone”;”occupation”:”Miner”;”wife”:”Wilma”} b. {} c. {“city”:”New York”, “population”, 7999034, boros:{“queens”, “manhattan”, “staten island”, “the bronx”, “brooklyn”}} d. {“a”:1, “b”:{“b”:1, “c”:”foo”, “d”:”bar”, “e”:[1,2,4]}} Section 2: CRUD Operations: 1. Which of the following operators is used to updated a document partially? a. $update b. $set c. $project d. $modify Section 3: Aggregation Framework: Questions 1 to 3 Below is a sample document of “orders” collection { cust_id: “abc123″, ord_date: ISODate(“2012-11-02T17:04:11.102Z”), status: ‘A’, price: 50, items: [ { sku: “xxx”, qty: 25, price: 1 }, { sku: “yyy”, qty: 25, price: 1 } ] } Select operators for the below query to determine the sum of “qty” fields associated with the orders for each “cust_id”. db.orders.aggregate( [ { $OPR1: “$items” }, { $OPR2: { _id: “$cust_id”, qty: { $OPR3: “$items.qty” } } } ] ) 1. OPR1 is a.

Continue reading…

Sample Questions for MongoDB Certified DBA (C100DBA) exam – Part I

Posted on April 5, 2014 by Sankeerth Reddy | Comments(20)

Below are some of the sample questions Sample Questions for C100DBA: MongoDB Certified DBA Associate Exam. You can read more about the MongoDB Certified DBA Exam here. Please give them a try and the answers are at the end of this blog post. Section 1: Philosophy & Features: 1. Which of the following does MongoDB use to provide High Availability and fault tolerance? a. Write Concern b. Replication c. Sharding d. Indexing 2. Which of the following does MongoDB use to provide High Scalability? a. Write Concern b. Replication c. Sharding d. Indexing Section 2: CRUD Operations: 1. Which of the following is a valid insert statement in mongodb? Select all valid. a. db.test.insert({x:2,y:”apple”}) b. db.test.push({x:2,y:”apple”}) c. db.test.insert({“x”:2, “y”:”apple”}) d. db.test.insert({x:2},{y:”apple”}) Section 3: Aggregation Framework: 1. Which of the following is true about aggregation framework? a. A single aggregation framework operator can be used more than once in a query b. Each aggregation operator need to return atleast one of more documents as a result c. Pipeline expressions are stateless except accumulator expressions used with $group operator d.  the aggregate command operates on a multiple collection Section 4: Indexing: Below is a sample document in a given collection test. { a

Continue reading…

Preparing for MongoDB Certified DBA Associate Exam

Posted on March 5, 2014 by Sankeerth Reddy | Comments(11)

MongoDB Inc. has recently released certification program. There was lack of certification in the MongoDB ecosystem and after having worked with MongoDB for few years now, the news about MongoDB certification got me excited. I recently appeared for the MongoDB Certified DBA Associate Exam and am going to share a few details about the exam and my experience. MongoDB website has very sparse information, so I am hoping information here will help fellow exam takers. Why get MongoDB certified now? According to MongoDB – “Certification helps you establish technical credibility and facility with MongoDB and contributes to your organization’s proficiency in running applications on the platform.” MongoDB is growing to be one of the preferred NoSQL databases in the market. Its flexibility in terms of the supported amount of data and ease of horizontal scalability and administration, both on-premise and cloud, is making corporates opt for MongoDB as the preferred next generation database. With growing users of mongodb, this certificate would definitely make you stand out from the crowd. As the certification is available for a few weeks in a year, the number of certified DBAs would also be accordingly less. Hence, it is time to leverage the opportunity and become one

Continue reading…