Programming & Development / April 11, 2025

How to Represent Antigua and Barbuda’s Parishes and Dependencies in Java and SQL Using ISO 3166-2 Codes

Antigua and Barbuda parishes Java enum Antigua ISO 3166-2 AG SQL Antigua divisions Spring Boot enum Caribbean country codes Barbuda Saint John parish administrative regions Antigua

🇦🇬 Java Enum: Antigua and Barbuda’s Parishes and Dependencies

Antigua and Barbuda is divided into 6 parishes on Antigua and 2 dependencies (Barbuda and Redonda).

java

public enum AntiguaAndBarbudaDivision {
    BARBUDA("AG-10"),
    REDONDA("AG-11"),
    SAINT_GEORGE("AG-03"),
    SAINT_JOHN("AG-04"),
    SAINT_MARY("AG-05"),
    SAINT_PAUL("AG-06"),
    SAINT_PETER("AG-07"),
    SAINT_PHILIP("AG-08");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table + Insert Statements

sql

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

INSERT INTO antigua_barbuda_divisions (name, code) VALUES
('Barbuda', 'AG-10'),
('Redonda', 'AG-11'),
('Saint George', 'AG-03'),
('Saint John', 'AG-04'),
('Saint Mary', 'AG-05'),
('Saint Paul', 'AG-06'),
('Saint Peter', 'AG-07'),
('Saint Philip', 'AG-08');

✅ Summary

This setup reflects all official parishes and dependencies in Antigua and Barbuda as per the ISO 3166-2:AG standard. It’s ideal for geolocation features, address validation, and admin filtering in web or mobile applications.


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