CST 363 Week 7 Reflection

 MySQL vs MongoDB

This week, we had the opportunity to work with MongoDB in our labs. After experiencing MongoDB and MySQL, there are a few similarities and differences that I noticed between the two. 

Similarities 

Both MySQL and MongoDB help the user create and interact with a database, especially large databases. After experiencing both, I feel that they are user-friendly and easy to use. They are both open-source software available for the public to use. They are also both adaptable to database programming. During this class, we have used both programs with Java to see how the programming language uses each one as a database with information obtained from a webpage. 

Differences 

MySQL is a relational database, while MongoDB is a non-relational database. MySQL holds data in tables with columns and rows, while MongoDB holds data in collections with documents in a JSON format. Each database uses a different programming language to complete its queries. MySQL uses SQL, and MongoDB can use a variety of different languages except SQL, hence it being called a NoSQL database. One language we used in our labs was Javascript. MongoDB also has a dynamic structure, meaning different documents can hold different information, while MySQL needs a set schema to be followed. Because of this, MongoDB stores, reads, and writes data faster than MySQL. 

When would you choose one over the other? 

MongoDB is the best choice when dealing with Big Data, such as social media, email, and the Internet of Things (IoT). Its unstructured schema allows data to be stored in various ways and accessed quickly. MySQL would be best suited for applications that involve transactions that need to be structured with specific information that is consistent among all entries (first name, last name, date, etc.). As a novice programmer, MySQL would be a good place to begin to learn the basics of databases and query processing. Once mastered, MongoDB would be the next database to learn as it has integration with different programming languages and can help with more complex data structures. 

Comments

Popular posts from this blog

CST 300 - Week 8

CST 300 - Week 5

CST 300 - Week 4