Hello,
I'm in the middle of a hibernate project and I wanted some opinions from the group as to the best way to handle an issue with NULL values.
We have a table with 10 varchar columns and one of the columns can sometimes have a NULL value. Is it better to actually use a NULL value or instead use some agreed to string value that will mean null? For example the empty string, or "*" or "NULL" or any string that won't conflict with real data. Obviously from the DBA's point of view we should use an actual NULL value. Saves space, and is a more correct representation of the data.
But, from my Java program with Hibernate's perspective I have to do a lot of extra work for the null case. If I could just use the empty string to represent null I could leave the code as is... so is it worth the extra work? What does it really buy me?
Thanks,
-Andrew
http://www.engineering-utopia.com/