Learning Journal Week 7
• Compare MongoDB with MySQL.
The biggest difference between MongoDB and MySQL is how they store the data. MySQL uses tables (also known as rows and columns.) While MongoDB uses collections of documents. Collections of documents are bit more flexible than rows and columns.
• What are some similarities?
Obviously what makes them so similar is that both are used to store data and retrieve data. Applications can use either Database depending what kind of trade offs they are willing to take or leave on the table. Both are capable of dealing with large amounts of data, and can utilize different query pathways to speed up the process of retrieving data.
• What are some differences?
One big one is the language/syntax. MySQL is based of SQL (Structured Query Language); This is why most of the syntax deals with inserting data, querying data from multiple tables, or even deleting data. Whereas MongoDB uses a document-based query language (this language is very similar to the JSON format).
• When would you choose one over the other?
It would be best to chose MySQL if you require complex queries. Complex queries requires a very rigid and robust data base. Having predefined tables and fields gives MySQL data integrity. This robustness allows for scalability as the data set increases.
MongoDB shines the most when the data being stored is a bit unstructured. This is important to think about when the data being processed is a bit more ambiguous. MongoDB is capable of splitting up its workload in shards. So horizontal scalability becomes easier.
Comments
Post a Comment