Programming & Development / April 11, 2025

How to Represent Czech Republic’s Regions in Java and SQL Using ISO 3166-2 Codes

Czech Republic regions Java enum Czechia ISO 3166-2 CZ SQL Czechia regions CZ region codes Czech Republic administrative divisions Spring Boot enum Czechia region list backend region enum

🇨🇿 Java Enum: Czech Republic’s Regions

The Czech Republic (Czechia) is divided into 14 regions. Here's the Java enum:

java

public enum CzechiaRegion {
    HRADECKO("CZ-52"),
    JIHOMORAVSKY("CZ-64"),
    JIHOZAPAD("CZ-63"),
    KRAJ_VYSOCINA("CZ-63"),
    LIBERECKY("CZ-51"),
    MORAVSKOSLEZSKY("CZ-80"),
    OLOMOUC("CZ-71"),
    PARDUBICE("CZ-42"),
    PLZENSKY("CZ-32"),
    PRAHA("CZ-10"),
    STREDNI_CESKY("CZ-20"),
    USTECKY("CZ-31"),
    ZLIN("CZ-73");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO czechia_regions (name, code) VALUES
('Hradecko', 'CZ-52'),
('Jihomoravský', 'CZ-64'),
('Jihozápad', 'CZ-63'),
('Kraj Vysočina', 'CZ-63'),
('Liberecký', 'CZ-51'),
('Moravskoslezský', 'CZ-80'),
('Olomouc', 'CZ-71'),
('Pardubice', 'CZ-42'),
('Plzeňský', 'CZ-32'),
('Praha', 'CZ-10'),
('Střední Čechy', 'CZ-20'),
('Ústecký', 'CZ-31'),
('Zlín', 'CZ-73');

✅ Summary

This Java enum and SQL table setup represents all 14 regions of the Czech Republic (Czechia) using their respective ISO 3166-2:CZ codes.


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