Mongo and Mongoose
SQL and NoSQL
Fill in the chart below with five differences between SQL and NoSQL databases:
| SQL | NoSQL |
|-|-|
| Data used schema | Schema-less |
| Relations | No (or few) relations |
| Data is distributed across multiple tables | Data is merged or nested in a few collections |
| Horizontal scaling is difficult/impossible | Both horizontal and vertical scaling is possible |
| Limitations for read and write queries per second | Great for performance for mass (simple) read and and write requests |
- What kind of data is a good fit for an SQL database?
- complex query intensive environment
- Give a real world example.
- What kind of data is a good fit a NoSQL database?
- anything requiring flexibility and/or scale
- Give a real world example.
- Which type of database is best for hierarchical data storage?
- NoSQL database fits better for the hierarchical data storage as it follows the key-value pair way of storing data similar to JSON data. NoSQL database are highly preferred for large data set (i.e for big data). Hbase is an example for this purpose
- Which type of database is best for scalability?
- In most typical situations, SQL databases are vertically scalable. You can manage increasing load by increasing the CPU, RAM, SSD, etc, on a single server. On the other hand, NoSQL databases are horizontally scalable. You can just add few more servers easily in your NoSQL database infrastructure to handle the large traffic
Part 2
- What does SQL stand for?
- Structured Query Language
- What is a relational database?
- tables of data tied together
Relational Databases are called "Relational" because the whole database is based on Relational Algebra that Edgar Codd created. That algebra provides operations like projection and join. Relation here means a set of tuples - Some guy on youtube
- What type of structure does a relational database work with?
- What is a ‘schema’?
- Fields(columns) of data in a table
- the way data is organized, must be normalized
- What is a NoSQL database?
- A DB not using SQL structure
- How does it work?
- Data collections
- collections contain documents
- does not require schema
- What is inside of a Mongo database?
- Which is more flexible - SQL or MongoDB? and why.
- MongoDB
- allows for storage of different formats of data
- not required to be relational
- allows for horizontal scaling
- What is the disadvantage of a NoSQL database?
- duplicate data may be requiem
Things I Want To Know More About
References