News for hackers. Stuff that matters.
Re:Django 3.1 by alanfranz on Tuesday August 04, 2020 @06:45AM (#24048606)
Typical use case: There are a number of required fields that your app won't work without. Those should be columns, probably non-nullable columns.

Then there're a bunch of optional fields. Traditionally, a number of nullable cols would be created. But they're ultimately messy (need to null check every accesses) and unneeded since you can replace them with a single json item. Keys are always optional, so you always need to check for presence or absence, and modern dbs support json natively in many clauses.

Re:Django 3.1 by StavrosK on Tuesday August 04, 2020 @06:57AM (#24048667)
Fields are messy because you have to check for nulls, yet JSON keys aren't messy because you have to check for nulls?
Re:Django 3.1 by alanfranz on Saturday August 08, 2020 @03:02AM (#24089672)
All json keys are optional, so you ALWAYS need to check for their presence or absence. Mess exists when some key is nullable and some isn't. Checking for nullability on a key that can never be null isn't extremely elegant.
Re:Django 3.1 by StavrosK on Saturday August 08, 2020 @06:23AM (#24090503)
Why is that a mess? I don't see the difference.