Programming & Development / April 12, 2025

Enum Representation of Municipalities in Timor-Leste and SQL Table for Storing Municipality Data

Enum Timor-Leste East Timor Municipalities Java SQL Dili Administrative Divisions Subregions Municipality Code

✅ Enum Representation in Java

Timor-Leste (East Timor) is divided into 13 municipalities (municípios), including the Special Administrative Region of Oecusse.

Here’s the Java enum representing these 13 divisions with appropriate short codes:

java

public enum TimorLesteMunicipality {
    AILEU("AL"),
    AINARO("AN"),
    BAUCAU("BC"),
    BOBONARO("BO"),
    COVALIMA("CO"),
    DILI("DL"),
    ERMERA("ER"),
    LAUTEM("LT"),
    LIQUICA("LQ"),
    MANATUTO("MT"),
    MANUFAHI("MF"),
    OECUSSE("OE"), // Special Administrative Region
    VIQUEQUE("VQ");

    private final String code;

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

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

✅ SQL Representation for Timor-Leste's Municipalities

Below is the SQL schema and INSERT statements to store all 13 municipalities of Timor-Leste:

sql

-- Table for Timor-Leste municipalities
CREATE TABLE timor_leste_municipalities (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    code VARCHAR(5) NOT NULL
);

-- Insert municipalities into the table
INSERT INTO timor_leste_municipalities (name, code) VALUES
('Aileu', 'AL'),
('Ainaro', 'AN'),
('Baucau', 'BC'),
('Bobonaro', 'BO'),
('Covalima', 'CO'),
('Dili', 'DL'),
('Ermera', 'ER'),
('Lautem', 'LT'),
('Liquiçá', 'LQ'),
('Manatuto', 'MT'),
('Manufahi', 'MF'),
('Oecusse', 'OE'),
('Viqueque', 'VQ');

This setup is ideal for systems managing administrative, geographic, or civic data in Timor-Leste.



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