# eXtremeDB Case Sensitivity

> When sorting ASCII strings, the alphabetic order of strings is by default case-sensitive. If it is important to order rows by case-insensitive character comparison, i.e. where the lowercase and uppercase letters in the same position are sorted equally, the `case_insensitive` or `ignore_case` keywords can be used on index definitions in the database schema. For example, to specify that index `by_name` on string filed `name` will use case-insensitive comparison, use a declaration like the following in the schema file:

>         tree<name case_insensitive asc> by_name;

> or

>         tree<name ignore_case asc> by_name;

> Also, for eXtremeDB source code licensees, the `MCO_CFG_SUPPORT_CASE_INSENSITIVE_CHAR_CMP` configuration option is available as a C preprocessor define in `target/mcolib/mcocfg.h` . Its default value is 1. If its value is changed to 0 in an eXtremeDB build, then all indexes will use case sensitive comparison no matter whether they are declared with the `case_insensitive` keyword in the schema file or not; i.e. this redefinition of the `MCO_CFG_SUPPORT_CASE_INSENSITIVE_CHAR_CMP` constant will override the effects of `case_insensitive` keyword.

> To be clear, the following settings will have the stated results:

> Value of `MCO_CFG_SUPPORT_CASE` `_INSENSITIVE_CHAR_CMP` | Schema declaration | Resulting index comparison
> --- | --- | ---
> defined as 1 (default) | without `case_insensitive` | case sensitive
> defined as 1 (default) | with `case_insensitive` | case insensitive
> redefined as 0 (special build) | without `case_insensitive` | case sensitive
> redefined as 0 (special build) | with `case_insensitive` | case sensitive

> (Object code licensees can request a special build of eXtremeDB libraries from McObject Support.)