"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

December 23, 2019

Difference between SQL and NOSQL Systems

Reposting from my two-year-old Quora answer

The Key differences between them lies in the understanding CAP theorem
  • Consistency
  • Availability
  • Partition Tolerance
In layman terms. SQL systems ex-RDBMS will adhere ACID properties (Atomicity, Consistency, Isolation, Durability).
  • The datatypes, schema are predefined, You cannot store non-matching datatypes
  • To avoid dirty data, systems enforce isolation levels that govern only committed data is read (Consistency)
  • Only latest records are available, records at that point in time are not available
  • Banking Systems, ordering systems where data needs to consistent will be mostly SQL based systems where consistency is important
No-SQL systems (Not Only SQL)
  • The schema is not tightly governed, its flexible you can store different datatypes in same columns
  • These may be geographically distributed where data may be synced and eventually be consistent end of day not realtime
  • They also support point in time data, data values at a point in time can also be looked up
  • Where there is no requirement for consistency we can achieve other 2 Availability and partition tolerance
  • Since some of the ACID properties are compromised you will have high availability of this systems
It is more to do with business need to decided SQL or SQL based storage.

Happy Learning!!!

No comments: