Programming & Development / April 12, 2025

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

Enum Turkmenistan Provinces Java SQL Ashgabat Administrative Divisions Region Code Province Code Central Asia Turkmenistan Enum

✅ Enum Representation in Java

Turkmenistan is divided into 5 provinces (welayatlar) and the city of Ashgabat. Each province has a unique administrative code.

Here’s the Java enum representing the provinces along with their standard two-letter codes:

java

public enum TurkmenistanProvince {
    ASHGABAT("01"),          // Capital city
    AKHAL("02"),
    BALKAN("03"),
    DASHOGUZ("04"),
    LEBAP("05"),
    MARY("06");

    private final String code;

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

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

✅ SQL Representation for Turkmenistan’s Provinces

Here is the SQL schema and insert statements for the 6 administrative divisions of Turkmenistan:

sql

-- Table for Turkmenistan provinces
CREATE TABLE turkmenistan_provinces (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    code CHAR(2) NOT NULL
);

-- Insert provinces and Ashgabat into the table
INSERT INTO turkmenistan_provinces (name, code) VALUES
('Ashgabat', '01'),
('Ahal', '02'),
('Balkan', '03'),
('Dashoguz', '04'),
('Lebap', '05'),
('Mary', '06');

This setup allows for easy management of Turkmenistan’s administrative data, perfect for applications in public services, geographic systems, and logistics.



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