By default, Derby uses Unicode codepoint collation. However, you can specify locale-based collation when you create the database.
You can use the collation=collation and territory=ll_CC connection URL attributes to specify locale-based collation (see the Derby Reference Manual for details on these attributes). This type of collation applies only to user-defined tables. The system tables use the Unicode codepoint collation.
To create a database with locale-based collation, specify the language and country codes for the territory=ll_CC attribute, and the TERRITORY_BASED value for the collation=collation attribute, when you create the database.
For example, you could use the following connection URL:
jdbc:derby:MexicanDB;create=true;territory=es_MX;collation=TERRITORY_BASED
See the documentation of the territory=ll_CC and collation=collation attributes in the Derby Reference Manual for details on these attributes. See Creating a case-insensitive database for information on making the database use case-insensensitive searches.