Week22: MongoDB

  • Compare MongoDB with MySQL.  What are some similarities?  What are some differences?  When would you choose one over the other?
  • MongoDB and MySQL are both databases used to hold information. The biggest differences between the two would be how they store data, Mongo stores data in JSON documents which hold individual records that can vary whereas MySQL stores individual records in rows of tables. Furthermore, MongoDB can be queried using javascript whereas MySQL uses SQL to query the database. MongoDB is a flexible database that can store unstructured data while on the other hand, MySQL uses a schema that can not be changed.
  • Databases like MongoDB are amazing for building databases for unstructured data such as the index for the world wide web in google's case, or even for a social network like Facebook.
  • Databases like MySQL are useful for building out more rigid databases like medical or educational databases where the type of data being collected is preset.