From 9b3dd91d6709d2bdd55489eeb3959857c4a0a253 Mon Sep 17 00:00:00 2001 From: Ebenezer Don Date: Thu, 31 Oct 2024 12:17:44 +0000 Subject: [PATCH] add table locking info --- src/routes/blog/post/sql-vs-nosql/+page.markdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/blog/post/sql-vs-nosql/+page.markdoc b/src/routes/blog/post/sql-vs-nosql/+page.markdoc index 16fb774d19..6bfe1e86ed 100644 --- a/src/routes/blog/post/sql-vs-nosql/+page.markdoc +++ b/src/routes/blog/post/sql-vs-nosql/+page.markdoc @@ -60,6 +60,8 @@ One major benefit of NoSQL databases is their ability to work with varied data m Instead of following SQL's strict ACID properties, many NoSQL databases use **BASE principles** (Basically Available, Soft state, Eventually consistent). BASE principles allow data to be handled more flexibly, sacrificing strict consistency for better availability and response time. In distributed NoSQL systems, **eventual consistency** means that data will sync over time across all servers, even if there are temporary differences. This approach works well in applications where availability matters more than real-time data accuracy. +In contrast, SQL databases maintain a structured schema, which can provide clarity and consistency over time. While adding or altering attributes in SQL databases typically involves table locking, meaning affected tables may experience temporary downtime during updates, this structured approach supports strict data validation, which ensures consistent data across the database. + ## **Scalability and high availability in NoSQL** NoSQL databases are built for **horizontal scaling**, meaning they can distribute data across multiple servers as needed. This model lets NoSQL databases handle large amounts of data by balancing the load across different servers. Partitioning and replication are typically built into NoSQL systems, which makes it easier to manage larger amounts of data while keeping it accessible even if some servers fail.