3 ms·
Yes and no. When you describe '...split it into a list of elements by commas...' style problems you are describing un-normalised data. SQL is explicitly designe
by roenxi 6y ago
Yes and no. When you describe '...split it into a list of elements by commas...' style problems you are describing un-normalised data. SQL is explicitly designed to deal with normalised data, so it isn't a fault if it struggles.
NULL is unpleasant to deal with, but it is unavoidable - sometimes the value of data isn't known and the database has to represent that somehow.
But I'm with you on getting out of SQL quickly as the code gets longer. It is a bad language and it is better to be working in something else.
- zozbot234 6y agoPostgreSQL supports arrays as a first-class feature. There's very little issue with "unnormalized" data when the data will never be used as a lookup key within the database.
- roenxi 6y agoSQL was designed somewhat before PostgreSQL decided to support arrays. It is a terrible, terrible language for dealing with non-normal data. If you are doing string parsing in SQL, mistakes were made.