Week 23 - MongoDB vs MySQL

This week I worked with MongoDB and focused on database operations. These involved using MongoDB commands and scripts to manage and manipulate collections of documents. In one of our labs, we used a simple database in the context of customers and orders. In another, we transitioned from using relational databases, to using NoSQL.

In a group project we focused on transitioning a prescription drug web application from using a relational database (as done in last week’s lab) to using MongoDB. We implemented MongoDB with Spring Boot and set up entity classes and repositories. The lab used the MVC (Model-View-Controller) pattern, with an emphasis on controllers and model classes interacting with MongoDB. This enhanced my understanding of NoSQL databases and showed how MongoDB can handle data structures and interactions more flexibly than relational databases.

Learning these MongoDB concepts taught me the fundamentals of working with NoSQL databases. I worked with inserting, retrieving, updating, and aggregating data which is critical for building scalable applications that rely on dynamic and flexible data models. The lab provided me with a real-world scenario, where managing large datasets efficiently is important for application performance and functionality.

Prompt:

1.       Compare MongoDB with MySQL. 

-MongoDB uses NoSQL and stores data in JSON type documents. MySQL is a relational database and stores data in tables.

  1. What are some similarities? 

-Both allow for CRUD operations (creating, reading, updating, & deleting) and provide indexing mechanisms to improve performance.

  1. What are some differences? 

-MySQL enforces a strict schema but MongoDB is schema-less.

  1. When would you choose one over the other? 

-MongoDB should be used when flexibility is needed like in situations where data is hierarchal, but MySQL should be used when data is more structured and consistent and in situations where reliability is needed like in banking systems.

Comments

Popular posts from this blog

The End of the Byte Trail

Reflections on Algorithms

Refining Documentation and Planning Final Deliverables