US20050010569A1 - System and method of query transformation - Google Patents

System and method of query transformation Download PDF

Info

Publication number
US20050010569A1
US20050010569A1 US10/856,747 US85674704A US2005010569A1 US 20050010569 A1 US20050010569 A1 US 20050010569A1 US 85674704 A US85674704 A US 85674704A US 2005010569 A1 US2005010569 A1 US 2005010569A1
Authority
US
United States
Prior art keywords
sql
group
query
aggregates
olap
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US10/856,747
Inventor
Michael Styles
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
Cognos Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cognos Inc filed Critical Cognos Inc
Publication of US20050010569A1 publication Critical patent/US20050010569A1/en
Assigned to COGNOS INCORPORATED reassignment COGNOS INCORPORATED ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: STYLES, MICHAEL E.
Assigned to IBM INTERNATIONAL GROUP BV reassignment IBM INTERNATIONAL GROUP BV ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: COGNOS ULC
Assigned to COGNOS ULC reassignment COGNOS ULC CERTIFICATE OF AMALGAMATION Assignors: COGNOS INCORPORATED
Assigned to INTERNATIONAL BUSINESS MACHINES CORPORATION reassignment INTERNATIONAL BUSINESS MACHINES CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: IBM INTERNATIONAL GROUP BV
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24547Optimisations to support specific applications; Extensibility of optimisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/244Grouping and aggregation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/953Organization of data
    • Y10S707/954Relational
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99931Database or file accessing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99931Database or file accessing
    • Y10S707/99933Query processing, i.e. searching
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99931Database or file accessing
    • Y10S707/99933Query processing, i.e. searching
    • Y10S707/99934Query formulation, input preparation, or translation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99931Database or file accessing
    • Y10S707/99933Query processing, i.e. searching
    • Y10S707/99935Query augmenting and refining, e.g. inexact access

Definitions

  • the invention relates generally to data access middleware, and in particular to a system and method of query transformation.
  • a typical data access environment has a multi-tier architecture. For description purposes, it can be separated into three distinct tiers:
  • the web server contains a firewall and one or more gateways. All web communication is performed through a gateway.
  • a gateway is responsible for passing on requests to the application server, in tier 2, for execution.
  • the applications tier contains one or more application servers.
  • the application server runs requests, such as reports and queries that are forwarded by a gateway running on the web server.
  • a query engine which is data access middleware that provides universal data access to a variety of heterogeneous database systems.
  • the query engine formulates queries (typically SQL) and passes them on to the data tier, through a native database API (such as ODBC) for execution.
  • the data tier contains database management systems (DBMS), which manage raw data stored in a database.
  • DBMS database management systems
  • Examples of such systems include Oracle, DB2, and Microsoft SQL Server.
  • a multi-tier architecture can be configured in several different ways, a typical configuration places each tier on a separate computer (server).
  • a database server is typically a “high end” server, and thus can process queries at a relatively fast speed.
  • An application server cannot generally process queries as quickly as a database server.
  • a query engine may generate SQL queries that utilize the SQL/OLAP technology introduced in the SQL-99 standard.
  • a group query transformation system for transforming structured query language group query windowed aggregates.
  • the group query transformation system comprises a group query analysis module for analyzing one or more structured query language (SQL)/on-line analytical programming (OLAP) windowed aggregates that are nor supported by a target database system, and a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • SQL structured query language
  • OLAP on-line analytical programming
  • a method of transforming structured query language (SQL) group query windowed aggregates comprises the steps of analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • SQL structured query language
  • a method of group query transformation comprises the steps of determining if a detailed table is required, traversing an aggregate list and assigning a group index to each aggregate based on the location of a control break in a control break list, determining a detail table T n , traversing the control break list, traversing the select list and analyzing each expression and performing a specific action based on the type of expression encountered, and constructing a final query.
  • a computer data signal embodied in a carrier wave and representing sequences of instructions which, when executed by a processor, cause the processor to perform a method of transforming structured query language (SQL) group query windowed aggregates.
  • the method comprises the steps of analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by The target database system.
  • SQL structured query language
  • a computer-readable medium having computer readable code embodied therein for use in the execution in a computer of a method of transforming structured query language (SQL) group query windowed aggregates.
  • the method comprises the steps of analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates That are not supported by a target database system, and transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • SQL structured query language
  • a computer program product for use in the execution in a computer of a group query transformation system for transforming structured query language (SQL) group windowed aggregates.
  • the computer program product comprises a group query analysis module for analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • OLAP on-line analytical programming
  • FIG. 1 shows a typical data access environment.
  • FIG. 2 shows a group query transformation system, in accordance with an embodiment of the present invention.
  • FIG. 3 shows in a flowchart an example of a method of a group query transformation, in accordance with the group query transformation system.
  • FIG. 4 shows in a flowchart another example of a method of group query transformation, in accordance with an embodiment of the group query transformation system.
  • FIG. 5 shows in a flowchart another example of a method of group query transformation, in accordance with an embodiment of the group query transformation system.
  • FIG. 1 shows a typical data access environment 10 for processing data.
  • data is stored in a database 11 .
  • a DBMS running on a database server 12 accesses the raw data stored in the database 11 .
  • a query engine 15 running on a report server (or application server) 13 is used to generate reports on the raw data and instruct the DBMS on the database server 12 to obtain information pertaining to the raw data in the database 11 .
  • the query engine 15 provides universal data access to a variety of heterogeneous database Systems.
  • An end user uses a client application 14 , running on a client workstation, to facilitate application server 13 operations.
  • a query engine 15 In order to solve many business questions, a query engine 15 generates SQL queries that utilize the SQL/online analytical programming (OLAP) technology introduced in the SQL-99 standard. These SQL queries include SQL/OLAP functions (windowed aggregates). However, many database systems 12 do not support this technology. In order to prevent or reduce the amount of local (application server) processing required to process these types of queries, the query engine 15 attempts to generate semantically equivalent queries that can be processed on the database server 12 by the target database system. These semantically equivalent queries include standard aggregate functions and the GROUP BY operator.
  • OLAP online analytical programming
  • FIG. 2 shows a group query transformation system 20 , in accordance with an embodiment of the present invention.
  • the group query transformation system 20 comprises a group query analysis module 21 for analyzing SQL/OLAP windowed aggregates that are not supported by a target database system, and a group query transformation module 22 for transforming SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • the group query transformation system 20 is implemented as a sub-system of the query engine 15 in the data access environment 10 .
  • This transformation 20 may generate queries that can be processed in their entirety on the database server 12 , or queries that require processing on both the application server 13 and the database server 12 .
  • the group query transformation system 20 reduces processing that might otherwise be required on the application server by generating a semantically equivalent query, thereby improving performance in many cases. Furthermore, the group query transformation system 20 takes advantage of functionality provided by the target database. In particular, the group query system 20 utilizes the functionality provided by standard aggregates and the GROUP BY operator.
  • Another advantage is that performing SQL group query transformation may eliminate any processing that may be required on the report server 13 , since the group query transformation system 20 could end up generating a single query in the event that all SQL/OLAP functions map to a single aggregate.
  • Framed OLAP functions contain a window frame specification (ROWS or RANGE) and an ORDER BY clause. Through window frames, capabilities such as cumulative (running) sums and moving averages can be supported. Report functions do not contain a window frame specification, and produce the same value for each row in a partition.
  • the group query transformation of a SQL-99 query involves mapping windowed OLAP functions into a semantically equivalent query involving derived tables and the standard GROUP BY clause.
  • FIG. 3 shows a flowchart of an example of a method of SQL group transformation ( 30 ), in accordance with an embodiment of the group query transformation system 20 .
  • the method ( 30 ) begins with analysing a query containing a group query that is not supported by a target database system ( 31 ). Next, the query is transformed into a semantically equivalent query that is supported by the target database system ( 32 ). The method ( 30 ) is done ( 33 ).
  • FIG. 4 shows in a flowchart an example of a method of SQL group transformation ( 40 ), in accordance with an embodiment of the group query transformation system 20 .
  • the method ( 40 ) begins with analyzing a group query select list to determine if transformations can be performed ( 41 ).
  • a select list is a group of one or more expressions that define the required information for a particular query. If transformations cannot be performed ( 42 ), the method ( 40 ) is done ( 47 ). If a transformation is to be performed ( 42 ), a number of derived tables required is determined based upon a number of partitions (or control breaks) ( 43 ).
  • a control break is a set of columns over which a particular OLAP function is computed.
  • a partition is a set of rows that have the same value for columns that make up the control break.
  • the derived tables are created and grouping columns are added to an appropriate derived table select list ( 44 ).
  • a WHERE clause is generated based upon partitions and nullability of grouping columns ( 45 ).
  • the group query select list is traversed and candidate aggregates are converted and moved into appropriate derived table select lists ( 46 ). The method is done ( 47 ).
  • each unique control break represents a separate derived table in the transformed query, and all functions with the same control break appear in the same derived table.
  • the derived tables are then joined based on the columns that make up the longest (most columns) control break.
  • This analysis includes assigning a group index and keeping track of control breaks (or partitions).
  • the group index indicates whether the aggregate is eligible for transformation. Any aggregate assigned a group index of ⁇ 1 is not eligible.
  • Control break information is stored in an ordered list, with control breaks having the fewest number of columns (least amount of detail) appearing first. Each unique control break represents a separate derived table in the transformed query.
  • Report aggregates (MIN, MAX, SUM, AVG, COUNT, and COUNT(*)) are eligible for transformation, based on meeting certain criteria. A count of these aggregates (nSqlGroupAggrs) is maintained. This count is not incremented if a group index of ⁇ 1 is assigned. Framed aggregates are not eligible for transformation.
  • a group index of ⁇ 1 is assigned to report aggregates of the form:
  • the group index assigned to the aggregate is positive (>0) and based on the control break. All aggregates with an identical control break are assigned the same group index.
  • this analysis phase determines a level of optimization.
  • Level 1 optimization requires an additional derived table to be constructed to retrieve detail information, whereas Level 2 optimization does not require this additional derived table.
  • target database for each example does not support the SQL/OLAP technology introduced in the SQL-99 standard.
  • the native SQL shown in each example is the SQL passed to the target database.
  • the target database can process the transformed query in its entirety.
  • the original query contains OLAP SUM functions computed over the partitions ( ), (SNO), and (SNO, PNO), with all detail information retained.
  • Derived table T0 computes the overall sum
  • derived table T1 computes a sum for the (SNO) group
  • derived table T2 computes a sum for the (SNO, PNO) group
  • derived table T3 retrieves all detail information.
  • the target database can process the transformed query in its entirety. Note that with the presence of the DISTINCT keyword, one less derived table is generated since detail information is not required (this is an optimization performed by the query transformation).
  • Derived table T0 computes the overall sum
  • derived table T1 computes a sum for the (SNO) group
  • derived table T2 computes a sum for the (SNO, PNO) group. This corresponds to Level 2 optimization.
  • the target database cannot process the transformed query in its entirety due to the presence of the RANK OLAP function.
  • the SQL server does not support this function and it cannot be transformed into a standard aggregate specification.
  • the original query is similar to that in Example 1, except for the RANK function being specified.
  • Four derived tables are required which are identical to those generated for Example 1, except That derived table T3 contains the additional detail column QTY in the select list which is required to compute the RANK function (this OLAP function does not have a corresponding aggregate function). This corresponds to Level 1 optimization.
  • the systems and methods according to the present invention may be implemented by any hardware, software or a combination of hardware and software having the above-described functions.
  • the software code either in its entirety or a part thereof, may be stored in a computer readable memory.
  • a computer data signal representing the software code that may be embedded in a carrier wave may be transmitted via a communication network.
  • Such a computer readable memory and a computer data signal are also within the scope of the present invention, as well as the hardware, software and the combination thereof.

Abstract

A group query transformation system for Transforming structured query language group query windowed aggregates is provided. The group query transformation system comprises a group query analysis module for analyzing one or more structured query language (SQL)/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.

Description

    FIELD OF THE INVENTION
  • The invention relates generally to data access middleware, and in particular to a system and method of query transformation.
  • BACKGROUND OF THE INVENTION
  • A typical data access environment has a multi-tier architecture. For description purposes, it can be separated into three distinct tiers:
      • Web server
      • Applications
      • Data
        The tiers are based on business function, and are typically separated by firewalls. Client software, such as a browser or a report-authoring tool, sits above the tiers.
  • The web server contains a firewall and one or more gateways. All web communication is performed through a gateway. A gateway is responsible for passing on requests to the application server, in tier 2, for execution.
  • The applications tier contains one or more application servers. The application server runs requests, such as reports and queries that are forwarded by a gateway running on the web server. Typically, one of the components of the applications tier is a query engine, which is data access middleware that provides universal data access to a variety of heterogeneous database systems. The query engine formulates queries (typically SQL) and passes them on to the data tier, through a native database API (such as ODBC) for execution.
  • The data tier contains database management systems (DBMS), which manage raw data stored in a database. Examples of such systems include Oracle, DB2, and Microsoft SQL Server.
  • Although a multi-tier architecture can be configured in several different ways, a typical configuration places each tier on a separate computer (server). A database server is typically a “high end” server, and thus can process queries at a relatively fast speed. An application server cannot generally process queries as quickly as a database server.
  • In order to solve many business questions, a query engine may generate SQL queries that utilize the SQL/OLAP technology introduced in the SQL-99 standard.
  • However, many database systems do not support this technology. Thus, the SQL queries would have to be performed on the report server that is generally slower than the database server. It is desirable to have as much processing performed on the database server.
  • There is a need to prevent or reduce the amount of local (application server) processing required to process a query. In the past, the application would be responsible for generating separate SQL queries involving the GROUP BY operator to compute aggregates over different partitions and stitching together the results. Quite often, this is quite difficult since it involves multiple queries and post processing.
  • One way of overcoming this problem is for the query engine to generate separate GROUP BY queries for aggregates computed over different partitions, generate a separate query to retrieve detail information, and then stitch together the results to produce the desired report. Unfortunately, this problem requires processing time on the report server. It is desirable to have a way of transferring the SQL queries to the database server with minimal processing on the report server.
  • SUMMARY OF THE INVENTION
  • It is an object of the present invention to provide a method of structured query language group query transformation in a database system that does not support SQL-99 standard.
  • In accordance with an embodiment of the present invention, there is provided a group query transformation system for transforming structured query language group query windowed aggregates. The group query transformation system comprises a group query analysis module for analyzing one or more structured query language (SQL)/on-line analytical programming (OLAP) windowed aggregates that are nor supported by a target database system, and a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • In accordance with another embodiment of the present invention, there is provided a method of transforming structured query language (SQL) group query windowed aggregates. The method comprises the steps of analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • In accordance with another embodiment of the present invention, there is provided a method of group query transformation. The method comprises the steps of determining if a detailed table is required, traversing an aggregate list and assigning a group index to each aggregate based on the location of a control break in a control break list, determining a detail table Tn, traversing the control break list, traversing the select list and analyzing each expression and performing a specific action based on the type of expression encountered, and constructing a final query. For each control break in the control break list, the columns in the control break are added to a select list of a derived table, and for each column in the control break, a join condition of the fonn
    Tn.Cj-Ti.Cj OR (Tn.Cj IS NULL AND Ti.Cj IS NULL)
    is constructed.
  • In accordance with another embodiment of the present invention, there is provided a computer data signal embodied in a carrier wave and representing sequences of instructions which, when executed by a processor, cause the processor to perform a method of transforming structured query language (SQL) group query windowed aggregates. The method comprises the steps of analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by The target database system.
  • In accordance with another embodiment of the present invention, there is provided a computer-readable medium having computer readable code embodied therein for use in the execution in a computer of a method of transforming structured query language (SQL) group query windowed aggregates. The method comprises the steps of analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates That are not supported by a target database system, and transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • In accordance with another embodiment of the present invention, there is provided a computer program product for use in the execution in a computer of a group query transformation system for transforming structured query language (SQL) group windowed aggregates. The computer program product comprises a group query analysis module for analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system, and a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 shows a typical data access environment.
  • FIG. 2 shows a group query transformation system, in accordance with an embodiment of the present invention.
  • FIG. 3 shows in a flowchart an example of a method of a group query transformation, in accordance with the group query transformation system.
  • FIG. 4 shows in a flowchart another example of a method of group query transformation, in accordance with an embodiment of the group query transformation system.
  • FIG. 5 shows in a flowchart another example of a method of group query transformation, in accordance with an embodiment of the group query transformation system.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
  • FIG. 1 shows a typical data access environment 10 for processing data. Typically, data is stored in a database 11. A DBMS running on a database server 12 accesses the raw data stored in the database 11. A query engine 15, running on a report server (or application server) 13 is used to generate reports on the raw data and instruct the DBMS on the database server 12 to obtain information pertaining to the raw data in the database 11. The query engine 15 provides universal data access to a variety of heterogeneous database Systems. An end user uses a client application 14, running on a client workstation, to facilitate application server 13 operations.
  • In order to solve many business questions, a query engine 15 generates SQL queries that utilize the SQL/online analytical programming (OLAP) technology introduced in the SQL-99 standard. These SQL queries include SQL/OLAP functions (windowed aggregates). However, many database systems 12 do not support this technology. In order to prevent or reduce the amount of local (application server) processing required to process these types of queries, the query engine 15 attempts to generate semantically equivalent queries that can be processed on the database server 12 by the target database system. These semantically equivalent queries include standard aggregate functions and the GROUP BY operator.
  • FIG. 2 shows a group query transformation system 20, in accordance with an embodiment of the present invention. The group query transformation system 20 comprises a group query analysis module 21 for analyzing SQL/OLAP windowed aggregates that are not supported by a target database system, and a group query transformation module 22 for transforming SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
  • The group query transformation system 20 is implemented as a sub-system of the query engine 15 in the data access environment 10. This transformation 20 may generate queries that can be processed in their entirety on the database server 12, or queries that require processing on both the application server 13 and the database server 12.
  • Advantageously, the group query transformation system 20 reduces processing that might otherwise be required on the application server by generating a semantically equivalent query, thereby improving performance in many cases. Furthermore, the group query transformation system 20 takes advantage of functionality provided by the target database. In particular, the group query system 20 utilizes the functionality provided by standard aggregates and the GROUP BY operator.
  • Another advantage is that performing SQL group query transformation may eliminate any processing that may be required on the report server 13, since the group query transformation system 20 could end up generating a single query in the event that all SQL/OLAP functions map to a single aggregate.
  • There are two types of OLAP functions: framed functions and report functions. Framed OLAP functions contain a window frame specification (ROWS or RANGE) and an ORDER BY clause. Through window frames, capabilities such as cumulative (running) sums and moving averages can be supported. Report functions do not contain a window frame specification, and produce the same value for each row in a partition.
  • The group query transformation of a SQL-99 query involves mapping windowed OLAP functions into a semantically equivalent query involving derived tables and the standard GROUP BY clause.
  • FIG. 3 shows a flowchart of an example of a method of SQL group transformation (30), in accordance with an embodiment of the group query transformation system 20. The method (30) begins with analysing a query containing a group query that is not supported by a target database system (31). Next, the query is transformed into a semantically equivalent query that is supported by the target database system (32). The method (30) is done (33).
  • FIG. 4 shows in a flowchart an example of a method of SQL group transformation (40), in accordance with an embodiment of the group query transformation system 20. The method (40) begins with analyzing a group query select list to determine if transformations can be performed (41). A select list is a group of one or more expressions that define the required information for a particular query. If transformations cannot be performed (42), the method (40) is done (47). If a transformation is to be performed (42), a number of derived tables required is determined based upon a number of partitions (or control breaks) (43). A control break is a set of columns over which a particular OLAP function is computed. A partition is a set of rows that have the same value for columns that make up the control break. The derived tables are created and grouping columns are added to an appropriate derived table select list (44). A WHERE clause is generated based upon partitions and nullability of grouping columns (45). The group query select list is traversed and candidate aggregates are converted and moved into appropriate derived table select lists (46). The method is done (47).
  • As described above, the original query is first analyzed to determine what SQL/OLAP functions are present, which of these functions can be mapped to standard aggregates (MIN, MAX, SUM, AVG, COUNT, COUNT(*)), and what control breaks (partitions) exist (41). Each unique control break represents a separate derived table in the transformed query, and all functions with the same control break appear in the same derived table. The derived tables are then joined based on the columns that make up the longest (most columns) control break.
  • To determine if the transformation can be performed, all aggregates in the select list are analyzed. This analysis includes assigning a group index and keeping track of control breaks (or partitions). The group index indicates whether the aggregate is eligible for transformation. Any aggregate assigned a group index of −1 is not eligible. Control break information is stored in an ordered list, with control breaks having the fewest number of columns (least amount of detail) appearing first. Each unique control break represents a separate derived table in the transformed query.
  • Report aggregates (MIN, MAX, SUM, AVG, COUNT, and COUNT(*)) are eligible for transformation, based on meeting certain criteria. A count of these aggregates (nSqlGroupAggrs) is maintained. This count is not incremented if a group index of −1 is assigned. Framed aggregates are not eligible for transformation.
  • A group index of −1 is assigned to report aggregates of the form:
    • AGG( C0) OVER (AT C1, C2, . . . , Cm PARTITION BY C1, C2, . . . , Cn), where m<n or m>(n+1).
    • AGG(C0) OVER ( AT C1, C2, . . . Cm), where m>1.
    • AGG( C0) OVER ( AT C1), where C1≠C0.
    • AGG(C0) OVER ( AT C1, C2, . . . , Cm PARTION By C1, C2, . . . , Cn), where m=(n+1) , and Cm≠C0.
  • Otherwise, the group index assigned to the aggregate is positive (>0) and based on the control break. All aggregates with an identical control break are assigned the same group index.
  • The following table gives examples of aggregates that are not eligible for transformation, as well as aggregates that are eligible for transformation.
    Not Eligible
    SUM( QTY ) OVER ( AT SNO PARTITION BY SNO, PNO )
    SUM( QTY ) OVER ( AT SNO, PNO, JNO FOR SNO )
    SUM( QTY ) OVER ( AT SNO, PNO )
    SUM( QTY ) OVER ( AT SNO )
    SUM( QTY ) OVER ( AT SNO, PNO PARTITION BY SNO )
    Eligible
    SUM( QTY ) OVER ( )
    SUM( QTY ) OVER ( AT QTY )
    SUM( QTY ) OVER ( AT SNO, QTY PARTITION BY SNO )
  • In addition to assigning a group index to all aggregates in the select list of the original query, this analysis phase determines a level of optimization. Level 1 optimization requires an additional derived table to be constructed to retrieve detail information, whereas Level 2 optimization does not require this additional derived table.
  • Level 1:
  • To achieve Level 1 optimization, each of the following conditions must be met:
      • 1. All aggregates are assigned a positive (>0) group index.
      • 2. All aggregate control breaks are compatible.
      • 3. The total number of unique control breaks is equal to 1 or there are no aggregates in the select list that has a compute break (AT clause).
        Level 2:
        To achieve Level 2 optimization, each of the following conditions must be met:
      • 1. Level 1 optimization is possible.
      • 2. DISTINCT was specified or GROUP BY was specified and the group list is compatible with the longest control break.
      • 3. Any simple column referenced in the select list is part of the grouping list.
        FIG. 5 shows in a flowchart another example of a method of group query transformation (50), in accordance with an embodiment of the group query transformation system 20. The basic steps in performing the transformation are as follows:
      • 1. Determine if a detail table is required (51) based on the level of optimization.
      • 2. Traverse the aggregate list, assigning a group index to each aggregate based on the location of its control break in the control break list (52). This index identifies the derived table into which the aggregate is moved.
      • 3. Determine the detail table Tn (53). This is the table on which all join conditions are based.
      • 4. Traverse the control break list (54), and for each control break i (55), perform the following:
        • a. Add all columns in the control break to the select list of the derived table T1 (56).
        • b. For each column j in the control break, construct a join condition of the form Tn.Cj=TrCj OR (Tn.Cj IS NULL AND Tr Cj IS NULL), where Tn, is the detail table (57).
      • 5. Traverse the select list (58), analyze each expression and perform a specific action based on the type of expression encountered:
        • a. If the expression is an aggregate (59), convert the aggregate to its standard form and move it to the select list of the derived table identified by its group index (60).
        • b. Traverse all other expressions to determine if:
          • i. The expression is supported by the target database (61).
          • ii. All aggregates in the expression have the same (positive) group index (62).
          • iii. No other detail information is being referenced (63).
        • If these conditions are met, all aggregates in the expression are converted to their standard form, and the expression is moved to the select list of the derived table identified by the group index (64).
      • 6. Construct the final query (65). The final query is consists of a simple join between all of the generated derived tables based on the condition constructed in step 4.
  • For the purpose of The following examples, assume the target database for each example does not support the SQL/OLAP technology introduced in the SQL-99 standard. The native SQL shown in each example is the SQL passed to the target database.
  • EXAMPLE 1
  • In this example, the target database can process the transformed query in its entirety.
  • Original Query
    SELECT SNO, PNO, SUM( QTY ) OVER ( ),
    SUM( QTY ) OVER ( PARTITION BY SNO ),
    SUM( QTY ) OVER ( PARTITION BY SNO, PNO )
    FROM SUPPLY
  • Transformed Query
    SELECT T3.C0,T3.C1,T0.C0,T1.C1,T2.C2
    FROM ( SELECT SUM( QTY ) C0
    FROM SUPPLY ) T0,
    ( SELECT SNO C0, SUM( QTY ) C1
    FROM SUPPLY
    GROUP BY SNO ) T1,
    ( SELECT SNO C0, PNO C1, SUM( QTY ) C2
    FROM SUPPLY
    GROUP BY SNO, PNO ) T2,
    ( SELECT SNO C0, PNO C1
    FROM SUPPLY ) T3
    WHERE ( T3.C0 = T1.C0 OR
    ( T3.C0 IS NULL AND T1.C0 IS NULL ))
    AND ( T3.C0 = T2.C0 OR
    ( T3.C0 IS NULL AND T2.C0 IS NULL ))
    AND ( T3.C1 = T2.C1 OR
    ( T3.C1 IS NULL AND T2.C1 IS NULL ))
  • Native SQL
    SELECT T3.C0, T3.C1, T0.C0, T1.C1, T2.C2
    FROM ( SELECT SUM( QTY ) C0
    FROM SUPPLY ) T0,
    ( SELECT SNO C0, SUM( QTY ) C1
    FROM SUPPLY
    GROUP BY SNO ) T1,
    ( SELECT SNO C0, PNO C1, SUM( QTY ) C2
    FROM SUPPLY
    GROUP BY SNO, PNO ) T2,
    ( SELECT SNO C0, PNO C1
    FROM SUPPLY ) T3
    WHERE ( T3.C0 = T1.C0 OR
    ( T3.C0 IS NULL AND T1.C0 IS NULL ))
    AND ( T3.C0 = T2.C0 OR
    ( T3.C0 IS NULL AND T2.C0 IS NULL ))
    AND ( T3.C1 = T2.C1 OR
    ( T3.C1 IS NULL AND T2.C1 IS NULL ))

    Explanation
  • The original query contains OLAP SUM functions computed over the partitions ( ), (SNO), and (SNO, PNO), with all detail information retained. Hence, four derived tables are required: Derived table T0 computes the overall sum, derived table T1 computes a sum for the (SNO) group, derived table T2 computes a sum for the (SNO, PNO) group, and finally, derived table T3 retrieves all detail information. These tables are then joined based on the grouping columns. When generating the WHERE clause, tie algorithm must take into consideration whether or not a particular grouping column allows NULL values. In This example, it is assumed that all of the grouping columns allow null values. This corresponds to Level 1 optimization.
  • EXAMPLE 2
  • In this example, the target database can process the transformed query in its entirety. Note that with the presence of the DISTINCT keyword, one less derived table is generated since detail information is not required (this is an optimization performed by the query transformation).
  • Original Query
    SELECT DISTINCT SNO, PNO,
    SUM( QTY ) OVER ( ),
    SUM( QTY ) OVER ( PARTITION BY SNO ),
    SUM( QTY ) OVER ( PARTITION BY SNO, PNO )
    FROM SUPPLY
  • Transformed Query
    SELECT T2.C0, T2.C1, T0.C0, T1.C1, T2.C2
    FROM ( SELECT SUM( QTY ) C0
    FROM SUPPLY ) T0,
    ( SELECT SNO C0, SUM( QTY ) C1
    FROM SUPPLY
    GROUP BY SNO ) T1,
    ( SELECT SNO C0, PNO C1, SUM( QTY ) C2
    FROM SUPPLY
    GROUP BY SNO, PNO ) T2
    WHERE ( T2.C0 = T1.C0 OR
    ( T2.C0 IS NULL AND T1.C0 IS NULL ))
  • Native SQL
    SELECT T2.C0, T2.C1, T0.C0, T1.C1, T2.C2
    FROM ( SELECT SUM( QTY ) C0
    FROM SUPPLY ) T0,
    ( SELECT SNO C0, SUM( QTY ) C1
    FROM SUPPLY
    GROUP BY SNO ) T1,
    ( SELECT SNO C0, PNO C1, SUM( QTY ) C2
    FROM SUPPLY
    GROUP BY SNO, PNO ) T2
    WHERE ( T2.C0 = T1.C0 OR
    ( T2.C0 IS NULL AND T1.C0 IS NULL ))

    Explanation
  • The original query is identical to that in Example 1, except that DISTINCT is specified. Hence, only three derived tables are required, since detail information is not being retained. Derived table T0 computes the overall sum, derived table T1 computes a sum for the (SNO) group, and derived table T2 computes a sum for the (SNO, PNO) group. This corresponds to Level 2 optimization.
  • EXAMPLE 3
  • In this example, the target database cannot process the transformed query in its entirety due to the presence of the RANK OLAP function. The SQL server does not support this function and it cannot be transformed into a standard aggregate specification.
  • Original Query
    SELECT SNO, PNO,
    SUM( QTY ) OVER ( ),
    SUM( QTY ) OVER ( PARTITION BY SNO ),
    SUM( QTY ) OVER ( PARTITION BY SNO, PNO ),
    RANK( ) OVER ( ORDER BY QTY DESC )
    FROM SUPPLY
  • Transformed Query
    SELECT T3.C0, T3.C1, T0.C0, C4, T1.C1, T2.C2,
    RANK( ) OVER ( ORDER BY T3.C2 DESC )
    FROM ( SELECT SUM( QTY ) C0
    FROM SUPPLY ) T0,
    ( SELECT SNO C0, SUM( QTY ) C1
    FROM SUPPLY
    GROUP BY SNO ) T1,
    ( SELECT SNO C0, PNO C1, SUM( QTY ) C2
    FROM SUPPLY
    GROUP BY SNO, PNO ) T2,
    ( SELECT SNO C0, PNO C1, QTY C2
    FROM SUPPLY ) T3
    WHERE ( T3.C0 = T1.C0 OR
    ( T3.C0 IS NULL AND T1.C0 IS NULL ))
    AND ( T3.C0 = T2.C0 OR
    ( T3.C0 IS NULL AND T2.C0 IS NULL ))
    AND ( T3.C1 = T2.C1 OR
    ( T3.C1 IS NULL AND T2.C1 IS NULL )) ) D1
  • Native SQL
    SELECT T3.C0, T3.C1, T0.C0, C4, T1.C1, T2.C2, T3.C2
    FROM ( SELECT SUM( QTY ) C0
    FROM SUPPLY ) T0,
    ( SELECT SNO C0, SUM( QTY ) C1
    FROM SUPPLY
    GROUP BY SNO ) T1,
    ( SELECT SNO C0, PNO C1, SUM( QTY ) C2
    FROM SUPPLY
    GROUP BY SNO, PNO ) T2,
    ( SELECT SNO C0, PNO C1, QTY C2
    FROM SUPPLY ) T3
    WHERE ( T3.C0 = T1.C0 OR
    ( T3.C0 IS NULL AND T1.C0 IS NULL ))
    AND ( T3.C0 = T2.C0 OR
    ( T3.C0 IS NULL AND T2.C0 IS NULL ))
    AND ( T3.C1 = T2.C1 OR
    ( T3.C1 IS NULL AND T2.C1 IS NULL ))
    ORDER BY T3.C2

    Explanation
  • The original query is similar to that in Example 1, except for the RANK function being specified. Four derived tables are required which are identical to those generated for Example 1, except That derived table T3 contains the additional detail column QTY in the select list which is required to compute the RANK function (this OLAP function does not have a corresponding aggregate function). This corresponds to Level 1 optimization.
  • The systems and methods according to the present invention may be implemented by any hardware, software or a combination of hardware and software having the above-described functions. The software code, either in its entirety or a part thereof, may be stored in a computer readable memory. Further, a computer data signal representing the software code that may be embedded in a carrier wave may be transmitted via a communication network. Such a computer readable memory and a computer data signal are also within the scope of the present invention, as well as the hardware, software and the combination thereof.
  • While particular embodiments of the present invention have been shown and described, changes and modifications may be made to such embodiments without departing from the true scope of the invention.

Claims (10)

1. A group query transformation system for transforming structured query language group query windowed aggregates, the system comprising:
a group query analysis module for analyzing one or more structured query language (SQL)/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system; and
a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
2. A method of transforming structured query language (SQL) group query windowed aggregates, the method comprising the steps of;
analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system; and
transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
3. The method as claimed in claim 2, wherein the step of analyzing includes the steps of:
determining if a transformation is to be performed; and
determining the number of derived tables required based upon the number of control breaks.
4. The method as claimed in claim 3, wherein the step of determining if a transformation is to be performed comprises the steps of:
assigning a group index; and
tracking control breaks.
5. The method as claimed in claim 2, wherein the step of transforming includes the steps of:
generating the derived tables;
adding grouping columns to derived table select lists;
generating a WHERE clause based upon control breaks and nullability of grouping columns;
traversing a group query select list; and
converting and moving candidate aggregates into the derived table select lists.
6. The method as claimed in claim 5, wherein the WHERE clause is of the form
T1.C1=T2.C1 or (T1.C1 IS NULL and T2.C1 IS NULL) AND . . . if grouping columns are nullable.
7. A method of group query transformation, the method comprising the steps of:
determining if a detailed table is required;
traversing an aggregate list and assigning a group index to each aggregate based on the location of a control break in a control break list;
determining a derail table Tn;
traversing the control break list and for each control break in the control break list:
adding all columns in the control break to a select list of a derived table; and
for each column in the control break, constructing a join condition of the form Tn.Cj-T1.Cj OR (Tn.Cj IS NULL AND Ti.Cj IS NULL);
traversing the select list and analyzing each expression and performing a specific action based on the type of expression encountered; and
constructing a final query.
8. A computer data signal embodied in a carrier wave and representing sequences of instructions which, when executed by a processor, cause the processor to perform a method of transforming structured query language (SQL) group query windowed aggregates, the method comprising the steps of:
analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system; and
transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
9. A computer-readable medium having computer readable code embodied therein for use in the execution in a computer of a method of transforming structured query language (SQL) group query windowed aggregates, the method comprising the steps of:
analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system; and
transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
10. A computer program product for use in the execution in a computer of a group query transformation system for transforming structured query language (SQL) group windowed aggregates, the computer program product comprising:
a group query analysis module for analyzing one or more SQL/on-line analytical programming (OLAP) windowed aggregates that are not supported by a target database system; and
a group query transformation module for transforming the one or more SQL/OLAP windowed aggregates into semantically equivalent standard aggregate functions that are supported by the target database system.
US10/856,747 2003-05-27 2004-05-27 System and method of query transformation Abandoned US20050010569A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CA2,429,910 2003-05-27
CA002429910A CA2429910A1 (en) 2003-05-27 2003-05-27 System and method of query transformation

Publications (1)

Publication Number Publication Date
US20050010569A1 true US20050010569A1 (en) 2005-01-13

Family

ID=33102849

Family Applications (7)

Application Number Title Priority Date Filing Date
US10/856,306 Active 2025-04-29 US7428532B2 (en) 2003-05-27 2004-05-27 System and method of client server aggregate transformation
US10/856,748 Abandoned US20050010570A1 (en) 2003-05-27 2004-05-27 System and method of query transformation
US10/855,078 Active 2025-09-02 US7318058B2 (en) 2003-05-27 2004-05-27 System and method of processing queries
US10/856,747 Abandoned US20050010569A1 (en) 2003-05-27 2004-05-27 System and method of query transformation
US10/856,305 Active 2030-03-08 US8676821B2 (en) 2003-05-27 2004-05-27 Summary filter transformation
US10/854,638 Active 2025-12-26 US7765222B2 (en) 2003-05-27 2004-05-27 Query transformation
US12/283,194 Expired - Fee Related US8108415B2 (en) 2003-05-27 2008-09-09 Query transformation

Family Applications Before (3)

Application Number Title Priority Date Filing Date
US10/856,306 Active 2025-04-29 US7428532B2 (en) 2003-05-27 2004-05-27 System and method of client server aggregate transformation
US10/856,748 Abandoned US20050010570A1 (en) 2003-05-27 2004-05-27 System and method of query transformation
US10/855,078 Active 2025-09-02 US7318058B2 (en) 2003-05-27 2004-05-27 System and method of processing queries

Family Applications After (3)

Application Number Title Priority Date Filing Date
US10/856,305 Active 2030-03-08 US8676821B2 (en) 2003-05-27 2004-05-27 Summary filter transformation
US10/854,638 Active 2025-12-26 US7765222B2 (en) 2003-05-27 2004-05-27 Query transformation
US12/283,194 Expired - Fee Related US8108415B2 (en) 2003-05-27 2008-09-09 Query transformation

Country Status (3)

Country Link
US (7) US7428532B2 (en)
EP (5) EP1482426A3 (en)
CA (1) CA2429910A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010570A1 (en) * 2003-05-27 2005-01-13 Cognos Incorporated System and method of query transformation
US20070299837A1 (en) * 2006-06-22 2007-12-27 International Business Machines Corporation Data Processing Method and System Based on Networked Relational Dimension
US8498996B2 (en) 2008-11-03 2013-07-30 Sas Institute Inc. Computer-implemented method and system for handling and transforming database queries in a fourth generation language
US20160140175A1 (en) * 2014-11-13 2016-05-19 Christoph Weyerhaeuser Integration of calculation models into sql layer
CN107193957A (en) * 2017-05-23 2017-09-22 努比亚技术有限公司 Generation method, terminal and the computer-readable recording medium of SQL

Families Citing this family (55)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7729789B2 (en) 2004-05-04 2010-06-01 Fisher-Rosemount Systems, Inc. Process plant monitoring based on multivariate statistical analysis and on-line process simulation
CA2510644A1 (en) * 2005-06-23 2006-12-23 Cognos Incorporated Quality of service feedback for technology-neutral data reporting
US20070074112A1 (en) * 2005-09-23 2007-03-29 Business Objects Apparatus and method for consolidating reporting formulas
US7464084B2 (en) * 2006-01-30 2008-12-09 International Business Machines Corporation Method for performing an inexact query transformation in a heterogeneous environment
US20080065590A1 (en) * 2006-09-07 2008-03-13 Microsoft Corporation Lightweight query processing over in-memory data structures
US9740735B2 (en) * 2007-11-07 2017-08-22 Microsoft Technology Licensing, Llc Programming language extensions in structured queries
US8694060B2 (en) * 2008-06-17 2014-04-08 Rosemount Inc. Form factor and electromagnetic interference protection for process device wireless adapters
US20090319501A1 (en) * 2008-06-24 2009-12-24 Microsoft Corporation Translation of streaming queries into sql queries
US9910892B2 (en) 2008-07-05 2018-03-06 Hewlett Packard Enterprise Development Lp Managing execution of database queries
US20100082599A1 (en) * 2008-09-30 2010-04-01 Goetz Graefe Characterizing Queries To Predict Execution In A Database
US20100241893A1 (en) 2009-03-18 2010-09-23 Eric Friedman Interpretation and execution of a customizable database request using an extensible computer process and an available computing environment
US9665620B2 (en) 2010-01-15 2017-05-30 Ab Initio Technology Llc Managing data queries
US20120215810A1 (en) * 2011-02-11 2012-08-23 Prometheus Research, LLC Database query mechanism using links as an aggregate base
US9116955B2 (en) 2011-05-02 2015-08-25 Ab Initio Technology Llc Managing data queries
US9576046B2 (en) 2011-11-16 2017-02-21 Ptc Inc. Methods for integrating semantic search, query, and analysis across heterogeneous data types and devices thereof
US9098312B2 (en) 2011-11-16 2015-08-04 Ptc Inc. Methods for dynamically generating an application interface for a modeled entity and devices thereof
US8909641B2 (en) 2011-11-16 2014-12-09 Ptc Inc. Method for analyzing time series activity streams and devices thereof
US9582539B1 (en) * 2012-05-04 2017-02-28 Paraccel, Inc. Optimizing database queries using reusable subqueries
EP2973047A4 (en) 2013-03-15 2016-11-02 Ptc Inc Methods for managing applications using semantic modeling and tagging and devices thereof
US9575819B2 (en) 2013-09-06 2017-02-21 Sap Se Local buffers for event handlers
US9619552B2 (en) 2013-09-06 2017-04-11 Sap Se Core data services extensibility for entity-relationship models
US9430523B2 (en) 2013-09-06 2016-08-30 Sap Se Entity-relationship model extensions using annotations
US9639572B2 (en) 2013-09-06 2017-05-02 Sap Se SQL enhancements simplifying database querying
US9354948B2 (en) 2013-09-06 2016-05-31 Sap Se Data models containing host language embedded constraints
US9176801B2 (en) 2013-09-06 2015-11-03 Sap Se Advanced data models containing declarative and programmatic constraints
US9361407B2 (en) 2013-09-06 2016-06-07 Sap Se SQL extended with transient fields for calculation expressions in enhanced data models
US9442977B2 (en) 2013-09-06 2016-09-13 Sap Se Database language extended to accommodate entity-relationship models
JP6454706B2 (en) 2013-12-06 2019-01-16 アビニシオ テクノロジー エルエルシー Source code conversion
US9350812B2 (en) 2014-03-21 2016-05-24 Ptc Inc. System and method of message routing using name-based identifier in a distributed computing environment
US10313410B2 (en) 2014-03-21 2019-06-04 Ptc Inc. Systems and methods using binary dynamic rest messages
US10025942B2 (en) 2014-03-21 2018-07-17 Ptc Inc. System and method of establishing permission for multi-tenancy storage using organization matrices
US9462085B2 (en) 2014-03-21 2016-10-04 Ptc Inc. Chunk-based communication of binary dynamic rest messages
US9467533B2 (en) 2014-03-21 2016-10-11 Ptc Inc. System and method for developing real-time web-service objects
US9961058B2 (en) 2014-03-21 2018-05-01 Ptc Inc. System and method of message routing via connection servers in a distributed computing environment
US9560170B2 (en) 2014-03-21 2017-01-31 Ptc Inc. System and method of abstracting communication protocol using self-describing messages
US9350791B2 (en) 2014-03-21 2016-05-24 Ptc Inc. System and method of injecting states into message routing in a distributed computing environment
WO2015143416A1 (en) 2014-03-21 2015-09-24 Ptc Inc. Systems and methods for developing and using real-time data applications
US9762637B2 (en) 2014-03-21 2017-09-12 Ptc Inc. System and method of using binary dynamic rest messages
US9633070B2 (en) * 2014-03-31 2017-04-25 International Business Machines Corporation Increase database performance by reducing required communications and information transfers
US10437819B2 (en) 2014-11-14 2019-10-08 Ab Initio Technology Llc Processing queries containing a union-type operation
US10417281B2 (en) * 2015-02-18 2019-09-17 Ab Initio Technology Llc Querying a data source on a network
US10346397B2 (en) * 2015-03-26 2019-07-09 Caswil Corporation System and method for querying data sources
US9946781B2 (en) * 2015-06-02 2018-04-17 Sap Se System and method of implementing table aliases
WO2017015792A1 (en) * 2015-07-24 2017-02-02 Cai Yongcheng Eddy Sql performance recommendations and scoring
US10089356B2 (en) 2015-08-28 2018-10-02 International Business Machines Corporation Processing window partitioning and ordering for on-line analytical processing (OLAP) functions
CN106547781B (en) * 2015-09-21 2021-06-11 南京中兴新软件有限责任公司 Method and device for realizing distributed transaction and database server
US9846725B2 (en) 2016-05-06 2017-12-19 InsightSoftware.com International SQL double counting resolver
US11347796B2 (en) 2016-08-11 2022-05-31 Sisense Ltd. Eliminating many-to-many joins between database tables
US10452652B2 (en) * 2016-09-15 2019-10-22 At&T Intellectual Property I, L.P. Recommendation platform for structured queries
CN110020333A (en) * 2017-07-27 2019-07-16 北京嘀嘀无限科技发展有限公司 Data analysing method and device, electronic equipment, storage medium
CN110781211B (en) * 2018-07-31 2022-04-05 网宿科技股份有限公司 Data analysis method and device
US11093223B2 (en) 2019-07-18 2021-08-17 Ab Initio Technology Llc Automatically converting a program written in a procedural programming language into a dataflow graph and related systems and methods
CN111143397B (en) * 2019-12-10 2021-04-13 跬云(上海)信息科技有限公司 Hybrid data query method and device and storage medium
US11212370B1 (en) * 2020-08-07 2021-12-28 Sap Se Context aware capabilities
CN113609141B (en) * 2021-10-11 2021-12-24 武大吉奥信息技术有限公司 Non-invasive cross-database data fusion method based on API splicing

Citations (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5963936A (en) * 1997-06-30 1999-10-05 International Business Machines Corporation Query processing system that computes GROUPING SETS, ROLLUP, and CUBE with a reduced number of GROUP BYs in a query graph model
US6009432A (en) * 1998-07-08 1999-12-28 Required Technologies, Inc. Value-instance-connectivity computer-implemented database
US20010037345A1 (en) * 2000-03-21 2001-11-01 International Business Machines Corporation Tagging XML query results over relational DBMSs
US6341281B1 (en) * 1998-04-14 2002-01-22 Sybase, Inc. Database system with methods for optimizing performance of correlated subqueries by reusing invariant results of operator tree
US6345272B1 (en) * 1999-07-27 2002-02-05 Oracle Corporation Rewriting queries to access materialized views that group along an ordered dimension
US6370524B1 (en) * 1999-04-02 2002-04-09 Oracle Corp. System and method for processing queries having an inner query block containing a grouping operator
US20020059203A1 (en) * 2000-07-13 2002-05-16 Andrew Witkowski Performing spreadsheet-like calculations in a database system
US20020087524A1 (en) * 2000-12-29 2002-07-04 Burton Leathers Partial delegation of complex OLAP queries with application to zero suppression condition evaluation
US20020107840A1 (en) * 2000-09-12 2002-08-08 Rishe Naphtali David Database querying system and method
US6438537B1 (en) * 1999-06-22 2002-08-20 Microsoft Corporation Usage based aggregation optimization
US6460027B1 (en) * 1998-09-14 2002-10-01 International Business Machines Corporation Automatic recognition and rerouting of queries for optimal performance
US20020188600A1 (en) * 2001-03-15 2002-12-12 International Business Machines Corporation Outerjoin and antijoin reordering using extended eligibility lists
US6519604B1 (en) * 2000-07-19 2003-02-11 Lucent Technologies Inc. Approximate querying method for databases with multiple grouping attributes
US20030066051A1 (en) * 2001-07-25 2003-04-03 Michael Karr Function values in computer programming languages having dynamic types and overloading
US6567802B1 (en) * 2000-09-06 2003-05-20 The Trustees Of The University Of Pennsylvania Systematic approach to query optimization
US20030101169A1 (en) * 2001-06-21 2003-05-29 Sybase, Inc. Relational database system providing XML query support
US6574623B1 (en) * 2000-08-15 2003-06-03 International Business Machines Corporation Query transformation and simplification for group by queries with rollup/grouping sets in relational database management systems
US20030115194A1 (en) * 2001-08-01 2003-06-19 Pitts Theodore H. Method and apparatus for processing a query to a multi-dimensional data structure
US6609123B1 (en) * 1999-09-03 2003-08-19 Cognos Incorporated Query engine and method for querying data using metadata model
US6611838B1 (en) * 2000-09-01 2003-08-26 Cognos Incorporated Metadata exchange
US6651055B1 (en) * 2001-03-01 2003-11-18 Lawson Software, Inc. OLAP query generation engine
US6684204B1 (en) * 2000-06-19 2004-01-27 International Business Machines Corporation Method for conducting a search on a network which includes documents having a plurality of tags
US6714928B1 (en) * 1999-03-19 2004-03-30 Sybase, Inc. Development system providing HTML database control object
US20040133567A1 (en) * 2001-06-20 2004-07-08 Oracle International Corporation Run-time optimizations of queries with SQL spreadsheet
US20040181537A1 (en) * 2003-03-14 2004-09-16 Sybase, Inc. System with Methodology for Executing Relational Operations Over Relational Data and Data Retrieved from SOAP Operations
US20050010570A1 (en) * 2003-05-27 2005-01-13 Cognos Incorporated System and method of query transformation
US6847962B1 (en) * 1999-05-20 2005-01-25 International Business Machines Corporation Analyzing, optimizing and rewriting queries using matching and compensation between query and automatic summary tables
US7120645B2 (en) * 2002-09-27 2006-10-10 Oracle International Corporation Techniques for rewriting XML queries directed to relational database constructs
US7133865B1 (en) * 1999-07-21 2006-11-07 Torben Bach Pedersen Method and systems for making OLAP hierarchies summarisable
US7315849B2 (en) * 2000-02-28 2008-01-01 Hyperroll Israel, Ltd. Enterprise-wide data-warehouse with integrated data aggregation engine

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5742806A (en) * 1994-01-31 1998-04-21 Sun Microsystems, Inc. Apparatus and method for decomposing database queries for database management system including multiprocessor digital data processing system
US6339775B1 (en) * 1997-11-07 2002-01-15 Informatica Corporation Apparatus and method for performing data transformations in data warehousing
US6199063B1 (en) * 1998-03-27 2001-03-06 Red Brick Systems, Inc. System and method for rewriting relational database queries
US6128612A (en) * 1998-06-30 2000-10-03 International Business Machines Corporation Method and system for translating an ad-hoc query language using common table expressions
US7167853B2 (en) * 1999-05-20 2007-01-23 International Business Machines Corporation Matching and compensation tests for optimizing correlated subqueries within query using automatic summary tables
EP1081611A3 (en) * 1999-09-03 2003-11-26 Cognos Incorporated Query engine and method for Querying data using metadata model
US7185016B1 (en) 2000-09-01 2007-02-27 Cognos Incorporated Methods and transformations for transforming metadata model
US6370541B1 (en) * 1999-09-21 2002-04-09 International Business Machines Corporation Design and implementation of a client/server framework for federated multi-search and update across heterogeneous datastores
US6766330B1 (en) * 1999-10-19 2004-07-20 International Business Machines Corporation Universal output constructor for XML queries universal output constructor for XML queries
US6735587B2 (en) * 2000-07-28 2004-05-11 International Business Machines Corporation Maintaining pre-computed aggregate views incrementally in the presence of non-minimal changes
US7373597B2 (en) * 2001-10-31 2008-05-13 University Of Medicine & Dentistry Of New Jersey Conversion of text data into a hypertext markup language
DE10217300C1 (en) * 2002-04-18 2003-11-20 Fraunhofer Ges Forschung Location-dependent information reproduction with adaptation of a geographical selection parameter
CA2418163A1 (en) * 2003-01-31 2004-07-31 Ibm Canada Limited - Ibm Canada Limitee Method of query transformation using window aggregation
US7759769B2 (en) * 2006-07-20 2010-07-20 System General Corp. Semiconductor structure of a high side driver
US7917463B2 (en) * 2008-10-10 2011-03-29 Business.Com, Inc. System and method for data warehousing and analytics on a distributed file system

Patent Citations (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5963936A (en) * 1997-06-30 1999-10-05 International Business Machines Corporation Query processing system that computes GROUPING SETS, ROLLUP, and CUBE with a reduced number of GROUP BYs in a query graph model
US6341281B1 (en) * 1998-04-14 2002-01-22 Sybase, Inc. Database system with methods for optimizing performance of correlated subqueries by reusing invariant results of operator tree
US6009432A (en) * 1998-07-08 1999-12-28 Required Technologies, Inc. Value-instance-connectivity computer-implemented database
US6460027B1 (en) * 1998-09-14 2002-10-01 International Business Machines Corporation Automatic recognition and rerouting of queries for optimal performance
US6714928B1 (en) * 1999-03-19 2004-03-30 Sybase, Inc. Development system providing HTML database control object
US6370524B1 (en) * 1999-04-02 2002-04-09 Oracle Corp. System and method for processing queries having an inner query block containing a grouping operator
US6847962B1 (en) * 1999-05-20 2005-01-25 International Business Machines Corporation Analyzing, optimizing and rewriting queries using matching and compensation between query and automatic summary tables
US6438537B1 (en) * 1999-06-22 2002-08-20 Microsoft Corporation Usage based aggregation optimization
US7133865B1 (en) * 1999-07-21 2006-11-07 Torben Bach Pedersen Method and systems for making OLAP hierarchies summarisable
US6345272B1 (en) * 1999-07-27 2002-02-05 Oracle Corporation Rewriting queries to access materialized views that group along an ordered dimension
US6609123B1 (en) * 1999-09-03 2003-08-19 Cognos Incorporated Query engine and method for querying data using metadata model
US7315849B2 (en) * 2000-02-28 2008-01-01 Hyperroll Israel, Ltd. Enterprise-wide data-warehouse with integrated data aggregation engine
US6934712B2 (en) * 2000-03-21 2005-08-23 International Business Machines Corporation Tagging XML query results over relational DBMSs
US20010037345A1 (en) * 2000-03-21 2001-11-01 International Business Machines Corporation Tagging XML query results over relational DBMSs
US6684204B1 (en) * 2000-06-19 2004-01-27 International Business Machines Corporation Method for conducting a search on a network which includes documents having a plurality of tags
US20020059203A1 (en) * 2000-07-13 2002-05-16 Andrew Witkowski Performing spreadsheet-like calculations in a database system
US6519604B1 (en) * 2000-07-19 2003-02-11 Lucent Technologies Inc. Approximate querying method for databases with multiple grouping attributes
US6574623B1 (en) * 2000-08-15 2003-06-03 International Business Machines Corporation Query transformation and simplification for group by queries with rollup/grouping sets in relational database management systems
US6611838B1 (en) * 2000-09-01 2003-08-26 Cognos Incorporated Metadata exchange
US6567802B1 (en) * 2000-09-06 2003-05-20 The Trustees Of The University Of Pennsylvania Systematic approach to query optimization
US20020107840A1 (en) * 2000-09-12 2002-08-08 Rishe Naphtali David Database querying system and method
US20020087524A1 (en) * 2000-12-29 2002-07-04 Burton Leathers Partial delegation of complex OLAP queries with application to zero suppression condition evaluation
US6651055B1 (en) * 2001-03-01 2003-11-18 Lawson Software, Inc. OLAP query generation engine
US20020188600A1 (en) * 2001-03-15 2002-12-12 International Business Machines Corporation Outerjoin and antijoin reordering using extended eligibility lists
US20040133567A1 (en) * 2001-06-20 2004-07-08 Oracle International Corporation Run-time optimizations of queries with SQL spreadsheet
US20030101169A1 (en) * 2001-06-21 2003-05-29 Sybase, Inc. Relational database system providing XML query support
US20030066051A1 (en) * 2001-07-25 2003-04-03 Michael Karr Function values in computer programming languages having dynamic types and overloading
US20030115194A1 (en) * 2001-08-01 2003-06-19 Pitts Theodore H. Method and apparatus for processing a query to a multi-dimensional data structure
US7120645B2 (en) * 2002-09-27 2006-10-10 Oracle International Corporation Techniques for rewriting XML queries directed to relational database constructs
US20040181537A1 (en) * 2003-03-14 2004-09-16 Sybase, Inc. System with Methodology for Executing Relational Operations Over Relational Data and Data Retrieved from SOAP Operations
US20050038782A1 (en) * 2003-05-27 2005-02-17 Styles Michael E. System and method of summary filter transformation
US20050015369A1 (en) * 2003-05-27 2005-01-20 Styles Michael E. System and method of query transformation
US20050010570A1 (en) * 2003-05-27 2005-01-13 Cognos Incorporated System and method of query transformation
US7318058B2 (en) * 2003-05-27 2008-01-08 Cognos Incorporated System and method of processing queries
US7428532B2 (en) * 2003-05-27 2008-09-23 International Business Machines Corporation System and method of client server aggregate transformation

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010570A1 (en) * 2003-05-27 2005-01-13 Cognos Incorporated System and method of query transformation
US20050015369A1 (en) * 2003-05-27 2005-01-20 Styles Michael E. System and method of query transformation
US20050038782A1 (en) * 2003-05-27 2005-02-17 Styles Michael E. System and method of summary filter transformation
US20090063441A1 (en) * 2003-05-27 2009-03-05 Styles Michael E System and method of query transformation
US7765222B2 (en) 2003-05-27 2010-07-27 International Business Machines Corporation Query transformation
US8108415B2 (en) 2003-05-27 2012-01-31 International Business Machines Corporation Query transformation
US8676821B2 (en) 2003-05-27 2014-03-18 Sap Ag Summary filter transformation
US20070299837A1 (en) * 2006-06-22 2007-12-27 International Business Machines Corporation Data Processing Method and System Based on Networked Relational Dimension
US8498996B2 (en) 2008-11-03 2013-07-30 Sas Institute Inc. Computer-implemented method and system for handling and transforming database queries in a fourth generation language
US20160140175A1 (en) * 2014-11-13 2016-05-19 Christoph Weyerhaeuser Integration of calculation models into sql layer
US9846724B2 (en) * 2014-11-13 2017-12-19 Sap Se Integration of calculation models into SQL layer
CN107193957A (en) * 2017-05-23 2017-09-22 努比亚技术有限公司 Generation method, terminal and the computer-readable recording medium of SQL

Also Published As

Publication number Publication date
US20050010570A1 (en) 2005-01-13
EP1482427A3 (en) 2005-09-21
EP1482426A3 (en) 2005-09-21
EP1482426A2 (en) 2004-12-01
US20050038782A1 (en) 2005-02-17
US7765222B2 (en) 2010-07-27
EP1482429A3 (en) 2005-09-21
US7318058B2 (en) 2008-01-08
US20050015393A1 (en) 2005-01-20
US7428532B2 (en) 2008-09-23
EP1482424A2 (en) 2004-12-01
US8676821B2 (en) 2014-03-18
EP1482425A3 (en) 2005-12-14
EP1482429A2 (en) 2004-12-01
US20050038778A1 (en) 2005-02-17
CA2429910A1 (en) 2004-11-27
US20050015369A1 (en) 2005-01-20
US20090063441A1 (en) 2009-03-05
EP1482424A3 (en) 2005-09-21
EP1482425A2 (en) 2004-12-01
EP1482427A2 (en) 2004-12-01
US8108415B2 (en) 2012-01-31

Similar Documents

Publication Publication Date Title
US20050010569A1 (en) System and method of query transformation
CA2562281C (en) Partial query caching
US6665684B2 (en) Partition pruning with composite partitioning
US6609131B1 (en) Parallel partition-wise joins
US8620888B2 (en) Partitioning in virtual columns
US7127467B2 (en) Managing expressions in a database system
US7814104B2 (en) Techniques for partition pruning
US7730055B2 (en) Efficient hash based full-outer join
US20110137890A1 (en) Join Order for a Database Query
US8117307B2 (en) System and method for managing data streams
US6957210B1 (en) Optimizing an exclusion join operation using a bitmap index structure
US20070033178A1 (en) Quality of service feedback for technology-neutral data reporting
US7693821B2 (en) Virtual pair algorithm for outer join resolution
CA2468398C (en) System and method of query transformation
US20210056106A1 (en) Query expression repository
CA2468617C (en) System and method of query transformation
CA2468614A1 (en) System and method of query transformation
CA2468404A1 (en) System and method of client/server aggregate transformation
CN116628026A (en) Nestloop connection execution method in opengauss
CA2468624A1 (en) System and method of processing queries
Mittra Optimization of the External Level of a Database
CA2468403A1 (en) System and method of query transformation

Legal Events

Date Code Title Description
AS Assignment

Owner name: COGNOS INCORPORATED, CANADA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:STYLES, MICHAEL E.;REEL/FRAME:016121/0530

Effective date: 20050412

AS Assignment

Owner name: COGNOS ULC, CANADA

Free format text: CERTIFICATE OF AMALGAMATION;ASSIGNOR:COGNOS INCORPORATED;REEL/FRAME:021387/0813

Effective date: 20080201

Owner name: IBM INTERNATIONAL GROUP BV, NETHERLANDS

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:COGNOS ULC;REEL/FRAME:021387/0837

Effective date: 20080703

Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:IBM INTERNATIONAL GROUP BV;REEL/FRAME:021398/0001

Effective date: 20080714

Owner name: COGNOS ULC,CANADA

Free format text: CERTIFICATE OF AMALGAMATION;ASSIGNOR:COGNOS INCORPORATED;REEL/FRAME:021387/0813

Effective date: 20080201

Owner name: IBM INTERNATIONAL GROUP BV,NETHERLANDS

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:COGNOS ULC;REEL/FRAME:021387/0837

Effective date: 20080703

Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION,NEW YO

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:IBM INTERNATIONAL GROUP BV;REEL/FRAME:021398/0001

Effective date: 20080714

STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO PAY ISSUE FEE