View on GitHub

reading-notes

Daily Reading 11

MongoDB and Mongoose

nosql vs sql

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

SQL: 1 Table based 2 does not support dynamic and unstructured data 3 Has a strict standard schema that it follows 4 Vertically scalable. NoSQL: 1 Document/keyvalue pairs/wide-column stores based 2 Supports unstructured data 3 has a loose schema that can dynamically change 4 Horizontally scalable.

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

Transactional information, in large amounts.

Give a real world example.

A full database of all bank members’ transactions for the month.

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

Submitted forms and potentially arbitrarily formatted documents.

Give a real world example

An archive of a company’s RMA warranty requests.

Which type of database is best for hierarchical data storage?

NoSQL

Which type of database is best for scalability?

SQL for vertical scaling. NoSQL for horizontal scaling.

sql vs nosql (video)

What does SQL stand for?

Structured Query Language

What is a relational database?

A database where one table has information, a second table has other information, and an index id pair one from each in a third table, that links table one to table two.

What type of structure does a relational database work with?

One to One, One to Many, or Many to Many.

What is a ‘schema’?

“A list of logical structures of data.” Kind of like an array of objects. A rigid schema allows you to be sure that you will find a result from a search.

What is a NoSQL database?

A non schema limited database, like MongoDB uses.

How does it work?

MongoDB keeps its data within collections of documents instead of the typical tables and rows of data that SQL does.

What is inside of a MongoDB database?

Usually a few nested collections of data. Key value pairs.

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

MongoDB

What is the disadvantage of a NoSQL database?

You cannot be certain that a specific entry will be filled, and relational data needs to be filled manually. Decent chance of duplicate information.

Back To Main Page.