StringBuffer buff = new StringBuffer();
buff.append("CREATE TABLE " + table.getName() + "(");
for (String key : table.getFields().keySet()) {
Field field = table.getFields().get(key);
buff.append(field.getName() + " char(50),");
}
// Remove the extra comma at the end
if (buff.charAt(buff.length() - 1) == ',') {
buff.substring(0, buff.length() - 1);