Programming & Development / April 12, 2025

Enum Representation of Provinces in Vanuatu and SQL Table for Storing Provincial Data

Enum Vanuatu Provinces Java SQL Port Vila Administrative Divisions Province Code Vanuatu Enum Oceania

✅ Enum Representation in Java

Vanuatu is divided into 6 provinces, each with its own administrative code. The capital city, Port Vila, is located in the Shefa Province.

Here’s the Java enum representing these provinces along with their standard codes:

java

public enum VanuatuProvince {
    SHEFA("01"),
    PENAMA("02"),
    MALAMPA("03"),
    SANMA("04"),
    TORBA("05"),
    EFFECTIVE_PROVINCIAL_AREA("06");

    private final String code;

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

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

✅ SQL Representation for Vanuatu’s Provinces

Here is the SQL schema and insert statements for the 6 provinces of Vanuatu:

sql

-- Table for Vanuatu provinces
CREATE TABLE vanuatu_provinces (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    code CHAR(2) NOT NULL
);

-- Insert Vanuatu provinces into the table
INSERT INTO vanuatu_provinces (name, code) VALUES
('Shefa', '01'),
('Penama', '02'),
('Malampa', '03'),
('Sanma', '04'),
('Torba', '05'),
('Effective Provincial Area', '06');

This structure helps in organizing the geographic and administrative data for Vanuatu, useful for governmental data, regional planning, and local services.



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