Programming & Development / April 11, 2025

Modeling Netherlands' Provinces in Java and SQL Using ISO 3166-2:NL Codes

Netherlands provinces Netherlands regions Java enum Netherlands ISO 3166-2 NL SQL Netherlands Netherlands subdivisions Spring Boot geographic enum Netherlands administrative units backend regions Netherlands provinces of Netherlands

🇳🇱 Java Enum: Netherlands' Provinces

The Netherlands is divided into 12 provinces, each with its official ISO 3166-2:NL code.

java

public enum NetherlandsProvince {
    GRONINGEN("NL-GR"),
    FRIESLAND("NL-FR"),
    DRACHTEN("NL-DR"),
    OVERIJSSEL("NL-OV"),
    GELDERLAND("NL-GE"),
    UTRECHT("NL-UT"),
    NOORD_HOLLAND("NL-NH"),
    ZUID_HOLLAND("NL-ZH"),
    ZEELAND("NL-ZE"),
    NOORD_BRABANT("NL-NB"),
    LIMBURG("NL-LI"),
    FLEVOLAND("NL-FL");

    private final String code;

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

    public String getCode() {
        return code;
    }
}

🗃️ SQL Table and Insert Statements

sql

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

INSERT INTO netherlands_provinces (name, code) VALUES
('Groningen', 'NL-GR'),
('Friesland', 'NL-FR'),
('Drenthe', 'NL-DR'),
('Overijssel', 'NL-OV'),
('Gelderland', 'NL-GE'),
('Utrecht', 'NL-UT'),
('Noord-Holland', 'NL-NH'),
('Zuid-Holland', 'NL-ZH'),
('Zeeland', 'NL-ZE'),
('Noord-Brabant', 'NL-NB'),
('Limburg', 'NL-LI'),
('Flevoland', 'NL-FL');

✅ Summary

This setup models Netherlands' provinces with their ISO 3166-2:NL codes. This can be useful for backend systems, geographic applications, and database systems dealing with administrative divisions within the Netherlands.



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