Programming & Development / April 12, 2025

Enum Representation of Provinces in Zimbabwe and SQL Table for Storing Provincial Data

Enum Zimbabwe Provinces Java SQL Harare Administrative Divisions Province Code Zimbabwe Enum Africa

✅ Enum Representation in Java

Zimbabwe is divided into 10 provinces and the capital city of Harare, which is a special administrative region, and Bulawayo, which is also a city with provincial status. Each province has its own unique administrative code.

Here’s the Java enum representing these provinces along with their standard codes:

java

public enum ZimbabweProvince {
    HARARE("01"),
    BULAWAYO("02"),
    MANICALAND("03"),
    MASHONALAND_CENTRAL("04"),
    MASHONALAND_EAST("05"),
    MASHONALAND_WEST("06"),
    MASVINGO("07"),
    MATABELELAND_NORTH("08"),
    MATABELELAND_SOUTH("09"),
    MIDLANDS("10");

    private final String code;

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

    public String getCode() {
        return this.code;
    }
}

✅ SQL Representation for Zimbabwe’s Provinces

Here is the SQL schema and insert statements for the 10 provinces and special administrative regions of Zimbabwe:

sql

-- Table for Zimbabwe provinces and special regions
CREATE TABLE zimbabwe_provinces (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    code CHAR(2) NOT NULL
);

-- Insert Zimbabwe's provinces and special regions into the table
INSERT INTO zimbabwe_provinces (name, code) VALUES
('Harare', '01'),
('Bulawayo', '02'),
('Manicaland', '03'),
('Mashonaland Central', '04'),
('Mashonaland East', '05'),
('Mashonaland West', '06'),
('Masvingo', '07'),
('Matabeleland North', '08'),
('Matabeleland South', '09'),
('Midlands', '10');

This structure allows for the management of Zimbabwe's administrative data, useful for governance, demographic studies, and geographic information systems.


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