View on GitHub

reading-notes

Readings: MongoDB and Mongoose

Review the Submission Instructions for guidance on completing and submitting this assignment.

Reading

nosql vs sql

Fill in the chart below with five differences between SQL and NoSQL databases:

SQL NoSQL
RDBMS Non-relationation
Tables key-value pairs
predefined schema Dynamic Schema
vertically scalable Horizontally scalable
SQL language Language varies

What kind of data is a good fit for an SQL database?

structured data that does not use key-value pairs.

Give a real world example.

Data that is typically stored in a table can include transactional data for a business.

What kind of data is a good fit a NoSQL database?

Data that is typically stored in key-value pairs, that may not have much in common.

Give a real world example. Which type of database is best for hierarchical data storage?

Session storage is complex and often times has a dynamic structure, and is easy to put into key value pairs.

Which type of database is best for scalability?

SQL is best for vertically scaling, to get more performance you can add more CPU or RAM, but it has a ceiling.
NoSQL is horizontally scalable, and would require adding nodes, and more servers to get better performance, the data is split, but as long as it can be split, the server can be scaled.

Videos sql vs nosql (Video)

What does SQL stand for?

Structured query language

What is a relational database?

Each table has something in common, such as an ID, the two tables can be merged on that ID, its how they are “related”

What type of structure does a relational database work with?

SQL What is a ‘schema’?
its how a table will be layed out. What data will be stored in the table is listed in the Schema.

What is a NoSQL database?

NoSQL is a database that stores is data in key-value pairs to be accessed quickly with a query

How does it work?

It uses collection’s or store documents in key-value pairs

What is inside of a MongoDB database?

key-value pairs

Which is more flexible - SQL or MongoDB? and why.

MongoDB is more flexible because you can test tables, and do not need to have ids in common to join data.

What is the disadvantage of a NoSQL database?

Duplicate data can making updating data difficult, because it will need to be updated in several spots.