Programming & Development / April 11, 2025

How to Represent Ethiopia’s Regions in Java and SQL Using ISO 3166-2 Codes

Ethiopia regions Java enum Ethiopia ISO 3166-2 ET SQL Ethiopia regions ET region codes Ethiopia administrative divisions backend region enum Ethiopia provinces Java SQL Spring Boot regions Ethiopia

🇪🇹 Java Enum: Ethiopia’s Regions

Ethiopia is divided into 11 regions (including two chartered cities). Here's the Java enum using ISO 3166-2:ET codes:

java

public enum EthiopiaRegion {
    ADDIS_ABABA("ET-AA"),
    AFAR("ET-AD"),
    AMHARA("ET-AM"),
    BENISHANGUL_GUMUZ("ET-BE"),
    DIRE_DAWA("ET-DD"),
    GAMBELA("ET-GA"),
    HARARI("ET-HA"),
    OROMIA("ET-OR"),
    SIDAMA("ET-SD"),
    SNNPR("ET-SN"),
    TIGRAY("ET-TI");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO ethiopia_regions (name, code) VALUES
('Addis Ababa', 'ET-AA'),
('Afar', 'ET-AD'),
('Amhara', 'ET-AM'),
('Benishangul-Gumuz', 'ET-BE'),
('Dire Dawa', 'ET-DD'),
('Gambela', 'ET-GA'),
('Harari', 'ET-HA'),
('Oromia', 'ET-OR'),
('Sidama', 'ET-SD'),
('SNNPR', 'ET-SN'),
('Tigray', 'ET-TI');

✅ Summary

This setup provides all 11 regions of Ethiopia, using official ISO 3166-2:ET codes, suitable for backend systems, Java applications, and database implementations.


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