
Choosing Between a JSON Column and a Document Database
When a JSON column in PostgreSQL, MySQL or SQLite is enough, and when a document database such as MongoDB earns its place, with measured numbers.
Everything you need to level up your coding skills.

When a JSON column in PostgreSQL, MySQL or SQLite is enough, and when a document database such as MongoDB earns its place, with measured numbers.

Store JSON in DynamoDB map and list attributes, update nested paths in place and avoid float, reserved-word and size errors, tested on DynamoDB Local.

Store JSON in ClickHouse as a String with JSONExtract functions or as the native JSON type, with size and speed measured on 200,000 documents.

Turn a JSON array into rows in BigQuery with UNNEST and JSON_QUERY_ARRAY or JSON_VALUE_ARRAY, with positions, empty arrays, nesting and filters.

Read JSON in BigQuery with JSON_VALUE, JSON_QUERY, field access and typed converters such as INT64(), with the null rules, SAFE prefix and lax conversion.

Use FLATTEN in Snowflake to turn VARIANT arrays and objects into rows, chain it for nested levels, keep empty parents with OUTER, and read its output columns.

Read JSON stored in a Snowflake VARIANT column with colon and bracket paths, cast the results, and handle JSON null, missing keys and case sensitivity.

Convert Excel workbooks to CSV, JSON, XML and YAML without losing data: choose a format, read types, dates and headers, then verify with counts and schemas.

How Oracle's JSON_TABLE projects a JSON document into relational rows and columns, with row paths, nested paths, ordinality, ON ERROR and ON EMPTY clauses.

Turn SQL Server rows into JSON with FOR JSON PATH and AUTO, nest child rows, control nulls and wrappers, and avoid the double-encoding trap with JSON_QUERY.

How OPENJSON turns a JSON array or object into rows in SQL Server, with the default key, value and type columns, the WITH clause, nested arrays and the traps.

How SQL Server, Oracle, Snowflake and BigQuery store, read, unpack, build and index JSON, side by side, with the null, type and size traps in each.
We send one email when a new article is published. No spam.