db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "BuiltInLanguageBasedOrderingDERBY-1478" by MamtaSatoor
Date Tue, 20 Mar 2007 17:38:56 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by MamtaSatoor:
http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478

------------------------------------------------------------------------------
  http://www.nabble.com/Collation-feature-discussion-tf3418026.html#a9559634
  
  == Outstanding items ==
- 1)Override all the collation related methods in the CollatorSQLChar. This is a subclass
of SQLChar.
+ 1)Add jdbc url attribute COLLATION into services.properties as derby.database.collation
property. If no COLLATION is specified at database create time, then have UCS_BASIC as the
value for derby.database.collation We need the property in the services.properties rather
than properties conglomerate because DataValueFactory needs this property before store has
been booted completely.
  
- 2)Add subclasses for SQLVarchar, SQLLongvarchar, SQLClob. These subclasses will override
the collation related methods.
+ 2)At the time of upgrade of pre-10.3 database, we should make sure that derby.database.collation
property with value UCS_BASIC in added to services.properties. This is because we do not plan
on supporting collation change for existing databases. 
  
- 3)Store column level metadata for collate in Store.
+ 3)Override all the collation related methods in the CollatorSQLChar. CollatorSQLChar is
a subclass of SQLChar.
  
- 4)Store column level metadata for collate in Language Layer as well. This will happen in
DataTypeDescriptor(DTD) with the addition of int collateType field. It will be set to 0(UCS_BASIC)/1(TERRITORY_BASED)/-1(UNKNOWN).
There will be get and set methods on DTD for this new field.
+ 4)Add subclasses for SQLVarchar, SQLLongvarchar, SQLClob. These subclasses will override
the collation related methods in their superclasses.
  
- 5)The TypeDescriptor for character columns always has 0 for scale because scale does not
apply to character datatypes. Starting Derby 10.3, this scale field in TypeDescriptor will
be overloaded to indicate the collate type of the character. So, if user has requested for
TERRITORY_BASED collation, then the collate type in TypeDescriptor for user columns(character)
will be 1(TERRITORY_BASED). The collate type will be 0(UCS_BASIC) for SYS schema character
columns and for databases with collation set to UCS_BASIC.
+ 5)Store column level metadata for collate in Store.
  
- 6)At the time of upgrade of pre-10.3 databases, we should make sure that collation of these
databases is marked as UCS_BASIC. This is because we do not plan on supporting collation change
for existing databases.
+ 6)Store column level metadata for collate in Language Layer as well. This will happen in
DataTypeDescriptor(DTD) with the addition of int collateType field. It will be set to 0(UCS_BASIC)/1(TERRITORY_BASED)/-1(UNKNOWN).
There will be get and set methods on DTD for this new field.
  
+ 7)The TypeDescriptor for character columns always has 0 for scale because scale does not
apply to character datatypes. Starting Derby 10.3, this scale field in TypeDescriptor will
be overloaded to indicate the collate type of the character. So, if user has requested for
TERRITORY_BASED collation, then the scale in TypeDescriptor for user columns(character) will
be 1(TERRITORY_BASED). The scale will be always 0(UCS_BASIC) for SYS schema character columns
and for databases with collation set to UCS_BASIC.
+ 
- 7)When a character column is added using CREATE TABLE/ALTER TABLE, make sure that the correct
collate type is populated in the TypeDescriptor in the SYS.SYSCOLUMNS table.
+ 8)When a character column is added using CREATE TABLE/ALTER TABLE, make sure that the correct
collate type is populated in the TypeDescriptor in the SYS.SYSCOLUMNS table.
  
  == Implemented items ==
  1)A shell for subclass of SQLChar has been implemented and it is called CollatorSQLChar.
It resides in derby.iapi.types package.

Mime
View raw message