My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

SQL vs NoSQL query

Manish Basnet's photo
Manish Basnet
·Jan 9, 2021·

1 min read

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));