Week 23 (6/11/2025 - 6/17/2025)
(Click on READ MORE for better formatting)
Hi everyone, welcome to my 23rd blog! This is the Week 7 post for CST 363 Introduction to Database Systems.- Compare MongoDB with MySQL. In the instructions for Lab 21, there is an nice chart that I will be referencing in order to help make these comparisons. Below, I will highlight some of the similarities and differences I saw.
- What are some similarities?
- MySQL and MongoDB both support query projection, unique keys, indexes, and explain. MySQL NDB server edition and MongoDB both support shading and replication.
- What are some differences?
- MySQL uses SQL as the query language while MongoDB uses its own query language.
- Only MySQL fully supports query joins and transactions.
- For indexes on sharded data, MongoDB uses a system where each shard has its own index. However, unique indexes are not supported on sharded collections.
- For replication, MongoDB uses a leader-follower structure.
- When would you choose one over the other?
- I believe that the decision to use one over the other is dependent on a project's goals. Since MongoDB excels at storing related information together, it might make sense to use MongoDB in a situation that requires a high level of scalability. MongoDB is also able to take advantage of a dynamic schema whereas SQL uses a stricter schema structure. Another way it can be described is that MongoDB is like JavaScript (dynamic), whereas SQL is more like Java (strict).
That is all for this week, see you in my Week 24 post!
Comments
Post a Comment