NoSQL databases & Comparisons Flashcards
When should a non-relational database be implemented? (6 in total)
The data stored has a dynamic schema
The data is unstructured and is comprised of multiple unknown data types
Data storage needs to be performed quickly
When simple queries are often made, as making simple queries is faster on NoSQL databases
An extremely large amount of data needs to be stored
All the data about a particular object needs to be easily accessed
What are the differences between a relational database and non-relational database? (2 of them)
SQL: has a predefined schema
NoSQL: has no predefined schema, making it dynamic
SQL: Data is stored in tables with a fixed type of data in each field
NoSQL: Data is stored in collections of documents with no fixed data types
When should a relational database be implemented?
The data stored has a fixed schema
The data stored is structured and is comprised of known data types
Complex and varied queries will be frequently performed
A high number of simultaneous transactions will be performed
What are the benefits of NoSQL Databases Over SQL Databases? (3 in total)
NoSQL databases can store unstructured data while SQL databases cannot. SQL databases have predefined schemas which are difficult to change. NoSQL stores data in documents which do not need to be of the same format, allowing data with new fieldnames to be added quickly.
NoSQL databases generally more reliable than SQL databases.
More usually cost-effective to store the same amount of data in a NoSQL database as compared to SQL database.
How are NoSQL databases more cost effective than SQL databases?
NoSQL databases support hierarchical data storage. Hierarchical data storage is the process of moving less frequently used data to cheaper, but slower, storage devices
NoSQL databases are horizontally scalable while SQL databases are usually vertically scalable
Horizontal scaling refers to improving the performance of a database by adding more servers
Vertical scaling refers to improving the performance of a database by upgrading the existing server with
better components
This is generally more cost-effective as compared to improving components as mass-produced average-performance computers are easily available at low prices while high performance components can be expensive.
How are NoSQL databases are generally more reliable than SQL databases?
SQL databases are stored on one server, thus database will be unavailable if the server fails. NoSQL databases are stored on multiple servers so that if one server fails, the other servers can continue to provide access to the database.
Why is normalised data advantageous to redundant data? (2 reasons)
- Simple to enforce data integrity/Changes to data only need to be made in a single place
- Less space taken up by data.