IP Library › Granted Patent US 10,387,497
Granted Patent B2
US 10,387,497 · App. 14/742,735 · 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,497
App. No.
14/742,735
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 (14)

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.

2. The method of claim 1 , wherein the attribute table 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 method of claim 1 , wherein the attribute table 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 Jun 18, 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 035943/0275 →
Continuity (2)
Continuation 14718147 · May 21, 2015
Related Publication 20160342709A1 · Nov 24, 2016
Cited By (1)
US 12,339,841