🇧🇴 Java Enum: Bolivia’s Departments
Bolivia is divided into 9 departments. Here’s the Java enum using the ISO 3166-2:BO codes.
java
public enum BoliviaDepartment {
LA_PAZ("BO-L"),
COCHABAMBA("BO-C"),
SANTA_CRUZ("BO-SC"),
CHUQUISACA("BO-H"),
TARIJA("BO-T"),
PANDO("BO-P"),
BENI("BO-B"),
POTOSI("BO-POT"),
ORURO("BO-O");
private final String code;
BoliviaDepartment(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
🗃️ SQL Table and Insert Statements
sql
CREATE TABLE bolivia_departments (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(8) NOT NULL UNIQUE
);
INSERT INTO bolivia_departments (name, code) VALUES
('La Paz', 'BO-L'),
('Cochabamba', 'BO-C'),
('Santa Cruz', 'BO-SC'),
('Chuquisaca', 'BO-H'),
('Tarija', 'BO-T'),
('Pando', 'BO-P'),
('Beni', 'BO-B'),
('Potosi', 'BO-POT'),
('Oruro', 'BO-O');
✅ Summary
This setup represents Bolivia’s 9 departments using the ISO 3166-2:BO codes. This structure is useful for handling geographical data, administrative divisions, or region-based processing in your applications.