Claims
- 1. A method of executing a query, comprising:
(a) accessing, from a query execution data structure representative of a database query access plan for the query, at least one of a parent node object and a child node object from among a plurality of query node objects arranged into a tree relationship; and (b) manipulating at least a subset of a plurality of attributes referenced in an attribute data structure defined in the query execution data structure by processing at least one operation defined in an attribute operation data structure defined in the accessed node object, wherein processing the operation includes obtaining a reference for at least one attribute in the subset of attributes from the attribute data structure.
- 2. The method of claim 1, wherein at least one of the plurality of node objects is selected from a library of node objects.
- 3. The method of claim 2, wherein the plurality of node objects includes a node object selected from the group consisting of a unary node object, a binary node object, a leaf node object and a join-type node object.
- 4. The method of claim 1, wherein the attribute data structure is global to the plurality of node objects.
- 5. The method of claim 4, wherein at least one of the child nodes is configured to communicate with the parent node by modifying an attribute referenced in the attribute data structure.
- 6. The method of claim 1, wherein at least one of the child nodes is configured to return a status to the parent node upon execution of such child node by the parent node.
- 7. The method of claim 1, wherein the attribute data structure comprises an attribute descriptor array including a plurality of entries, each entry indexed by a unique index, and including a pointer to an attribute from among the plurality of attributes, and wherein a node from among the plurality of nodes is configured to access an attribute from among the plurality of attributes by accessing the attribute descriptor array entry including a pointer to such attribute.
- 8. The method of claim 7, wherein the plurality of attributes include at least one attribute selected from the group consisting of a dataspace attribute, an intermediate result attribute, and a result buffer attribute.
- 9. The method of claim 1, wherein the attribute operation data structure comprises an attribute operation list.
- 10. The method of claim 9, wherein the attribute operation list includes a plurality of entries, each entry associated with an operation to be performed during execution of the attribute operation list.
- 11. The method of claim 9, wherein the accessed node object includes additional logic configured to execute the attribute operation list.
- 12. A method of building an access plan for a query, comprising:
(a) generating a query execution data structure; (b) populating the query execution data structure with an attribute data structure that references a plurality of attributes to be used during execution of a query; (c) populating the query execution data structure with a plurality of node objects arranged into a tree relationship, the plurality of node objects including at least one parent node object and a child node object, and (d) populating at least one of the parent and child node objects with an attribute operation data structure configured to manipulate at least a subset of the plurality of attributes by accessing the attribute operation data structure.
- 13. The method of claim 12, wherein populating the query execution data structure with a plurality of node objects includes selecting at least one node object from a library of node objects.
- 14. An apparatus, comprising:
(a) a memory within which is resident a query execution data structure representative of a database query access plan, the query execution data structure including a plurality of query node objects arranged into a tree relationship to define a parent node object and at least one child node object, and an attribute data structure that references a plurality of attributes utilized by the query execution data structure, wherein at least one of the parent and child node objects includes an attribute operation data structure configured to manipulate at least a subset of the plurality of attributes by accessing the attribute operation data structure; and (b) program code configured to access the query execution data structure resident in the memory.
- 15. The apparatus of claim 14, wherein the program code is configured to access the query execution data structure by manipulating at least a subset of the plurality of attributes referenced in an attribute data structure defined in the query execution data structure by processing at least one operation defined in the attribute operation data structure.
- 16. The apparatus of claim 14, wherein at least one of the plurality of node objects is selected from a library of node objects.
- 17. The apparatus of claim 16, wherein the plurality of node objects includes a node object selected from the group consisting of a unary node object, a binary node object, a leaf node object and a join-type node object.
- 18. The apparatus of claim 14, wherein the attribute data structure is global to the plurality of node objects.
- 19. The apparatus of claim 18, wherein at least one of the child nodes is configured to communicate with the parent node by modifying an attribute referenced in the attribute data structure.
- 20. The apparatus of claim 14, wherein at least one of the child nodes is configured to return a status to the parent node upon execution of such child node by the parent node.
- 21. The apparatus of claim 14, wherein the attribute data structure comprises an attribute descriptor array including a plurality of entries, each entry indexed by a unique index, and including a pointer to an attribute from among the plurality of attributes, and wherein a node from among the plurality of nodes is configured to access an attribute from among the plurality of attributes by accessing the attribute descriptor array entry including a pointer to such attribute.
- 22. The apparatus of claim 21, wherein the plurality of attributes include at least one attribute selected from the group consisting of a dataspace attribute, an intermediate result attribute, and a result buffer attribute.
- 23. The apparatus of claim 14, wherein the attribute operation data structure comprises an attribute operation list.
- 24. The apparatus of claim 23, wherein the attribute operation list includes a plurality of entries, each entry associated with an operation to be performed during execution of the attribute operation list.
- 25. The apparatus of claim 23, wherein the accessed node object includes additional logic configured to execute the attribute operation list.
- 26. The apparatus of claim 14, wherein the program code is further configured to generate the query execution data structure by populating the query execution data structure with the attribute data structure and the plurality of node objects.
- 27. A program product, comprising:
(a) a query execution data structure representative of a database query access plan, the query execution data structure including a plurality of query node objects arranged into a tree relationship to define a parent node object and at least one child node object, and an attribute data structure that references a plurality of attributes utilized by the query execution data structure, wherein at least one of the parent and child node objects includes an attribute operation data structure configured to manipulate at least a subset of the plurality of attributes by accessing the attribute operation data structure; and (b) a signal bearing medium bearing the query execution data structure.
- 28. The program product of claim 27, wherein the signal bearing medium includes at least one of a transmission medium and a recordable medium.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to U.S. Ser. No. ______ , filed on even date herewith by David Glenn Carlson et al. and entitled “PARALLEL DATABASE QUERY PROCESSING FOR NON-UNIFORM DATA SOURCES VIA BUFFERED ACCESS” (hereinafter “Carlson I”) (IBM ROC920010234US1), U.S. Ser. No. ______ , filed on even date herewith by David Glenn Carlson et al. and entitled “RUNTIME QUERY OPTIMIZATION FOR DYNAMICALLY SELECTING FROM MULTIPLE PLANS IN A QUERY BASED UPON RUNTIME-EVALUATED PERFORMANCE CRITERION” (hereinafter “Carlson II”) (IBM ROC920010235US1), and to U.S. Ser. No. ______ , filed on even date herewith by David Glenn Carlson et al. and entitled “METHOD FOR EFFICIENT PROCESSING OF MULTI-STATE ATTRIBUTES” (hereinafter “Carlson III”) (IBM ROC920010305US1). The disclosures of each of these applications are incorporated by reference herein.