✅ 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.