Compound indexes for graph databases
First Claim
1. A method, comprising:
- executing a set of processes for processing queries of a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates; and
when a query of the graph database is received, using one or more of the processes to process the query by;
performing a lookup of a hash map to obtain one or more offsets into a compound store for the graph database, wherein the compound store comprises a set of identity-giving nodes for a set of tuples in the graph database;
accessing the one or more offsets in the compound store to obtain a subset of the tuples matching the query by;
obtaining, from the lookup of the hash map, a first offset in the compound store by matching a key in the query to an entry in the hash map which stores the first offset;
obtaining, from a record at the first offset in an offset store in the compound store, a second offset in the compound structure; and
accessing the subset of the tuples at the second offset in the compound structure;
using the subset of the tuples to generate a result of the query; and
providing the result in a response to the query.
2 Assignments
0 Petitions
Accused Products
Abstract
The disclosed embodiments provide a system for processing queries of a graph database. During operation, the system executes a set of processes for processing queries of a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates. When a query of the graph database is received, the system performs a lookup of a hash map to obtain one or more offsets into a compound store for the graph database, which includes identity-giving nodes for a set of tuples in the graph database. Next, the system accesses the offset(s) in the compound store to obtain a subset of tuples matching the query. The system then uses the subset of tuples to generate a result of the query and provides the result in a response to the query.
45 Citations
17 Claims
-
1. A method, comprising:
-
executing a set of processes for processing queries of a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates; and when a query of the graph database is received, using one or more of the processes to process the query by; performing a lookup of a hash map to obtain one or more offsets into a compound store for the graph database, wherein the compound store comprises a set of identity-giving nodes for a set of tuples in the graph database; accessing the one or more offsets in the compound store to obtain a subset of the tuples matching the query by; obtaining, from the lookup of the hash map, a first offset in the compound store by matching a key in the query to an entry in the hash map which stores the first offset; obtaining, from a record at the first offset in an offset store in the compound store, a second offset in the compound structure; and accessing the subset of the tuples at the second offset in the compound structure; using the subset of the tuples to generate a result of the query; and providing the result in a response to the query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. An apparatus, comprising:
-
one or more processors; and memory storing instructions that, when executed by the one or more processors, cause the apparatus to; execute one or more processes for providing a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates; and when a query of the graph database is received, use one or more of the processes to process the query by; performing a lookup of a hash map to obtain one or more offsets into a compound store for the graph database, wherein the compound store comprises a set of identity-giving nodes for a set of tuples in the graph database; accessing the one or more offsets in the compound store to obtain a subset of the tuples matching the query by; obtaining, from the lookup of the hash map, a first offset in the compound store by matching a key in the query to an entry in the hash map which stores the first offset; obtaining, from a record at the first offset in an offset store in the compound store, a second offset in the compound structure; and accessing the subset of the tuples at the second offset in the compound structure; using the subset of the tuples to generate a result of the query; and providing the result in a response to the query. - View Dependent Claims (13, 14, 15, 16)
-
-
17. A system, comprising:
-
one or more processors; a management module comprising instructions that, when executed by the one or more processors, cause the system to execute a set of processes for processing queries of a graph database storing a graph, wherein the graph comprises a set of nodes, a set of edges between pairs of nodes in the set of nodes, and a set of predicates; and a processing module comprising instructions that, when executed by the one or more processors, cause the system to use one or more of the processes to process the query by; performing a lookup of a hash map to obtain one or more offsets into a compound store for the graph database, wherein the compound store comprises a set of identity-giving nodes for a set of tuples in the graph database; accessing the one or more offsets in the compound store to obtain a subset of the tuples matching the query by; obtaining, from the lookup of the hash map, a first offset in the compound store by matching a key in the query to an entry in the hash map which stores the first offset; obtaining, from a record at the first offset in an offset store in the compound store, a second offset in the compound structure; and accessing the subset of the tuples at the second offset in the compound structure; using the subset of the tuples to generate a result of the query; and providing the result in a response to the query.
-
Specification