[V4RB] difference between string & varchar

Pedro fp lists at pedro.Net.au
Tue Oct 26 19:05:51 CDT 2004


On 26/10/2004, at 4:53 PM, Peter De Berdt wrote:

>> I have never quite figured what, for practical purposes, the  
>> difference between a string field & a varchar field is. Even from  
>> what I read in the V4Rb docs they appear to be pretty much the same  
>> except in name. So could someone please explain the difference for me  
>> & offer some guide as to when I should choose one over the other?
>
> A VString field takes up the space of the max length you define, no  
> matter how many characters are actually used. Varchar only uses the  
> space it needs (variable character length), hence the name. Ruslan  
> will probably go more technical on this, but this is the easy  
> explanation ;-)

That is as I thought but it still leaves me unsure about why I'd choose  
one over the other. I take it VVarChar would result in a smaller data  
file, particularly where the string data is highly variable in length  
with a lot of it being a lot smaller than the maximum length, is a  
VString faster?

Cheers, Pedro :-)

Web: <http://www.pedro.net.au>                    PGP Key ID: 387CD96F
Instant messaging...  AIM: bandidoOfOz  ICQ: 27671678  Jabber: pedrofp
                       MSN: mail at pedro.net.au           Yahoo: pedro_fp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
~~~
"I think we need more of the wordless in our lives. We need more  
stillness,
more of a sense of wonder, a feeling for the mystery of life. We need  
more
love, more silence, more deep listening, more deep giving."
                                Ben Okri in 'A Way of Being Free', 1997,  
p90



More information about the Valentina mailing list