CST363: Week 7
Compare MongoDB to MySQL
Similarities
Both are database models that are used to store data and use querying to filter and sort stored data. Additionally, both use indexing to help with returning queries. Both types of databases also have APIs to help integrate them with programming languages like Java so that they can be used in large scale projects seamlessly.
Differences
While MySQL uses table based schemas organized in documents and rows, MongoDB uses a document based storage where information is held in filetypes like JSON. Because of this MySQL is more structured and designed to be less flexible and rigid, where as the design of a database using MongoDB can be more easily manipulated and altered.
When would you use one over the other
It is best to use MongoDB in situations where the documents will be altered more frequently and when the structure for the database needs to be more flexible. With MySQL's more structured database you are able to make better use of its complex querying abilities to easily sort more set in stone information from a large database. MySQL's structures design also lends itself to insure that data integrity is paramount. On the other hand MongoDB is perfect for when you need frequent and high speed database checks.
Comments
Post a Comment