✅ Enum Representation in Java
Tuvalu is divided into 9 islands (fenua), each of which serves as an administrative region. These islands are often grouped into different councils, and the country is known for its low-lying coral islands in the Pacific Ocean.
Here’s the Java enum
representing these islands with their standard two-letter codes:
java
public enum TuvaluIsland {
FUNAFUTI("01"),
ALAFUATU("02"),
NANUMAGA("03"),
NANUMEABU("04"),
NIULAKI("05"),
NUI("06"),
VAIKOGI("07"),
FUNAFAHIA("08"),
SNUA("09");
private final String code;
TuvaluIsland(String code) {
this.code = code;
}
public String getCode() {
return this.code;
}
}
✅ SQL Representation for Tuvalu’s Islands
Here is the SQL schema and insert statements for the 9 islands of Tuvalu:
sql
-- Table for Tuvalu islands
CREATE TABLE tuvalu_islands (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
code CHAR(2) NOT NULL
);
-- Insert Tuvalu's islands into the table
INSERT INTO tuvalu_islands (name, code) VALUES
('Funafuti', '01'),
('Alafuatu', '02'),
('Nanumaga', '03'),
('Nanumeabu', '04'),
('Niulaki', '05'),
('Nui', '06'),
('Vaikogi', '07'),
('Funafahia', '08'),
('Snua', '09');
This structure is useful for managing the geographic and administrative data of Tuvalu, especially in governance, logistics, or geospatial mapping applications.