SQL vs NoSQL query
In this article, we will explore a developer's experience moving from writing SQL queries to NoSQL queries for analytics. We will divide this article into two parts. First part will cover SQL section.
PS: Readers should have in-depth knowledge on SQL and beginner knowledge on aggregation framework of MongoDB.
Let's take an example problem for understanding overall use case for this article.
Problem:
- We have two tables actor_survey for collecting information about how public rates actor based on their overall acting performance and actor_rating for different ratings used for defining their performance. We will use below MySQL queries to create tables.
-- actor_survey table
create table actor_survey(id integer, actor_name varchar(100), rating_id integer);
-- rating table
create table actor_rating(id integer, rating_name varchar(100), rating_description varchar(100));