Ladies and Gentlemen!
The first time in the world! 🙂
Localizable Enum Type in DBMS!
We already many months have working ENUM type in 5.0 branch of Valentina. Let me remind that ENUM type is not from SQL standard, so different DBs implement it in different way if at all implement. We have implemented it using CREATE TYPE command of SQL Standard. And we have implement ENUM in way similar to PostgreSQL, because it is the most correct: you just CREATE TYPE ENUM once and later using it in all places of your database.
mySQL, in contrast, defines ENUM as part of a particular Table, right in the CREATE TABLE command. This is not good of course, because then you cannot use this type in other tables or for variables of Stored Procedures.
CREATE TABLE sizes (
name ENUM('small', 'medium', 'large')
);
It is interesting that such mature database as Oracle do not have ENUM type.
All these existed implementations have one big problem from our point of view: such enum types contains string values of only one language. Below we will describe our solution.