shlogg · Early preview
Franck Pachot @franckpachot

Handling Nulls In NoSQL & RDBMS Databases Compared

Handling nulls in various databases: MongoDB treats null as absent, SQL uses 3-value logic, PostgreSQL & YugabyteDB follow SQL standard, Oracle & SQL Server have workarounds, DynamoDB considers null as empty value.

NoSQL behavior: MongoDB
SQL behavior: PostgreSQL and YugabyteDB
A mix of both: Oracle Database

You can create a unique index explicitly or implicitly with a unique constraint to ensure that a group of columns has no duplicates. 
However, how do you handle columns that are NULL or have no value? Is the lack of a value a simple indicator that you don't want to duplicate, or should it be treated as unknown and potentially equivalent to any value, thus not violating the unique constraint? 
I will consider the following three scenarios:

NoSQL absence of value in a document, like in MongoDB
SQL st...