News for hackers. Stuff that matters.
Re:Problems with Oracle SQL by myohmy on Friday September 10, 2021 @01:40PM (#28484823)
Honestly that's bad db design anyways. If empty string is a valid value then you don't want NOT NULL anyways. This is a table structure constraint, not a variable declaration. NOT EMPTY would have been a better syntax imo but that's a whole can of worms.
Re:Problems with Oracle SQL by MrStonedOne on Friday September 10, 2021 @03:17PM (#28485888)
Empty string means "we know its blank" null means "we don't know".

When it comes to datatyping, (the whole point of data types in a db), null is its own datatype, so forcing the allowance of nulls to get blank strings is kinda stupid and only causes software/application level bugs.

Re:Problems with Oracle SQL by jhgb on Friday September 10, 2021 @04:27PM (#28486508)
An empty string is a perfectly valid neutral element of the free monoid over the alphabet in question. It's also not a NULL value for this reason. If a NOT NULL column of strings allows for all strings except for a very important one, then that's a very weirdly special-cased design of the RDBMS.