The Yttrium web application uses a relational database to persist and retrieve data. In this section Yttrium's default database, MySQL is fully explained. Obviously any other database engine could be used.
Unicode and UTF-8
The database needs to be configured to hold the Unicode character set using the UTF-8 encoding. When seting this up in MySQL the [mysqld] section of the my.cnf must contain:
default-character-set = utf8 character_set_server = utf8
You'll find the my.cnf in the /etc/mysql directory. On a Windows system, the my.cnf would be called my.ini.
Obvioulsy, you'll need to have access to this file to set these properties.
Transaction aware storage engine
InnoDB provides MySQL with a transaction-safe (ACID compliant) storage engine that has commit, rollback, and crash recovery capabilities.
See the MySQL documentation for more info on the settings of the InnoDB.
To set the InnoDB as the default database, update the [mysqld] section with:
default-storage-engine = innodb
Usage example
To create a table using the InnoDB storage engine storing the data in the UTF-8 encoding of the Unicode transaction set, use this syntax:
CREATE TABLE `<tablename>` ( <column> * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
The src/main/sql/schema.sql shows a full example.