Programming & Development / April 12, 2025

Enum Representation of Regions in Uzbekistan and SQL Table for Storing Regional Data

Enum Uzbekistan Regions Java SQL Tashkent Administrative Divisions Region Code Uzbekistan Enum Central Asia

✅ Enum Representation in Java

Uzbekistan is divided into 12 regions (viloyatlar) and the autonomous Republic of Karakalpakstan. Each region has its own unique administrative code, and the capital city, Tashkent, is considered separately as a special administrative district.

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

java

public enum UzbekistanRegion {
    TASHKENT_CITY("01"),
    ANDIJAN("02"),
    BUKHARA("03"),
    JIZZAKH("04"),
    KASHKADARYA("05"),
    KHOREZM("06"),
    NAVOIY("07"),
    NAMANGAN("08"),
    SAMARKAND("09"),
    SURKHANDARYA("10"),
    SYRDARYA("11"),
    FERGANA("12"),
    KARAKALPAKSTAN("13");

    private final String code;

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

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

✅ SQL Representation for Uzbekistan’s Regions

Here is the SQL schema and insert statements for the 12 regions of Uzbekistan and Karakalpakstan:

sql

-- Table for Uzbekistan regions
CREATE TABLE uzbekistan_regions (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    code CHAR(2) NOT NULL
);

-- Insert Uzbekistan regions into the table
INSERT INTO uzbekistan_regions (name, code) VALUES
('Tashkent City', '01'),
('Andijan', '02'),
('Bukhara', '03'),
('Jizzakh', '04'),
('Kashkadarya', '05'),
('Khorezm', '06'),
('Navoi', '07'),
('Namangan', '08'),
('Samarkand', '09'),
('Surkhandarya', '10'),
('Syrdarya', '11'),
('Fergana', '12'),
('Karakalpakstan', '13');

This structure is perfect for managing the administrative and geographic data of Uzbekistan, useful for governance, regional planning, or geographic data 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