patternMajor
If a person's name is Null then how would it break the database?
Viewed 0 times
personthenulldatabasewouldnamethenhowbreak
Problem
I was reading this article on BBC. It tells a story of a person named Jenifer Null and how she faces day to day problems while using online databases like booking plane tickets, net banking etc.
I am not well versed in databases and I do not use it very often. When I made a website for learning, the server side form validation used regular expressions. From what I remember it would happily accept the name "Null". I have not tried it though.
Could someone explain the technicalities when this situation would occur? Is the form validation just doing a
I am not well versed in databases and I do not use it very often. When I made a website for learning, the server side form validation used regular expressions. From what I remember it would happily accept the name "Null". I have not tried it though.
Could someone explain the technicalities when this situation would occur? Is the form validation just doing a
string == NULL or something? Even so I do not think NULL is same as "NULL".Solution
I have seen database interfaces (e.g. framework libraries) that return 'null' as a string for null columns. I believe there was a flag that would turn this on or off for debugging. This flag allows developers to easily determine if the empty field was a result of a null value or an empty value. This is a bad setting, especially in production, and would explain the issues explained in the article.
The reverse processing of converting 'null' to a null value should generate an application error for a name field. I would expect this to be rather quickly resolved.
The reverse processing of converting 'null' to a null value should generate an application error for a name field. I would expect this to be rather quickly resolved.
Context
StackExchange Database Administrators Q#135645, answer score: 43
Revisions (0)
No revisions yet.