[V4RB] more questions
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Jan 30 16:29:02 CST 2003
on 1/30/03 3:44 PM, Pedro fp at lists at pedro.net.au wrote:
>>> Can the MaxLength of VString &/or VVarChar fields be changed at
>>> runtime?
>>
>> Yes, you can change practically any parameter in Valentina at runtime.
>> But you need understand, that if you change length of field for table
>> with
>> many records, this will take time.
>
> I would not imagine Maxlength being changed regularly but because I'm
> also unsure of what kind of field to use I think a description of the
> situation is in order.
>
> The application is a database for gene sequence data. Essentially it
> stores sequences plus a whole lot of meta-data about those sequences.
> Sequences are unbroken strings of letters [peptides] & highly variable
> in length. For one lab that's testing the software 300 peptides is
> exceptionally long, for some labs the average length is 24 000
> peptides. One of the meta-data fields is always [with L as the length
> of the sequence] 2 * L - 1 long. What I want to do is provide a user
> preference for the maximum length of sequences in their lab. If the
> user makes a good choice to begin with then it should never be changed
> once the database is populated.
>
> I'm also considering adding a check on the length of new sequences
> that, if a new sequence is longer than MaxLength, would offer to adjust
> MaxLength for the user.
>
> Although I have started work with the sequence as a VVarChar I am
> considering changing it to a VText because most sequences in most labs
> would be longer than 1024 peptides. This would also have the advantage
> of eliminating the whole question of MaxLength. I'm open to advice.
Hi Pedro,
We already have discuss such issue on Valentina list far ago.
For such VERY different Max Length String Field
It looks very wise to use combination of all 3 Valentina types,
Or at least 2 types.
String[20] -- for strings <= 20
VarChar[1024] -- for strings up to 1024
Text -- for rest.
Assume you have in one table both VarChar and TEXT, which as trigger store
strings. IF TEXT is empty, then you pay only 4 bytes in table.
If VarChar is empty you pay ... It seems 4 or 8 bytes. Read docs.
So now in RB you can make spcial class with some ONE field
mString
Which will keep that 2 Valentina fields and choose what to use.
You see idea?
Also you need additional field to store where string is written.
Compare this solution with having for VarChar and for Text separate Tables.
Also works...it is hard to say what is better.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list