Master data management · features 286-305
🛢️ SQL Server · MasterDataLabDB
📚

302Lookup / Code Tables

Code tables: one generic table holds many small lists (gender, title, region ...).

Try it

All code tables

Each type is a small list; other masters store the code (e.g. holiday.holiday_type = 'PUBLIC')
A · AB · BAB · ABO · O
M · MaleF · FemaleX · Not specified
PUBLIC · Public holidaySUBSTITUTE · Substitution dayCOMPANY · Company holiday
SINGLE · SingleMARRIED · MarriedDIVORCED · DivorcedWIDOWED · Widowed
GENERAL · GeneralSALES · SalesINVENTORY · InventoryACCOUNTING · AccountingSECURITY · Security
VAT · Value added taxWHT · Withholding taxEXCISE · Excise tax
CENTRAL · CentralNORTH · NorthNORTHEAST · NortheastEAST · EastWEST · WestSOUTH · South
MR · Mr.MRS · Mrs.MS · MissDR · Dr.
LENGTH · LengthWEIGHT · WeightVOLUME · VolumeAREA · AreaCOUNT · CountTIME · Time
ASIA · AsiaEUROPE · EuropeAMERICAS · AmericasAFRICA · AfricaOCEANIA · Oceania
# Code Name System type Status
9 BLOOD_GROUP Blood group Active ✏️
7 GENDER Gender Active ✏️
2 HOLIDAY_TYPE Holiday type ✓ Active ✏️
10 MARITAL_STATUS Marital status Active ✏️
6 PARAM_GROUP Parameter group ✓ Active ✏️
3 TAX_TYPE Tax type ✓ Active ✏️
4 TH_REGION Thai region ✓ Active ✏️
8 TITLE Name title Active ✏️
1 UNIT_TYPE Unit type ✓ Active ✏️
5 WORLD_REGION World region ✓ Active ✏️
Showing 1–10 of 10
🎓 Learn: how this master is built table lookup_type
  • Instead of 10 tiny tables, lookup_type + lookup_value store them all.
  • LookupService.values() is @Cacheable("lookups"); MasterListeners clears the cache after a change.
Entity
domain/LookupType.java
Repository
repo/LookupTypeRepository.java
Definition
MasterRegistry: "lookup-types"
Page / form
web/MasterController.java
Try-it panel
templates/tools/lookup-overview.html
REST API
GET /api/lookups/TITLE
SELECT t.code AS type, v.code, v.name, v.name_th
FROM lookup_value v JOIN lookup_type t ON t.id = v.lookup_type_id
WHERE t.code = 'TITLE' ORDER BY v.sort_order;