Flexible indexing for graph databases
AssigneeAmazon Technologies, Inc.
InventorsAlazel Acheson, Mahendra Manshi Chheda, Srikanth Mandadi, Hyun Sik Kim
Life of this patent
Estimating the term…
Abstract
A processing device generates an index node for an attribute in a graph database, wherein the index node is linked to a second node by a first edge having a first edge type. The processing device determines a first plurality of additional nodes that have the attribute. For each node of the first plurality of additional nodes, the processing device generates an edge linking the node to the index node, wherein the edge comprises a second edge type.
Claims17
A computer implemented method comprising:
- receiving, by a processing device, a first command to create a first index for a graph database, the first command identifying a first attribute to include in the first index;
- generating a first index node associated with the first attribute in the graph database;
- determining a first set of indexed nodes in the graph database that have the first attribute, wherein the first index node comprises first information identifying the first attribute and an attribute value for each of the first set of indexed nodes;
- for each indexed node of the first set of indexed nodes, generating a corresponding first edge comprising an index edge type indicating a relationship between the first index node and each indexed node and the attribute value for the first attribute of each indexed node of the first set of indexed nodes;
- receiving a second command to create a second index for the graph database, the second command comprising a second attribute;
- in response to the second command, generating a second index node in the graph database;
- determining a second set of indexed nodes that have the second attribute, wherein the second index node comprises second information identifying the second attribute and an attribute value for each of the second set of indexed nodes;
- receiving, at the first index node, a query to identify a target node comprising a first attribute value of the first attribute;
- identifying a particular edge connected to the first index node, the particular edge having a first index edge type and the first attribute value;
- and
- generating a result to the query, the result comprising an indication of a path to the target node linked to the first index node by the particular edge.
A device comprising:
- a processing device;
- and
- a memory to store computer executable instructions that, if executed, cause the processing device to:
- generate, in response to a first command, a first index node associated with a first attribute in a graph database;
- determine a first set of indexed nodes that have the first attribute, wherein the first index node comprises first information identifying the first attribute and an attribute value for each of the first set of indexed nodes;
- for each indexed node of the first set of indexed nodes, generate a corresponding first edge comprising an index edge type indicating a relationship between the first index node and each indexed node and the attribute value for the first attribute of each indexed node of the first set of indexed nodes;
- generate, in response to a second command, a second index node for a second attribute in the graph database;
- and
- determine a second set of indexed nodes that have the second attribute, wherein the second index node comprises second information identifying the second attribute and an attribute value for each of the second set of indexed nodes;
- receive, at the first index node, a query to identify a target node comprising a first attribute value of the first attribute;
- identify a particular edge connected to the first index node, the particular edge having a first index edge type and the first attribute value;
- and
- generate a result to the query, the result comprising an indication of a path to the target node linked to the first index node by the particular edge.
A non-transitory computer-readable storage device storing computer-executable instructions that, if executed by a processing device, cause the processing device to:
- generate, in response to a first command, a first index node associated with a first attribute in a graph database;
- determine a first set of indexed nodes that have the first attribute, wherein the first index node comprises first information identifying the first attribute and an attribute value for each of the first set of indexed nodes;
- for each indexed node of the first set of indexed nodes, generate a corresponding first edge comprising an index edge type indicating a relationship between the first index node and each indexed node and the attribute value for the first attribute of each indexed node of the first set of indexed nodes;
- generate, in response to a second command, a second index node for a second attribute in the graph database;
- and
- determine a second set of indexed nodes that have the second attribute, wherein the second index node comprises second information identifying the second attribute and an attribute value for each of the second set of indexed nodes;
- receive, at the first index node, a query to identify a target node comprising a first attribute value of the first attribute;
- identify a particular edge connected to the first index node, the particular edge having a first index edge type and the first attribute value;
- and
- generate a result to the query, the result comprising an indication of a path to the target node linked to the first index node by the particular edge.
Dependencies are inferred from the claim text.