×

Storing graph data in a relational database

  • US 10,387,497 B2
  • Filed: 06/18/2015
  • Issued: 08/20/2019
  • Est. Priority Date: 05/21/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method of storing graph data for a directed graph in a relational database, the method comprising:

  • creating a plurality of relational tables for the graph data, wherein the graph data comprises a plurality of vertexes and a plurality of edges, using a processor on a computer, the plurality of relational tables including adjacency tables and attribute tables wherein;

    each row of the attribute tables is dedicated to a subject of the graph data in the dataset and stores a JavaScript Object Notation (JSON) object corresponding to the subject; and

    each row of the adjacency tables comprises a hashtable comprising properties and values of the subject for that row, wherein the hashtable further comprises an index value corresponding to a value shared by a plurality of edges originating from at least one vertex in the plurality of vertexes, wherein the index value further corresponds to a secondary adjacency table comprising edge data for edges originating from the at least one vertex in the plurality of vertexes;

    wherein the adjacency tables include;

    an incoming adjacency table, wherein each row of the incoming adjacency table is dedicated to one of the plurality of vertexes of the graph data and stores data regarding edges that terminate at that vertex; and

    an outgoing adjacency table, wherein each row of the outgoing adjacency table is dedicated to one of the plurality of the vertexes of the graph data and stores data regarding edges that originate at that vertex;

    receiving a query for traversing the graph data stored in the relational database;

    parsing the query into a set of ordered operations;

    translating each of the set of ordered operations into a fragment using a template selected based on an operation type, wherein the template comprises at least one of a common table expression fragment and a stored procedure;

    assembling the fragments into a single query; and

    transmitting the single query to the relational database for processing.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×