发明名称 EFFICIENT SORTING IN A RELATIONAL DATABASE
摘要 The present invention relates to a method, computer program product and system to compute one sorted list of enumeration values in a specific language, read from at least one relational database including at least one data table storing enumeration programming variable values and at least one catalog table storing an expression, in at least one language, of the enumeration programming variable values, said method comprising the steps of receiving a request for providing enumeration variable values including one list sorted in a specific order, of the values of a specific enumeration, in a specific language; then, all the expressions of the enumeration values for the specific language for the specific enumeration read in a corresponding catalog table are sorted in the specific order; if the sorted list of the specific enumeration expression values matches a list of the specific enumeration variable values sorted in the specific order in the same catalog table, the sorted list of enumeration values in a specific language is created from this ordered catalog table; if in the preceding step the match was not found, if the sorted list of the specific enumeration expressions values matches a list of the specific enumeration variable values sorted in the reverse order from the specific order in the same catalog table, the sorted list of enumeration values in a specific language is created from the sorted catalog table; if in any of the two preceding steps, the match was not found, a new table joined table is built from data and catalog table in the standard way.
申请公布号 US2016132544(A1) 申请公布日期 2016.05.12
申请号 US201414896028 申请日期 2014.05.22
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 SCOTTI Alessandro;LAZZARO Luca;LANNI Leonardo;CARTERI Francesco
分类号 G06F17/30 主分类号 G06F17/30
代理机构 代理人
主权项 1. A method to compute a sorted list of enumeration values in a specific language, read from at least one relational database including at least one data table storing enumeration programming variable values and at least one catalog table storing an expression, in at least one language, of the enumeration programming variable values, the method comprising: receiving a request for providing enumeration variable values including one list sorted in a specific order, of the values of a specific enumeration, in a specific language; sorting in the specific order, all the expressions in the specific language corresponding to the variable values of the specific enumeration read in a corresponding catalog table; determining if the sorted list of the specific enumeration expression values matches a list of the specific enumeration variable values sorted in the specific order in the same catalog table, and if so, creating a list of the specific enumeration variable values in the corresponding data table sorted in the specific order, the other requested enumeration variables being in the data table, skipping the following steps; if in the determining step the match was not found, and if the sorted list of the specific enumeration expressions values matches a list of the specific enumeration variable values sorted in the reverse order from the specific order in the same catalog table, creating a list of the specific enumeration variable values in the corresponding data table sorted in the reverse order from the specific order, the other requested enumeration variables being in the data table, skipping the following step; and if in any of the two preceding steps, the match was not found, creating a new table joined with the same catalog table and the data table containing the enumeration variable values and creating a list with the enumeration variable values read in the joined table sorted on the expressions of the specific enumeration variable values in the specific language the other requested enumeration variables being in the joined table.
地址 Armonk NY US