code: protected String generateInsertMetadataSql(final CreateSpatialIndexStatement statement,
           final Database database) {
        final StringBuilder sql = new StringBuilder();
        sql.append("INSERT INTO user_sdo_geom_metadata ");
        sql.append("(table_name, column_name, diminfo, srid) ");
        final String tableName = statement.getTableName().trim();
        sql.append("VALUES ('").append(database.correctObjectName(tableName, Table.class));
        final String columnName = statement.getColumns()[0].trim();
        sql.append("', '").append(database.correctObjectName(columnName, Column.class));
        sql.append("', SDO_DIM_ARRAY(");
        sql.append("SDO_DIM_ELEMENT('Longitude', -180, 180, 0.005), ");
        sql.append("SDO_DIM_ELEMENT('Latitude', -90, 90, 0.005))");
        final Integer srid = statement.getSrid();
        if (srid == null) {
           sql.append(", NULL");
        } else {
           sql.append(", ").append(OracleSpatialUtils.EPSG_TO_ORACLE_FUNCTION).append("(")
                 .append(srid).append(")");
        }
        sql.append(")");
        return sql.toString();
     }
docs: Generates the SQL for inserting the necessary record into the
  <code>USER_SDO_GEOM_METADATA</code> table. This record must be present prior to creating the
  spatial index.
  
  @param statement
  the create spatial index statement.
  @param database
  the database instance.
  @return the SQL to insert the metadata record.