When to choose No-SQL vs SQL?
Deepak Maheshwari
Principal Solution Architect | GenAI Architect | Cloud Business Leader | Trusted Advisor | Engagement Manager | Blogger | Angel Investor at Capgemini
These days, with the rise of internet and cloud technologies — and the proliferation of data that went them — made “Data” as one of the key aspects of any organization’s success. Data can bring a lot of value to any organization. As the world is moving towards data-driven decisions and new data is being generated at skyrocketing speed which directly poses challenges in terms of storage. Also, these days, data storage is not all about storing records but also includes storing unstructured data, payload, etc. AI/ML and Analytics are bringing a great deal of automation and insights for business, so it is also important to where and how we are storing data.
Additionally, for anyone trying to store brand new data or migrate existing on-prem data to the cloud there is always a question — should I choose SQL or No-SQL database? This article will help in bringing clarification to make the right decision between SQL vs No-SQL databases.
If we look at history then SQL databases have been a proven option since the 1970s. They are made up of highly structured tables, consisting of rows and columns, related to one other through common attributes. Every column is required to have a value for its corresponding row.
NoSQL (“not only SQL” or “non-SQL”) databases came along later to break the relational table with the ability to store and access all data types, structured and unstructured, together. They’re extremely flexible and easy for developers to work with and modify.
What are the different parameters should anyone consider when deciding between SQL vs No-SQL?
At a high level, SQL databases use SQL (Structured Query Language). NoSQL databases use JSON (JavaScript Object Notation), XML, YAML, or binary schema, facilitating unstructured data. SQL has a fixed-defined schema, while NoSQL databases are more flexible. Let’s understand specifics of when to use which one —
When to use SQL Database?
Definition for ACID (A- Atomicity, C- Consitency, I- Isolation and D- Duration)
领英推荐
Atomicity:?Any transaction that updates multiple rows is treated as a single?unit. A successful transaction performs?all?updates. A failed transaction performs?none?of the updates, i.e., the database is left unchanged.
Consistency:?Every transaction brings the database from one valid state to another. It guarantees to maintain all database invariants and constraints.
Isolation:?Concurrent execution of multiple transactions leaves the database in the same state as if the transactions were executed sequentially.
Durability:?Committed transactions are permanent, and survive even a system crash.
When to use No-SQL Database?
Use case examples:
Conclusion:
Selecting the right data store is crucial, if the decision is made right then it can simplify the application scaling and availability otherwise a wrong choice can be friction and may result in performance concerns too. We should consider the data type and workload requirements to make a selection and at the same time, we are not limited to one database type over the other. Many organizations have implemented both SQL and No-SQL databases to meet their different requirements, making it possible to get the best of both worlds. I hope this article will help you to make the right decision between SQL and No-SQL, good luck with whichever you select based on the use case.
Principal Solution Architect | GenAI Architect | Cloud Business Leader | Trusted Advisor | Engagement Manager | Blogger | Angel Investor at Capgemini
2 年Here is the link for medium: https://medium.com/@maheshwari-bittu/when-to-choose-no-sql-vs-sql-cc48b2c59661