Programming & Development / April 11, 2025

How to Represent Kyrgyzstan’s Provinces in Java and SQL Using ISO 3166-2 Codes

Kyrgyzstan provinces Java enum Kyrgyzstan ISO 3166-2 KG SQL Kyrgyzstan provinces KG province codes Kyrgyzstan administrative divisions backend region enum Kyrgyzstan provinces Java SQL Spring Boot regions Kyrgyzstan

🇰🇬 Java Enum: Kyrgyzstan’s Provinces

Kyrgyzstan is divided into 7 regions (oblasts) and 1 city of national significance (Bishkek). Here’s the Java enum using ISO 3166-2:KG codes:

java

public enum KyrgyzstanProvince {
    BATKEN("KG-B"),
    CHUY("KG-C"),
    ISSYK_KUL("KG-I"),
    JALAL_ABAD("KG-J"),
    NARYN("KG-N"),
    OSH("KG-O"),
    TALAS("KG-T"),
    BISHKEK("KG-BI");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO kyrgyzstan_provinces (name, code) VALUES
('Batken', 'KG-B'),
('Chuy', 'KG-C'),
('Issyk-Kul', 'KG-I'),
('Jalal-Abad', 'KG-J'),
('Naryn', 'KG-N'),
('Osh', 'KG-O'),
('Talas', 'KG-T'),
('Bishkek', 'KG-BI');

✅ Summary

This setup covers all 7 regions and 1 city of national significance of Kyrgyzstan using ISO 3166-2:KG codes, ideal for backend services, Java applications, and SQL databases.



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