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

290Province / District / Subdistrict

Level 1 of the Thai address cascade (sample subset).

Try it

Address form

Each dropdown is loaded from the REST API after the one above it is chosen
Choose a province to start.

Last call: -

# Code Name (Thai) Name (English) Region Status
1 10 กรุงเทพมหานคร Bangkok Central Active ✏️
2 12 นนทบุรี Nonthaburi Central Active ✏️
3 20 ชลบุรี Chon Buri East Active ✏️
4 40 ขอนแก่น Khon Kaen Northeast Active ✏️
5 50 เชียงใหม่ Chiang Mai North Active ✏️
6 83 ภูเก็ต Phuket South Active ✏️
Showing 1–6 of 6
🎓 Learn: how this master is built table province
  • Three tables linked by foreign keys: subdistrict → district → province.
  • The address form loads districts only after a province is chosen (fetch /api/geo/...).
Entity
domain/Province.java
Repository
repo/ProvinceRepository.java
Definition
MasterRegistry: "provinces"
Page / form
web/MasterController.java
Try-it panel
templates/tools/address-cascade.html
REST API
GET /api/geo/provinces
SELECT p.name_th AS province, d.name_th AS district, s.name_th AS subdistrict, s.postcode
FROM subdistrict s
JOIN district d ON d.id = s.district_id
JOIN province p ON p.id = d.province_id
ORDER BY p.code, d.code, s.code;