Programming & Development / April 11, 2025

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

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

🇬🇳 Java Enum: Guinea’s Regions

Guinea is divided into 8 administrative regions. Here’s the Java enum using ISO 3166-2:GN codes:

java

public enum GuineaRegion {
    BOKE("GN-BK"),
    CONAKRY("GN-C"),
    FOUTA_DJALON("GN-FD"),
    KINDIA("GN-KD"),
    KOUROUSSA("GN-KR"),
    LABE("GN-L"),
    MACENTA("GN-MC"),
    N'ZEREKORE("GN-NZ");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO guinea_regions (name, code) VALUES
('Boke', 'GN-BK'),
('Conakry', 'GN-C'),
('Fouta Djalon', 'GN-FD'),
('Kindia', 'GN-KD'),
('Kouroussa', 'GN-KR'),
('Labe', 'GN-L'),
('Macenta', 'GN-MC'),
('N\'Zerekore', 'GN-NZ');

✅ Summary

This setup covers all 8 regions of Guinea using ISO 3166-2:GN codes, ideal 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