This is my reading notes for Code Fellows.
five differences between SQL and NoSQL databases:
SQL | NoSQL |
---|---|
relational | non-relational |
SQL databases use structured query language and have a pre-defined schema | NoSQL databases have dynamic schemas for unstructured data, and the data is stored in many ways. |
SQL databases are vertically scalable in most situations. | NoSQL databases are horizontally scalable |
1) What kind of data is a good fit for an SQL database?
If the data is highly structured and associations among the program entities are clearly defined, SQL database are the best fit.
2)Give a real world example.
For instance, if you are developing a point of sale system where you need to store customer orders and product records
3)What kind of data is a good fit a NoSQL database?
NoSQL databases are often better suited to storing and modeling structured, semi-structured, and unstructured data in one database.
4)Give a real world example.
Google Mail
5)Which type of database is best for hierarchical data storage?
NoSQL database
6)Which type of database is best for scalability?
NoSQL database
1)What does SQL stand for?
Structured Query Language
2)What is a relational database?
A relational database is a type of database that stores and provides access to data points that are related to one another.
3)What type of structure does a relational database work with?
Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables.
4)What is a ‘schema’?
A database schema represents the logical configuration of all or part of a relational database. It can exist both as a visual representation and as a set of formulas known as integrity constraints that govern a database.
5)What is a NoSQL database?
NoSQL is an approach to database management that can accommodate a wide variety of data models, including key-value, document, columnar and graph formats. A NoSQL database generally means that it is non-relational, distributed, flexible and scalable.
6)How does it work?
NoSQL is an approach to databases that represents a shift away from traditional relational database management systems (RDBMS). Relational databases rely on tables, columns, rows, or schemas to organize and retrieve data. In contrast, NoSQL databases do not rely on these structures and use more flexible data models.
7)What is inside of a Mongo database?
In MongoDB, a database contains the collections of documents. One can create multiple databases on the MongoDB server.
8)Which is more flexible - SQL or MongoDB? and why.
MongoDB is more flexible. Beacause While data is easily accessible and classifiable with a SQL Database, there are certain limitations to what can be stored and processed together. MongoDB uses a more complex approach to data storage while allowing complex processing as well. The data representation indicates that NoSQL doesn’t support any relations between different data types.
9)What is the disadvantage of a NoSQL database?
Less Support - Every business should be reassured that in case a key function in their database system fails, they will have unlimited competent support any time.
Not Mature - Rational models have been around for some time now compared to NoSQL models and as a result they have grown to be more functional and stable systems over the years.