Programming & Development / April 12, 2025

Enum Representation of Districts in Suriname and SQL Table for Storing District Data

Enum Districts Suriname Java SQL Paramaribo Saramacca Sipaliwini District Code Administrative Division

✅ Enum Representation in Java

Suriname is divided into 10 administrative districts. Below is a Java enum representing each district with a standard district code:

java

public enum District {
    BROKOPONDO("BR"),
    COMMEWIJNE("CM"),
    CORONIE("CR"),
    MAROWIJNE("MA"),
    NICKERIE("NI"),
    PARAMARIBO("PM"),
    PARA("PA"),
    SARAMACCA("SA"),
    SIPALIWINI("SI"),
    WANICA("WA");

    private final String code;

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

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

🔹 Notes:

  • Each district is assigned a two-letter code that can be used in systems, APIs, or UIs.
  • getCode() allows quick access to the district abbreviation for display or storage purposes.

✅ SQL Representation for Storing District Data

Here’s a SQL schema and the insert statements for storing Suriname’s 10 districts:

sql

-- Table definition for districts of Suriname
CREATE TABLE districts (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    code CHAR(2) NOT NULL
);

-- Insert statements for Suriname's districts
INSERT INTO districts (name, code) VALUES
('Brokopondo', 'BR'),
('Commewijne', 'CM'),
('Coronie', 'CR'),
('Marowijne', 'MA'),
('Nickerie', 'NI'),
('Paramaribo', 'PM'),
('Para', 'PA'),
('Saramacca', 'SA'),
('Sipaliwini', 'SI'),
('Wanica', 'WA');

This setup is ideal for building localized applications, databases, or geographic systems that interact with Surinamese administrative regions.


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