reading-notes

Reading notes for Code Fellows Courses

View project on GitHub

Notes on Mongo and Mongoose

nosql vs sql

SQL NoSQL
Relational Databases (RDBMS) Non-relational (or distributed) database
predefined scheme dynamic schema for unstructured data
vertically scalable horizontally scalable
uses structure query language to manipulate data uses varied, unstructured query language to collect documents
table-based document-based, key-value pairs, graph, or wide-column stores
  • What kind of data is a good fit for an SQL database?

structured data (numeric data, for instance)

  • Give a real world example.

credit card numbers

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

unstructured data (it can come in a variety of formats)

  • Give a real world example.

digital media, such as pictures or video

  • Which type of database is best for hierarchical data storage?

NoSQL because it follows key-value pair method for data storage (like JSON).

  • Which type of database is best for scalability?

While they are both scalable, there are a lot more resources available to support SQL scalability than there are for NoSQL scalability.

Video on SQL vs NoSQL

  • What does SQL stand for?

Structured Query Language

  • What is a relational database?

Database that works with certain assumptions.

  • What type of structure does a relational database work with?

logical data structures

  • What is a ‘schema’?

A schema is a list of logical data structures.

  • What is a NoSQL database?

A database that is meant for document collection (does not organize through relational table).

  • How does it work?

Uses documents (similar to JSON) that have varying schema.

  • What is inside of a Mongo database?

BSON data.

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

MongoDB is more flexible since it does not rely on relations or schema.

  • What is the disadvantage of a NoSQL database?

Without making adjustments you can end up with data duplicaiton.

Things I want to know more about

I’m interested in knowing which kind of database I’m more often going to be working with in the professional world, or if that really varies by industry/career.