IP Library › Granted Patent US 10,387,496
Granted Patent B2
US 10,387,496 · App. 14/718,147 · Granted Aug 20, 2019

Storing graph data in a relational database

Inventors: Achille B. Fokoue-Nkoutche (White Plains, NY); Gang Hu (Beijing, CN); Anastasios Kementsietsidis (Mountain View, CA); Kavitha Srinivas (Rye, NY); Wen B. Sun (Beijing, CN); Guo Tong Xie (Xi Er Qi, CN)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F16/9024G06F16/2255G06F16/24522G06F16/284G06F16/9014
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 10,387,496
App. No.
14/718,147
Granted
Aug 20, 2019
Kind
B2
Abstract

Embodiments include methods, systems and computer program products for storing graph data for a directed graph in a relational database. Aspects include creating a plurality of relational tables for the graph data, using a processor on a computer, the plurality of relational tables including adjacency tables and attribute tables. 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. Each row of the adjacency tables includes a hashtable containing properties and values of the subject for that row.

Claims (29)

1. A computer program product for storing graph data for a directed graph in a relational database, the computer program product comprising:

a non-transitory storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a 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, wherein the plurality of relational tables include 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.

2. The computer program product of claim 1 , wherein the attribute tables includes a vertex attribute table, wherein each row of the vertex attribute table is dedicated to one of a plurality of vertexes of the graph data and stores a JavaScript Object Notation (JSON) object corresponding to that vertex.

3. The computer program product of claim 1 , wherein the attribute tables includes an edge attribute table, wherein each row of the edge attribute table is dedicated to one of the plurality of edges of the directed graph and stores a JavaScript Object Notation (JSON) object corresponding to that edge.

4. A processing system for storing graph data for a directed graph in a relational database, the system comprising a processor configured to:

create a plurality of relational tables for the graph data, wherein the graph data comprises a plurality of vertexes and a plurality of edges, wherein the plurality of relational tables include 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 hashtables 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 a plurality of the vertexes of the graph data at 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.

5. The processing system of claim 4 , wherein the attribute tables includes a vertex attribute table, wherein each row of the vertex attribute table is dedicated to one of a plurality of vertexes of the graph data and stores a JavaScript Object Notation (JSON) object corresponding to that vertex.

6. The processing system of claim 4 , wherein the attribute tables includes an edge attribute table, wherein each row of the edge attribute table is dedicated to one of the plurality of edges of the directed graph and stores a JavaScript Object Notation (JSON) object corresponding to that edge.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 21, 2015
From: FOKOUE-NKOUTCHE, ACHILLE B.; HU, GANG; KEMENTSIETSIDIS, ANASTASIOS; SRINIVAS, KAVITHA; SUN, WEN B.; XIE, GUO TONG
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 035686/0542 →
Continuity (1)
Related Publication 20160342708A1 · Nov 24, 2016