What are our design goals around distinguishing between NULL
and empty string
#774
-
Broadly speaking, in terms of our overall product goals, if a column has a string type, do we plan to distinguish between These points seem to imply that we're presenting null and empty string as the the same, conceptually:
However, I would assume we'd want to expose the users to the distinction between null and empty string, so that's why I'm asking -- because I found the above surprising. I don't feel too strongly about this. Not trying to debate it here. Just seeking clarity. @kgodey @ghislaineguerin @pavish @mathemancer (tagged because I'm not sure if you get notified of new discussion topics -- side note this discussion feature is new to me, but I really like it 🙂 ) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Apparently there's no way (that I can see) to just comment or reply. Just "answer". But, consider this more of a comment. I didn't read closely enough when looking through the final spec before; oops. I don't think treating empty strings and nulls the same is a good idea. They behave differently on the DB:
Note that Uniqueness constraints involve disallowing equalities. Thus, because |
Beta Was this translation helpful? Give feedback.
-
Just in can we don't already have a decision, I'll offer my opinion on what would make the best design goal: We should treat NULL and empty string as distinct values and concepts in all cases. Adopting that design goal might warrant making some changes to our existing designs, but personally I think it would behoove our product and line up well with our principle of "not hiding database concepts". If the above goal were true, I would suggest changing the "Allow Empty" UI language to "Allow NULL". But that's just an example. I see those small decisions as beyond the scope of this thread. For this thread, I'm seeking clarity/agreement on the overarching goal/strategy that we can then use to guide those smaller decisions going forward. |
Beta Was this translation helpful? Give feedback.
Just in can we don't already have a decision, I'll offer my opinion on what would make the best design goal:
We should treat NULL and empty string as distinct values and concepts in all cases.
Adopting that design goal might warrant making some changes to our existing designs, but personally I think it would behoove our product and line up well with our principle of "not hiding database concepts". If the above goal were true, I would suggest changing the "Allow Empty" UI language to "Allow NULL". But that's just an example. I see those small decisions as beyond the scope of this thread. For this thread, I'm seeking clarity/agreement on the overarching goal/strategy that we can then use to…