DEV Community

SRIMATHI S
SRIMATHI S

Posted on

Exploring MongoDB

As part of exploring modern databases, I decided to work with MongoDB.
It uses JSON-like documents to store data, making it very intuitive to query and manipulate.
Compared to traditional SQL databases, it offers great flexibility and speed for unstructured datasets.
In this post, I’ll share my learning experience and some hands-on tasks I completed.

1.Setting Up MongoDB

I installed MongoDB (you can either install locally or use MongoDB Atlas Cloud).
After installation, I verified the setup using:
mongod --version
mongo --version

MongoDB was up and running!

2.Importing Dataset

For this project, I used a sample Yelp Reviews Dataset (JSON format).

3.Insert Records Manually

  • I inserted 10 sample records into the collection:

A pie chart showing 40% responded

4.Queries

Find Top 5 Businesses with Highest Average Rating.

A pie chart showing 40% responded

  • Count How Many Reviews Contain the Word “good”.

A pie chart showing 40% responded

  • Get All Reviews for a Specific Business ID.

A pie chart showing 40% responded

  • Update a review and delete a record.

A pie chart showing 40% responded

Conclusion

Through this hands-on project, I learned how to:

  • Insert, query, update, and delete records in MongoDB
  • Perform aggregation queries
  • Use regex for text search
  • Export query results to JSON/CSV

MongoDB’s flexibility and power make it a great tool for handling real-world datasets.

Top comments (0)