MySQL Forums
Forum List  »  Newbie

Re: Is it bad practice to use lists in a column of a record?
Posted by: Peter Brawley
Date: October 31, 2021 12:29PM

DDL and SQL are text. Images are usually not helpful. To preserve text formatting here, use BBCode code tags.

Re lists, we don't get to make up how a relational database works. Before we work with one, we need to familiarise ourselves with how they work, eg with a summary like

A fundamental premiss of relational databases is atomicity, one value per cell. A value is atomic if it will always be inserted and retrieved as all of itself. Relational databases depend upon this premiss. A list isn't atomic. So yes, lists in single cells are bad practice.

Is queryable text an exception to the rule of atomicity? No, a text or blob field is stored & retrieved as a unit.

Is a JSON column an exception? It's more a fudge. It does support lists, and as a fudge it pays the price---JSON queries in RDBMSs tend to perform poorly.

Options: ReplyQuote

Written By
Re: Is it bad practice to use lists in a column of a record?
October 31, 2021 12:29PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.