Patent ID: 7213014

Claim:
An apparatus comprising: (A) at least one processor; (B) a memory coupled to the at least one processor; (C) a database residing in the memory; and (D) a database operation mechanism residing in the memory and providing instructions for the at least one processor to perform the steps of: (D1) identifying a predefined database operation and determining whether the predefined database operation provides a data source for a different database operation corresponding to a different database statement, and where the predefined database operation provides a data source, specifying the predefined database operation as a data source for the different database operation, wherein the predefined database operation provides the data source for the different database operation when executing the predefined database operation returns a result set that includes data needed by the different database operation such that the result set provides the data source for the different database operation; (D2) where the predefined database operation does not provide a data source for the different database operation, determining whether the predefined database operation is modifiable to serve as a data source for the different database operation; (D3) where the predefined database operation is modifiable to serve as a data source for the different database operation and such modification is desirable based on at least one predetermined criterion, performing the steps of: (D3A) modifying the predefined database operation; and (D3B) specifying the modified database operation as the data source for the different database operation; (D4) where the predefined database operation is not modifiable to serve as a data source for the different database operation or if such modification is not desirable based on the at least one predetermined criterion, generating an executable database operation from the different database statement and executing the executable database operation.