Patent ID: 7779024

Claim:
An apparatus comprising: at least one processor; a memory coupled to the at least one processor; and a database residing in the memory having data, wherein the apparatus is configured to: receive a database query; analyze the database query to determine whether the database query satisfies a first condition, the first condition being satisfied if the database query comprises a SELECT statement and an ontological clause in the form of a Change Query Attribute (CHGQRYA) clause, wherein the CHGQRYA clause is composed of a Substitute Forward clause, Substitute Backward clause, or a Group By At Level clause; analyze the database to determine whether the database satisfies a second condition, the second condition being satisfied if the database defines an ontological data structure for the CHGQRYA clause; and when the first condition and the second condition are satisfied: parsing the ontological data structure to extract an ontological relationship for the CHGQRYA clause; using the extracted ontological relationship to modify an attribute of the database query; and executing the database query to return data from the database, wherein the data is associated with the ontological relationship.