Re:SQL is 43 years old – Here’s why we still use it today
by MarHoff on Friday May 05, 2017 @06:11AM
(#14272317)
I think you are mistaken, even if implementation will vary you can have the same behavior (However I won't ever try in production because jsonb base FK is a pretty scary concept IMHO)
However on a solution I've implemented on PostgreSQL I expand jsonb as regular field in a view and made that view editable via trigger. This way users can update jsonb_field without being aware of because they edit it through a view as if they are normal fields.
On those "generated columns" you can create indexes, reference other tables (foreign keys) or be referenced by other tables (foreign keys).
MySQL has a binary JSON data type (like most databases) and also expressions to extract data from those JSON fields.
MySQL has a lot of disadvantages vs PostgreSQL, but having foreign keys on elements within JSON (via this mechanism) is a thing MySQL can do that PostgreSQL can't :) (Unless I'm mistaken?)