Programming & Development / April 11, 2025

How to Represent Republic of the Congo’s Departments in Java and SQL Using ISO 3166-2 Codes

Republic of the Congo departments Congo-Brazzaville enum ISO 3166-2 CG Java enum Congo SQL Congo regions Congo administrative divisions CG department codes Spring Boot enum Congo provinces list

🇨🇬 Java Enum: Republic of the Congo Departments

The Republic of the Congo is divided into 12 departments. Here's a Java enum using official ISO 3166-2:CG codes:

java

public enum CongoDepartment {
    BOUENZA("CG-11"),
    BRAZZAVILLE("CG-BZV"),
    CUVETTE("CG-8"),
    CUVETTE_OUEST("CG-15"),
    KOILOU("CG-5"),
    LEKOUMOU("CG-2"),
    LIKOUALA("CG-7"),
    NIARI("CG-9"),
    PLATEAUX("CG-14"),
    POINTE_NOIRE("CG-16"),
    POOL("CG-12"),
    SANGHA("CG-13");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO congo_departments (name, code) VALUES
('Bouenza', 'CG-11'),
('Brazzaville', 'CG-BZV'),
('Cuvette', 'CG-8'),
('Cuvette-Ouest', 'CG-15'),
('Kouilou', 'CG-5'),
('Lékoumou', 'CG-2'),
('Likouala', 'CG-7'),
('Niari', 'CG-9'),
('Plateaux', 'CG-14'),
('Pointe-Noire', 'CG-16'),
('Pool', 'CG-12'),
('Sangha', 'CG-13');

✅ Summary

This setup accurately reflects the 12 departments of the Republic of the Congo, including the capital Brazzaville and major department Pointe-Noire, using the ISO 3166-2:CG codes. It's perfect for software systems managing regional data or administrative mappings.


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