Subject | Re: RE: [ib-support] Non-technical database question |
---|---|
Author | Martijn Tonies |
Post date | 2003-02-24T12:30:17Z |
Alan,
Please don't quote the entire (in this case very very long) message.
entirely
true. Both store character data compressed internally.
What is true, however, is that when returning the data, CHARs will have
padded
spaces to make up the full length of the column. So a CHAR(1000) column will
always return a value with the text (eg: "Martijn Tonies") padded with 9986
spaces.
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
Please don't quote the entire (in this case very very long) message.
> Cassandra,In the case of InterBase/Firebird (and perhaps also others), this isn't
> Some more comments on data types if I may...
> The use of VARCHAR over CHAR is far more advisable where the size of the
> field is greater than a few characters and the length of such fields
> varies... i.e. it's far more economical to use a null terminated string to
> store a string (VARCHAR) than a fixed length string (CHAR). You save a lot
> of db space.
entirely
true. Both store character data compressed internally.
What is true, however, is that when returning the data, CHARs will have
padded
spaces to make up the full length of the column. So a CHAR(1000) column will
always return a value with the text (eg: "Martijn Tonies") padded with 9986
spaces.
> Secondly we had a recent discussion of varhcars here and the concensus wasTrue.
> that varchar 255 was pretty much the economical limit - any larger and a
> blob subtype text is in order... so drop the CHAR(500) fields to BLOBs and
> make all CHAR field greater than say 4 or 5 in length to VARCHARs
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."