JSONB vs. BSON: Tracing PostgreSQL and MongoDB Wire Protocols
There is an essential difference between MongoDB’s BSON and PostgreSQL’s JSONB. Both are binary JSON formats, but they serve different roles. JSONB is purely an internal storage format for JSON data in...
View ArticleData Locality vs. Independence: Which Should Your Database Prioritize?
When your application needs several pieces of data at once, the fastest approach is to read them from a single location in a single call. In a document database, developers can decide what is stored...
View ArticleMongoDB High Availability: Replica Set in a Docker Lab
Originally published on: https://dev.to/franckpachot/mongodb-high-availability-replicaset-in-a-docker-lab-4jlcMongoDB guarantees consistent and durable write operations through write-ahead logging,...
View ArticleUnique Index on NULL Values in SQL & NoSQL databases — an example
Unique Index on NULL Values in SQL & NoSQL databases — an examplehttps://dev.to/franckpachot/unique-index-on-null-values-in-sql-nosql-34ejYou can create a unique index explicitly or implicitly with...
View ArticleThe Log Is (not) The Database
The Log Is (not) The DatabaseThere is a common saying “The Log Is The Database”, to explain some database innovations in cloud-native environments. For example, Kafka stores the events that modify...
View ArticleOracle Sharding methods compared to YugabyteDB
Oracle has long been a leader in partitioning, distributing, and replicating databases. They offer shared-storage RAC for High Availability and Log-Streaming Data Guard for Disaster Recovery. However,...
View ArticleIsolation Levels — part XII: To go further
Isolation Levels — part XII: To go furtherSQL isolation levels are typically characterized by their effects, such as anomalies or phenomena, or by their implementation, such as lock duration. However,...
View ArticleIsolation Levels — part XI: Read Uncommitted
Isolation Levels — part XI: Read UncommittedThe Read Uncommitted isolation level is designed to prevent dirty reads, which are changes made by other transactions that have not yet been committed. Such...
View ArticleIsolation Levels — part X: Non-Transactional Writes
Isolation Levels — part X: Non-Transactional WritesPrevious isolation levels described in this series were focused on ensuring consistency of read operations and maintaining the read state from the...
View ArticleIsolation Levels — part IX: Read Committed
Isolation Levels — part IX: Read CommittedThe lowest level of MVCC databases is Read Committed, which is commonly used as the default setting. However, it is also possibly the least understood and the...
View ArticleThe Most Annoying Optimizer Fail in Postgres ✅ Best index solved it.
This blog post is based on a question asked on the PostgreSQL Slack channel (you can join via this invite link: https://pgtreats.info/slack-invite). The question was related to a bad index chosen by...
View ArticleIsolation Levels — part VIII: Cursor Stability
Isolation Levels — part VIII: Cursor StabilityCursor Stability is not defined in SQL Standard, and I’ve seen it only in DB2. The Cursor Stability isolation level prevents lost updates. A lost update...
View ArticleIsolation Levels — part VII: Repeatable Read
Isolation Levels — part VII: Repeatable ReadThe Repeatable Read isolation level allows changes on what you have scanned, except for rows returned after all filtering conditions. This means that it will...
View ArticleIsolation Levels — part VI: Snapshot Isolation
Isolation Levels — part VI: Snapshot IsolationIn databases that use multi-version concurrency control (MVCC), the Snapshot Isolation (SI) technique is used as the basis for read-only and serializable...
View ArticleIsolation Levels — part V: Read Only
Isolation Levels — part V: Read OnlyAnomaly detection can be pretty complex because the database is unaware of all the reads and writes that are part of a transaction until it is committed. The...
View ArticleIsolation Levels — part IV: Serializable
Isolation Levels — part IV: SerializableWith the main concepts in mind, we can outline the behavior of each isolation level and assess its impact on anomalies, performance, and the need for additional...
View ArticleTriggers in SQL database to extend its declarative data logic (but not...
Database triggers have a bad reputation because, like any powerful feature, they can be abused. However, when used appropriately, triggers can be useful for adding additional data logic without...
View ArticleMonolithic vs. Distributed SQL
When a new technology emerges, we need to name the previous one, which had no name when it was the only option available. SQL databases, or RDBMS (Relational Database Management Systems as they were...
View ArticleACID properties explained to NoSQL vendors
Some NoSQL vendors have introduced transactional behavior and now claim ACID properties in their marketing slides. I’m pleased to see them using SQL terms after proclaiming the end of relational...
View ArticleGenerate SQL Script in PostgreSQL
PostgreSQL Tips and TricksGenerate SQL from SQL in PostgreSQL
View Article