IP Library Granted Patent US 7,028,037
Granted Patent B1
US 7,028,037 · App. 10/260,138 · Granted Apr 11, 2006

Operators for accessing hierarchical data in a relational system

Assignee: Oracle International Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,028,037
App. No.
10/260,138
Granted
Apr 11, 2006
Kind
B1
Abstract

Techniques and systems are provided for efficiently managing hierarchical relational data stored in object-relational database system by extending the syntax of the database language supported by the database system (e.g. SQL) to incorporate several new “hierarchical” operators. These operators are evaluated based on the hierarchical relationship defined for hierarchical relational data. The operators maybe incorporated in SQL queries along with relational operators.

Claims (33)

1. A method of accessing information managed by a relational database system, the method comprising the steps of:

receiving a database language statement that specifies selection criteria for selecting rows managed by the database system;

wherein the rows are associated with nodes in a hierarchy;

wherein the statement includes an operator that specifies that results of said statement are based, at least in part, on respective positions, within the hierarchy, of the nodes associated with the rows;

during execution of said statement, evaluating said operator using information managed by the relational database system about said hierarchy; and

wherein said database language defines said operator as one that evaluates to an output value based on respective positions of nodes within a given hierarchy.

2. The method of claim 1 wherein the step of evaluating the operator includes determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy.

3. The method of claim 2 wherein the step of determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy includes the step of determining whether the row is associated with a node that is under the particular node in the hierarchy.

4. The method of claim 3 wherein the step of determining whether the row is associated with a node that is under the particular node in the hierarchy includes the steps of:

if conditions in said statement are relatively more restrictive, then traversing up the hierarchy from said node; and

if conditions in said statement are relatively less restrictive, then traversing down the hierarchy from the particular node.

5. The method of claim 2 wherein the step of determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy includes the step of determining whether the row is associated with the particular node in the hierarchy.

6. The method of claim 2 wherein the step of determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy includes the step of determining whether the row is associated with a node that is within a specified number of levels under the particular node in the hierarchy.

7. The method of claim 1 wherein the step of evaluating said operator includes determining a path, within the hierarchy, to a particular node.

8. The method of claim 1 wherein the step of evaluating said operator includes determining a depth, within the hierarchy, of a node associated with a particular row.

9. The method of claim 1 wherein the step of evaluating said operator using information managed by the relational database system about said hierarchy includes evaluating said operator using a relational table that includes rows that hold data indicating parent-child relationships between nodes of said hierarchy.

10. The method of claim 9 wherein the statement includes a plurality of hierarchical operators, the method further comprising using information obtained in a particular scan of the relational table to evaluate each of said plurality of hierarchical operators.

11. The method of claim 10 wherein the plurality of hierarchical operators include at least two operators from a set that includes UNDER_PATH, PATH, DEPTH, and EQUALS_PATH.

12. A computer-readable medium carrying instructions for accessing information managed by a relational database system, the instructions comprising instructions for performing the steps of:

receiving a database language statement that specifies selection criteria for selecting rows managed by the database system;

wherein the rows are associated with nodes in a hierarchy;

wherein the statement includes an operator that specifies that results of said statement are based, at least in part, on respective positions, within the hierarchy, of the nodes associated with the rows;

during execution of said statement, evaluating said operator using information managed by the relational database system about said hierarchy; and

wherein said database language defines said operator as one that evaluates to an output value based on respective positions of nodes within a given hierarchy.

13. The computer-readable medium of claim 12 wherein the step of evaluating the operator includes determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy.

14. The computer-readable medium of claim 13 wherein the step of determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy includes the step of determining whether the row is associated with a node that is under the particular node in the hierarchy.

15. The computer-readable medium of claim 13 wherein the step of determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy includes the step of determining whether the row is associated with the particular node in the hierarchy.

16. The computer-readable medium of claim 13 wherein the step of determining whether a row is associated with a node, within the hierarchy, that has a particular position relative to a particular node in the hierarchy includes the step of determining whether the row is associated with a node that is within a specified number of levels under the particular node in the hierarchy.

17. The method of claim 12 wherein the step of evaluating said operator includes determining a path, within the hierarchy, to a particular node.

18. The computer-readable medium of claim 12 wherein the step of evaluating said operator includes determining a depth, within the hierarchy, of a node associated with a particular row.

19. The computer-readable medium of claim 12 wherein the step of evaluating said operator using information managed by the relational database system about said hierarchy includes evaluating said operator using a relational table that includes rows that hold data indicating parent-child relationships between nodes of said hierarchy.

20. The computer-readable medium of claim 19 wherein the statement includes a plurality of hierarchical operators, the computer-readable medium further comprising instructions for using information obtained in a particular scan of the relational table to evaluate each of said plurality of hierarchical operators.

21. The computer-readable medium of claim 20 wherein the plurality of hierarchical operators include at least two operators from a set that includes UNDER_PATH, PATH, DEPTH, and EQUALS_PATH.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 1, 2004
From: ORACLE CORPORATION
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 015406/0105 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2002
From: AGARWAL, NIPUN; MURTHY, RAVI; SEDLAR, ERIC; CHANDRASEKAR, SIVASANKARAN; GE, FEI
To: ORACLE CORPORATION
Reel/Frame 013347/0443 →
Continuity (2)
Provisional Application 6032605200 · Sep 28, 2001
Provisional Application 6067880000 · May 7, 2002