A Comparative Analysis of Database Query Languages in MySQL, Couchbase Server, and MongoDB
All databases have the goal of providing the most powerful data manipulation mechanisms, so that applications can efficiently query the data managed. In this regard, traditional relationship database management systems utilize SQL as a standard to access data. On the other hand, most of the NoSQL databases rely on a proprietary language or APIs.
This report provides a comparative analysis of MySQL, N1QL, and MongoDB query. The three database languages were used to query nine different business scenarios across seven metrics.
- getting a list of customers and their contacts
- showing all accounts assigned to a territory
- determining the top 10 industries based on the customer’s sales activities
- calculating the time spent talking to accounts assigned to a territory
- showing how the number of sales-related tasks have changed over time
- identifying sales team members based on the assigned territory
- calculating the percentage of the customer’s contacts who attend the meetings against the total number of the customer’s contacts
- getting a ranked list of hotels using Google Natural Language API
- identifying customer accounts based on different attributes
The metrics against which the scenarios were compared include:
- skills availability
- a number of code lines
- a number of client/server trips
The comparative results are supported by 17 figures, 11 tables, and 23 code samples.