Wednesday, June 5, 2024

CST 363 Week 7 Report

MySQL and MongoDB are both great programs one can use to manage databases.

Similarities: Both programs are open source and can also be installed on many different operating system such as Windows, Mac, and Linux. Both programs support indexing and large amounts of data, as well as sharding which can help to distribute data across many machines.

Differences: MySQL is technically a relational database, which means it is centered on tables, whereas MongoDB is NoSQL, document based. In MongoDB, data is stored in documents, specifically BSON files which are closely related to JSON format. MongoDB has a proprietary query language, whereas MySQL uses SQL, or structured query language. Furthermore, MongoDB does not use schemas, and each document can have a different structure, whereas MySQL relies heavily on schemas and every table must have a predefined schema structure.

When to choose MySQL: MySQL should be chosen whenever we require structured data and very reliable, consistent transactional integrity. Another indicator for MySQL is when we require complicated queries and joins. Some applications could be those that work with e-commerce and web apps.

When to choose MongoDB: MongoDB should be selected as our program when there is a need to store large volumes of unstructured data. Another good indicator would be if we require flexible schemas and fast, plentiful write transactions. Some applications could be those that work with real time analytics.

No comments:

Post a Comment