The collation attribute is an optional attribute that specifies whether collation is based on the territory specified for the database or Unicode codepoint collation. The valid values for the collation attribute are: TERRITORY_BASED and UCS_BASIC. The default collation is Unicode codepoint collation (UCS_BASIC).
If you include the collation attribute with the value TERRITORY_BASED when you create the Derby database, the collation is based on the language and country codes that you specify with the territory attribute.
If you do not specify the territory attribute when you create the database, Derby uses the java.util.Locale.getDefault method to determine the current value of the default locale for this instance of the Java Virtual Machine (JVM).
The following example shows the URL to create the MexicanDB database. The territory attribute specifies Spanish for the language code and Mexico for the country code. The collation attribute specifies that the collation for the database is territory based.
jdbc:derby:MexicanDB;create=true;territory=es_MX;collation=TERRITORY_BASED