Firebird Database – How to Deploy Case-Insensitive Embedded Database

ccase sensitivefirebird

I'm trying to find out how to create CI firebird embedded database. I've found (here) that there are some character sets each of them has one or many collations. So, UTF8 has UCS_BASIC, UNICODE and UNICODE_CI collations. From documentation I can set any collation for any column during table creation. My question is: Is it possible to set collation on whole database? Or I have to impose collation on all columns?

Best Answer

The syntax you're looking for is here

CREATE {DATABASE | SCHEMA} ... [PAGE_SIZE [=] size] ...
[DEFAULT CHARACTER SET charset [COLLATION collation]] ...
[DIFFERENCE FILE 'filepath']

size ::= 4096 | 8192 | 16384

Also check out this page and this link from it specifically about case insensitive searches and collations on columns.

The good news is that you can set it both by database and column.

Also, check this out - you can also use "shadow" columns if you can't get exactly what you want "out of the box" - i.e. UPPER() function.