CST 363 Week 7

  

WELCOME TO WEEK 7

Learning Journal - MySQL vs MongoDB

Both MongoDB and MySQL have query projection, unique keys, and indexes. Relational databases support unique keys and auto-incremented primary keys. In MongoDB, all documents have a unique _id attribute that can also be autogenerated when there is no value set at insert time. Both use a query language to interact with data. MySQL uses SQL, while MongoDB uses its own query language based on JSON-like documents.

Another similarity is that both systems support indexing to enhance query performance. MongoDB and MySQL also both support replication, which allows data to be copied for redundancy and high availability.

Some differences between the two databases are that MySQL supports query joins, while MongoDB does not. MySQL is a relational database that uses tables, columns, and rows, which enforces a strict schema. MongoDB, on the other hand, is a document database that stores data in flexible, JSON-like documents, allowing easy changes.

If an application requires complex transactions and strong data integrity, MySQL would be best, especially where a predefined schema is made and the data structure is not expected to change a lot. However, MongoDB is better for applications that require flexibility and scalability. 

Comments

Popular posts from this blog

CST 300 Week 4

CST 300 Week 3

CST 300 Week 1