SQL database-features
SQL- Structured Query Language is a table based structure.
SQL follows the ACID properties, is explained as given below:
- Atomicity – The entire transaction takes place at once or doesn’t happen at all
- consistency – The database must be consistent before and after transaction
- Isolation – Multiple transaction occur independently without interference
- Durability – The changes of a successfull transaction occurs even if the system failure occurs
SQL is developed in the 1970s with a focus on reducing data duplication as storage was much more costly than developer time. SQL databases tend to have rigid, complex, tabular schemas and typically require expensive vertical scaling.
Examples for databases that comes under the category SQL are MySql & PostgreSQL.
NOSQL Features
NOSQL – Not Only Structured Query LanguageThe NoSQL database follows the Brewers CAP theorem (Consistency, Availability and Partition tolerance).
- Consistency – the nodes will have the same copies of a replicated data item visible for various transactions
- Availability – each read or write request for a data item will either be processed successfully or will receive a message that the operation cannot be completed.
- Partition tolerant – the system continues to function and upholds its consistency guarantees in spite of network partitions. Network partitions are a fact of life.
In CAP, the term consistency refers to the consistency of the values in different copies of the same data item in a replicated distributed system.
In ACID, it refers to the fact that a transaction will not violate the integrity constraints specified on the database schema.
Examples for databases that comes under the category NoSQL are MongoDB and redis
NoSQL (“non SQL” or “not only SQL”) databases were developed in the late 2000s with a focus on scaling, fast queries, allowing for frequent application changes, and making programming simpler for developers.
One of the very strong point in NoSQL is its scalability
- Capability of a system to handle growing amount of data in the same elapsed time
- Availability and ability of the DBMS administration like schema changes and servicing like upgrades and maintenance without impacting applications and end user accessibility
- can be changed to adapt to changing workloads without impacting its accessibility, thereby assuring continuing availability even as modifications are made.
- More specifically a scalable system can react to evolving needs with adjustable resources to serve a changing workload without requiring downtime.