Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Character vs Memo fields
Message
De
23/07/2008 13:26:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01333464
Message ID:
01333490
Vues:
13
>>I am merging two tables. Each one contains data on documents contained in a library. The first uses character fields for most of its data types but does have 2 memo fields. The second uses memo fields (5) for most of its columns. The second table is the smaller of the two (about 1/3 the records of the first). Assuming the data in the second table's memo fields can be contained in character fields 255 wide, would the best choice be to continue using memo fields in the combined table or to convert the memo fields to character fields to match the first table? The combined number of records is fairly small (6000) so disk space is not much of an issue. The application will be webbased.
>>
>>What would you recommend regarding pros and cons either way?
>>
>>Thanks
>
>On top of my heads:
>Pros:
>Char fields can be used in INDEX (memo also but with some transformation).
>Char fields could be used in GROUP BY in SELECT, can be exported with COPY TO ... EXPORT commands.
>There is no MEMO bloat when using char field.
>
>Cons:
>You can't store more than 254 bites in char field, as Sergey already mention it.
>Bigger table size even if you store 1 char into the field.
>
>I always prefer to use Char (and new varchar) type when I can.

Thanks Borislav,
I have never use varchar. Is it fair to say the primary difference between it and Character type is the absense of padding to the full field width? Does the byte cost vary with the actual contents of the field?
Does varchar width establish the maxlength of the field contants?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform