When you create a Derby database, the attributes that you set determine the collation that is used with all character data in the database.
The following table shows some examples.
Example Create URLs | Collation Is Driven By |
---|---|
jdbc:derby:abcDB;create=true | Unicode codepoint collation (UCS_BASIC), which is the default collation for Derby databases. |
jdbc:derby:abcDB;create=true;territory=es_MX | Unicode codepoint collation (UCS_BASIC). The collation=collation attribute is not set. |
jdbc:derby:abcDB;create=true;collation=TERRITORY_BASED | The locale of the JVM, since the territory=ll_CC
attribute is not set. Tip: To determine the locale of the JVM,
call the Locale.getDefault method.
|
jdbc:derby:abcDB;create=true;territory=es_MX;collation=TERRITORY_BASED | The territory=ll_CC attribute. |
jdbc:derby:abcDB;create=true;territory=es_MX;collation=TERRITORY_BASED:PRIMARY | The territory=ll_CC attribute with collation strength PRIMARY, which makes the database case-insensitive (it typically means that only differences in base letters are considered significant). |