Programming & Development / April 11, 2025

Modeling Palau's States in Java and SQL Using ISO 3166-2:PW Codes

Palau states Palau regions Java enum Palau ISO 3166-2 PW SQL Palau Palau subdivisions Spring Boot geographic enum Palau administrative units backend regions Palau states of Palau

🇵🇼 Java Enum: Palau's States

Palau is divided into 16 states. Each state has its official ISO 3166-2:PW code.

java

public enum PalauState {
    AIMELIK("PW-01"),
    AIRAI("PW-02"),
    ANGURUKERU("PW-03"),
    ARTSUN("PW-04"),
    IBON("PW-05"),
    KOROR("PW-06"),
    MELEKEOK("PW-07"),
    NGARAARD("PW-08"),
    NGATANGAI("PW-09"),
    NGEREMLENGUI("PW-10"),
    NGERKISEL("PW-11"),
    NGIRESANG("PW-12"),
    PALAU("PW-13"),
    PEMPAK("PW-14"),
    KLELTSAN("PW-15"),
    MALAAKI("PW-16");

    private final String code;

    PalauState(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

CREATE TABLE palau_states (
    id SERIAL PRIMARY KEY,
    name VARCHAR(64) NOT NULL,
    code VARCHAR(8) NOT NULL UNIQUE
);

INSERT INTO palau_states (name, code) VALUES
('Aimelik', 'PW-01'),
('Airai', 'PW-02'),
('Angurukeru', 'PW-03'),
('Artsun', 'PW-04'),
('Ibon', 'PW-05'),
('Koror', 'PW-06'),
('Melekeok', 'PW-07'),
('Ngaraard', 'PW-08'),
('Ngatangai', 'PW-09'),
('Ngeremlengui', 'PW-10'),
('Ngerkisel', 'PW-11'),
('Ngiresang', 'PW-12'),
('Palau', 'PW-13'),
('Pempak', 'PW-14'),
('Kleltsan', 'PW-15'),
('Malaaki', 'PW-16');

✅ Summary

This setup models Palau's 16 states with their ISO 3166-2:PW codes. It can be used in backend systems, geographic applications, or databases dealing with Palau's administrative regions.



Comments

No comments yet

Add a new Comment

NUHMAN.COM

Information Technology website for Programming & Development, Web Design & UX/UI, Startups & Innovation, Gadgets & Consumer Tech, Cloud Computing & Enterprise Tech, Cybersecurity, Artificial Intelligence (AI) & Machine Learning (ML), Gaming Technology, Mobile Development, Tech News & Trends, Open Source & Linux, Data Science & Analytics

Categories

Tags

©{" "} Nuhmans.com . All Rights Reserved. Designed by{" "} HTML Codex