Tuesday, June 11, 2024

CST 363 - Week 7

MongoDB and MySQL are similar in many ways. They both are free-to-use and open source. They both provide a way to handle and analyze large amounts of data easily. In addition, they are also both capable of being used in tandem with other coding languages, like Java and Python. Both database management systems contain encryption features that allow for needed security.

The most obvious difference between the two systems is that MySQL is a relational system and MongoDB is a non-relational, or NoSQL, system. MySQL stores data using specifically defined schema, which leaves less room for flexibility, while MongoDB stores information like a hash map using key/value pairs. MySQL is more limited when it comes to scalability, while the use of sharded clusters allow MongoDB to be extremely easy to scale.

One reason, I would choose MySQL over MongoDB would be when I need the data formatting to be clear and consistent. For example, employee records all need the same information, so the row/column structure maintains that record-keeping would be consistent. It also allows for some desirable safety features, like referential integrity. However, I really enjoyed the flexibility of MongoDB, so I would choose it when foreign keys aren't as necessary and I want the ability to store data using different schemas. I also though the JSON style structure was easy to understand as that's something that I've had exposure to in other programming areas, while MySQL statement can be complex and take some getting used to.

No comments:

Post a Comment