Flexible Column Selection in Relational Databases
AssigneeInternational Business Machines Corporation
InventorAllan T. Chandler
Life of this patent
Estimating the term…
Abstract
An approach is provided to expand attributes included in an SQL expansion clause into a number of selection statements. In the approach, an expansion clause is identified in within a Structured Query Language (SQL) statement with the SQL statement identifying a relational database table. Column attributes associated with the identified relational database table are compared to attributes included in the identified expansion clause. Columns included in the relational database table are then selected based on the comparison. SQL column selection statements are then generated with each of the generated SQL column selection statements corresponding to one of the selected columns. The generated SQL column selection statements are then included in the SQL statement.
Claims20
A method, implemented by an information handling system, comprising:
- identifying an expansion clause within a Structured Query Language (SQL) statement, wherein the SQL statement identifies a relational database table;
- comparing one or more column attributes associated with the identified relational database table to one or more attributes included in the identified expansion clause;
- selecting one or more columns included in the relational database table based on the comparison;
- generating one or more SQL column selection statements, with each of the generated SQL column selection statements corresponding to a different one of the selected one or more columns;
- and
- including the generated SQL column selection statements in the SQL statement.
An information handling system comprising:
- a plurality of processors;
- a memory coupled to at least one of the processors;
- a set of instructions stored in the memory and executed by at least one of the processors, wherein the set of instructions perform actions of:
- identifying an expansion clause within a Structured Query Language (SQL) statement, wherein the SQL statement identifies a relational database table;
- comparing one or more column attributes associated with the identified relational database table to one or more attributes included in the identified expansion clause;
- selecting one or more columns included in the relational database table based on the comparison;
- generating one or more SQL column selection statements, with each of the generated SQL column selection statements corresponding to a different one of the selected one or more columns;
- and
- including the generated SQL column selection statements in the SQL statement.
A computer program product stored in a computer readable medium, comprising computer instructions that, when executed by an information handling system, causes the information handling system to perform actions comprising:
- identifying an expansion clause within a Structured Query Language (SQL) statement, wherein the SQL statement identifies a relational database table;
- comparing one or more column attributes associated with the identified relational database table to one or more attributes included in the identified expansion clause;
- selecting one or more columns included in the relational database table based on the comparison;
- generating one or more SQL column selection statements, with each of the generated SQL column selection statements corresponding to a different one of the selected one or more columns;
- and
- including the generated SQL column selection statements in the SQL statement.
Dependencies are inferred from the claim text.