Programming & Development / April 11, 2025

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

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

🇬🇾 Java Enum: Guyana’s Regions

Guyana is divided into 10 administrative regions. Here’s the Java enum using ISO 3166-2:GY codes:

java

public enum GuyanaRegion {
    BARIMA_WAINI("GY-BW"),
    CAYUNIA_MAZARUNI("GY-CM"),
    DEMERARA_MAHAIKA("GY-DM"),
    ESEQUIBO_ISLANDS_WEST_DEMERARA("GY-EW"),
    POTARO_SIPARUNI("GY-PS"),
    UPPER_DEMERARA_BERBICE("GY-UB"),
    UPPER_TAKUTU_UPPER_ESSEQUIBO("GY-UT"),
    EAST_BERBICE_CORENTYNE("GY-EB"),
    WEST_BERBICE_CORENTYNE("GY-WB"),
    RUPUNUNI("GY-RU");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO guyana_regions (name, code) VALUES
('Barima-Waini', 'GY-BW'),
('Cayunia-Mazaruni', 'GY-CM'),
('Demerara-Mahaika', 'GY-DM'),
('Essequibo Islands-West Demerara', 'GY-EW'),
('Potaro-Siparuni', 'GY-PS'),
('Upper Demerara-Berbice', 'GY-UB'),
('Upper Takutu-Upper Essequibo', 'GY-UT'),
('East Berbice-Corentyne', 'GY-EB'),
('West Berbice-Corentyne', 'GY-WB'),
('Rupununi', 'GY-RU');

✅ Summary

This setup covers all 10 regions of Guyana using ISO 3166-2:GY codes, ready for backend services, Java applications, and SQL databases.


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