I will use the reference tables for the first time so I have some questions about it.
Example Table
------------------------
id | description |
------------------------
1 | Some description1 |
2 | Some description2 |
3 | Some description3 |
------------------------
1) In order to increase code legibility I want to create enums like example below. Is this best practice to doing this? What do you think?
public enum JobType {
SOME_DESC1((short) 1), SOME_DESC2((short) 2), SOME_DESC3((short) 3);
private Short value;
JobType(Short value) {
this.value = value;
}
public Short getValue() {
return value;
}
}
2) If I wanted reference tables to be multilingual, how should I do that? Should I create tables like example below? Do you have any other suggestions?
job_type - job_translation - language
id job_id (pk-fk) lang_code
lang_code (pk-fk)
description