MySQL and MongoDB are both databases designed to store data and support operations that allow users to access and modify the contents. Speed, scalability, data integrity, and security are among the reasons why databases are preferred over spreadsheets and flat files in applications with large data sets and more complex transactions.
MongoDB is a document-ordered database where data is stored in files written using a markup lanugage like XML, JSON, etc. It is not as rigid so the flexibility lends itself to implementations where data tends to be unstructured or changing frequently. For example, someone designing a database using MySQL and finds that there will be wide variation between the number of columns that each row entry will use/need, it would be worth looking into MongoDB instead. MongoDB is also better suited for applications where a lot write activity is expected. That is for a number of reasons including restrictive locking and overhead that comes with maintaining data integrity.
MySQL is a relational database where the relationships between data elements dictates how the data is store and accessed/presented. It is more tightly structured than MongoDB so it is better suited for well organized data that is fairly consistent.
No comments:
Post a Comment