reading-notes

Class 11: MongoDB and Mongoose

Resources

Reading Statement

Why this topic matters as it relates to the material I am studying:

nosql vs sql

  1. Fill in the chart below with five differences between SQL and NoSQL databases: | SQL | NoSQL | | ——– | ——- | | Table based databases | document based, key-value pairs, graph database or wide-column stores | | Primarily relational databases | Primarily non-relational or distributed databases | | Vertically scalable, scaled by increasing horsepower of the hardware | Horizontally scalable, scaled by increasing the database servers in the pool of resources to reduce load | | Uses structured query language for defining and manipulating data, very powerful | queries are focused on collection of documents, sometimes called UnQL | | Predefined schema | dynamic schema for unstructured data |

  2. What kind of data is a good fit for an SQL database? SQL databases are good for complex query intensive environments, they are best fit for data that is not heirarchical.

  3. Give a real world example. SQL databases are good for heavy duty transactional type applications, so something like processing payments through a webpage.

  4. What kind of data is a good fit a NoSQL database? NoSQL databases are better for hierarchical data storage as it follows the key-value pair of storing data similar to a JSON.

  5. Give a real world example. An itemized set of data that needed to house something that involves key value pairs, like displaying a brand with a specific type of clothing.

  6. Which type of database is best for hierarchical data storage? NoSQL

  7. Which type of database is best for scalability? SQL

SQL vs NoSQL Videos

  1. What does SQL stand for? Structured Query Language

  2. What is a relational database? A relational database is a type of database that stores and provides access to data points that are related to one another.

  3. What type of structure does a relational database work with? A relational database works with tables.

  4. What is a ‘schema’? A schema is a collection of logical structures of data, or schema objects.

  5. What is a NoSQL database? NoSQL databases are non-relational databases.

  6. How does it work? NoSQL databases store data in a format other than the traditional row-column model.

  7. What is inside of a MongoDB database? MongoDB stores data in JSON-like documents which makes the database very flexible and scalable.

  8. Which is more flexible - SQL or MongoDB? and why. MongoDB is more flexible because it stores data in JSON-like documents.

  9. What is the disadvantage of a NoSQL database? The disadvantage of a NoSQL database is that it does not have the reliability functions which Relational Databases have.

Bookmark and Review