# Character-based collation in Derby

A character set is a set of symbols and encodings. Character data types are represented as Unicode 2.0 sequences in Derby. Collation defines how character data is sorted.

- How collation works in Derby
  Derby supports a wide range of character sets and encodes all of the character sets by using the Unicode support provided by the java.lang.Character class in the Java Virtual Machine (JVM) in which the Derby database runs.
- Locale-based collation
  Derby supports the ability to define collation rules that are appropriate to a locale. This is referred to as locale-based collation.
- Database connection URL attributes that control collation
  When you create a Derby database, the attributes that you set determine the collation that is used with all character data in the database.
- Examples of case-sensitive and case-insensitive string sorting
  These examples show the results of sorts on databases created with various collation and locale attributes.
- Differences between LIKE and equal (=) comparisons
  When you use locale-based collation, the comparisons can return different results when you use the LIKE and equal (=) operators.

Parent topic: Localizing Derby
Related concepts
SQL parser support for Unicode
Other components with locale support
Messages libraries
Related tasks
Creating a database with locale-based collation
Creating a case-insensitive database
Creating a customized collator