G
Greg
I've come across a few statements that conflict eachother and I'm wondering
what is correct.
I cam across a web-site (I do not remember the site right now), that
explained each data type. For the NVarChar data type it suggested that you
never store a NULL value. It said, if you have a NULL value, you should
insert some common text instead, such as "N/A or TBD", etc. It said, stored
the text "N/A" would take up a lot less space than a NULL. This doesn't make
much sense to me.
Now, I'm reading the Wrox Beginning Visual Basic 2005 Databases book. It
states if you come across a situation where you might be inserting an empty
string or a zero length string, you should be sure to convert it to a NULL
value instead to save space. Now, this make sense to me.
The only thing I'm not sure about, is whether these statements were
referring to the NVarChar or VarChar data types.
So, in the case of these two types of data types, is there every a situation
where it would be better not to have a NULL value in the field?
And, finally, regarding the differences of NVarChar and VarChar.
In regards to space requirements, the NVarChar will typcially require up to
double the storage space to store the same text as a VarChar data type? Plus,
if I understand it correctly, if my application is targeted to only be
distributed within the United States, using the VarChar type is OK, where if
I am planning on distributing my application to other countries, I should use
the NVarChar data types to accomodate International Character Sets?
Thanks,
Greg
what is correct.
I cam across a web-site (I do not remember the site right now), that
explained each data type. For the NVarChar data type it suggested that you
never store a NULL value. It said, if you have a NULL value, you should
insert some common text instead, such as "N/A or TBD", etc. It said, stored
the text "N/A" would take up a lot less space than a NULL. This doesn't make
much sense to me.
Now, I'm reading the Wrox Beginning Visual Basic 2005 Databases book. It
states if you come across a situation where you might be inserting an empty
string or a zero length string, you should be sure to convert it to a NULL
value instead to save space. Now, this make sense to me.
The only thing I'm not sure about, is whether these statements were
referring to the NVarChar or VarChar data types.
So, in the case of these two types of data types, is there every a situation
where it would be better not to have a NULL value in the field?
And, finally, regarding the differences of NVarChar and VarChar.
In regards to space requirements, the NVarChar will typcially require up to
double the storage space to store the same text as a VarChar data type? Plus,
if I understand it correctly, if my application is targeted to only be
distributed within the United States, using the VarChar type is OK, where if
I am planning on distributing my application to other countries, I should use
the NVarChar data types to accomodate International Character Sets?
Thanks,
Greg