reading-notes

Class 11 Notes

SQL NoSQL
Relational Non-Reational
Table Based Document Based
Predifined Schemas Dynamic Schemas
Vertically Scalable Horizontally Scalable
Used for defining and manipulating data Used for collection of documents

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

Structured Data

Give a real world example.

Retail where there is customers, products, orders, inventory.

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

Unstructured where the data will need lots of flexibility.

Give a real world example.

Social media where each user may have wildy different data and content

Which type of database is best for hierarchical data storage?

SQL

Which type of database is best for scalability?

NoSQL

What does SQL stand for?

Structured Query Leanguage

What is a relational database?

It is basically a data base that has data that is related to other data within it. An example would be having orders, products that can be ordered and users that placed an order.

What type of structure does a relational database work with?

Each category is split into tables and each table has a number of fields (columns) and then each piece of data creates a new record that fills all fields.

What is a ‘schema’?

its almost like categories for the data

What is a NoSQL database?

a database that has no relations for the most part. You put all the information into a collection

How does it work?

It works like json objects

What is inside of a MongoDB database?

a document which is, much like a json object.

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

MongoDB it has less constraints that data needs to fit within. you can also horizontally scale and vertically scale easier.

What is the disadvantage of a NoSQL database?

It can be more difficult to keep consitent data. Some piece may have lots of inforamtion and some may not. Also if user data changes often it can be a longer process.