MongoDB and Mongoose
SQL vs NoSQL
Fill in the chart below with five differences between SQL and NoSQL databases:
SQL |
NoSQL |
Relational Databases |
Non-Relational Databases |
Table-Based Databases |
Document-Based Databases |
Relational Databases |
Non-Relational Databases |
Pre-defined Schema |
Dynamic Schema for Unstructured Data |
Vertically Scalable |
Horizontally Scalable |
Good For Complex Queries |
Not Good For Complex Queries |
- What kind of data is a good fit for an SQL database?
- Give a real world example.
- What kind of data is a good fit a NoSQL database?
- Hierarchical data storage as it follows the key-value pair way of storing data similar to JSON data.
- Give a real world example.
- Which type of database is best for hierarchical data storage?
- Which type of database is best for scalability?
- SQL - vertically scalable
- NoSQL - horizontally scalable
More SQL vs NoSQL
- What does SQL stand for?
- Structured Query Language
- What is a relational database?
- We have a database which works with certain assumptions and supports the Structured Query Language.
- What type of structure does a relational database work with?
- What is a ‘schema’?
- The “blueprint” of a database which describes how the data may relate to other tables or other data models.
- What is a NoSQL database?
- How does it work?
- Has collections rather than relations that may have different structures and schemas.
- What is inside of a MongoDB database?
- Collections and documents
- Which is more flexible - SQL or MongoDB? and why.
- MongoDB, because SQL is much more rigid with strict schemas, while MongoDB is very flexible.
- What is the disadvantage of a NoSQL database?
- Relational data must be entered manually and may have duplicate data.