Programming & Development / April 11, 2025

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

Cameroon regions Java enum Cameroon ISO 3166-2 CM SQL Cameroon regions Cameroon administrative divisions Spring Boot enum Cameroon region list CM region codes provinces of Cameroon

🇨🇲 Java Enum: Cameroon’s Regions

Cameroon is divided into 10 regions. Here is the Java enum with the ISO 3166-2:CM codes:

java

public enum CameroonRegion {
    ADAMAOUA("CM-AD"),
    CENTRE("CM-CE"),
    EAST("CM-ES"),
    FAR_NORTH("CM-EN"),
    LITTORAL("CM-LT"),
    NORTH("CM-NO"),
    NORTH_WEST("CM-NW"),
    WEST("CM-OU"),
    SOUTH("CM-SU"),
    SOUTH_WEST("CM-SW");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO cameroon_regions (name, code) VALUES
('Adamaoua', 'CM-AD'),
('Centre', 'CM-CE'),
('East', 'CM-ES'),
('Far North', 'CM-EN'),
('Littoral', 'CM-LT'),
('North', 'CM-NO'),
('North-West', 'CM-NW'),
('West', 'CM-OU'),
('South', 'CM-SU'),
('South-West', 'CM-SW');

✅ Summary

This setup maps Cameroon’s 10 regions using ISO 3166-2:CM codes. It’s ideal for backend applications that need standardized administrative division data.


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