title: How to model a (Java) Enum in a Database (with SQL92)
body: <p>Hi am modelling an Entity with a column named "Gender". In the application code, the gender is supposed to be an (Java) Enum type, with 2 values (MALE and FEMALE).. how would you model it, knowing that Enums as Datatype are not part of the generic SQL (language) 92.</p>
  
  <p>It the data model would have to be portable, in order to be used by several DBMS (Mysql, Oracle, Derby) and several persistence provider (JPA, Hibernate, JDBC).
  I feel, it hits at 2  levels:
  - first the level of the Schema and the entity (store the enums as -VAR-CHAR or INT)
  - second the level of the app code (JDBC doesn't support enums, JPA does but it depends on the implementation)</p>
  
  <p>Is there a generic solution, applicable for example to an Mysql DBMS ?
  Thanks !!</p>