🇳🇱 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.