✅ Enum Representation in Java
Tunisia is divided into 24 governorates (wilayas), which are the top-level administrative divisions.
Here's the Java enum
with standard short codes for each governorate:
java
public enum TunisiaGovernorate {
ARIANA("AR"),
BEJA("BJ"),
BEN_AROUS("BA"),
BIZERTE("BZ"),
GABES("GB"),
GAFSA("GF"),
JENDOUBA("JD"),
KAIROUAN("KR"),
KASSERINE("KS"),
KEBILI("KB"),
KEF("KF"),
MAHDIA("MH"),
MANOUBA("MN"),
MEDENINE("MD"),
MONASTIR("MO"),
NABEUL("NB"),
SFAX("SF"),
SIDI_BOUZID("SB"),
SILIANA("SL"),
SOUSSE("SS"),
TATAOUINE("TT"),
TOZEUR("TZ"),
TUNIS("TN"),
ZAGHOUAN("ZG");
private final String code;
TunisiaGovernorate(String code) {
this.code = code;
}
public String getCode() {
return this.code;
}
}
✅ SQL Representation for Tunisia’s Governorates
Here is the SQL schema and insert statements for all 24 governorates:
sql
-- Table for Tunisia governorates
CREATE TABLE tunisia_governorates (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
code CHAR(3) NOT NULL
);
-- Insert statements for governorates
INSERT INTO tunisia_governorates (name, code) VALUES
('Ariana', 'AR'),
('Beja', 'BJ'),
('Ben Arous', 'BA'),
('Bizerte', 'BZ'),
('Gabès', 'GB'),
('Gafsa', 'GF'),
('Jendouba', 'JD'),
('Kairouan', 'KR'),
('Kasserine', 'KS'),
('Kebili', 'KB'),
('Le Kef', 'KF'),
('Mahdia', 'MH'),
('Manouba', 'MN'),
('Medenine', 'MD'),
('Monastir', 'MO'),
('Nabeul', 'NB'),
('Sfax', 'SF'),
('Sidi Bouzid', 'SB'),
('Siliana', 'SL'),
('Sousse', 'SS'),
('Tataouine', 'TT'),
('Tozeur', 'TZ'),
('Tunis', 'TN'),
('Zaghouan', 'ZG');
This structure is great for applications dealing with geography, government services, logistics, and more in Tunisia.