I wonder why the
Java String type is mapped to a char(255) for Sybase in
$ORION/config/database-schemas ?
I would prefer to
have the default mapping as varchar(30) or varchar(255). These are the
reasons:
* A varchar is of
variable length and thus often consumes far less than the char type which always
stores the maximum amount of chars (space padded).
* A varchar can be
allowed to have null values.
A varchar field only
adds one byte overhead to accomodate the length of the string. Furthermore
varchars are only slightly slower than char fields when used in indexed
lookups.
Anyway I have
modified my sybase.xml to use varchar(30) for String fields (makes for
nice column width when displaying table data using console utilities) and I
am happy with it so far. Any Ideas why char(255) should be
used?
/David
