# US 2017/0293697 A1 · Graph processing system that can define a graph view from multiple relational database tables

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0293697 A1
- Document ID: US20170293697A1
- Status: Published application
- Kind: A1
- Application number: 15/096,034
- Filed: 2016-04-11
- Published: 2017-10-12
- Earliest claimed: 2016-04-11
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: SIHAM YOUSHI; SUNGPACK HONG; Alexander Weld; Korbinian Schmid; Hassan Chafi
- Web page: https://patentgrep.com/patent/US20170293697A1

## CPC

- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F 16/25: Integrating or interfacing systems involving database management systems
- G06F 16/84: Mapping; Conversion
- G06F 16/90335: {Query processing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are provided for mapping tables and columns of a legacy relational schema into synthetic tables that are dedicated for graph analysis. In an embodiment, a computer receives a mapping of relational tables to node tables and edge tables. The node tables contain columns and rows. The edge tables contain columns and rows. The rows of the node tables and the rows of the edge tables define a graph. Based on the mapping and the relational tables, the computer calculates a value of at least one column of at least one row of the node tables. Based on an execution of a query of the graph, the computer returns the value.

## Claims

### Claim 1

A method comprising:
receiving a mapping of one or more relational tables to one or more node tables and one or more edge tables, wherein:
said one or more node tables comprise one or more columns and one or more rows,
said one or more edge tables comprise one or more columns and one or more rows, and
said one or more rows of said one or more node tables and said one or more rows of said one or more edge tables define a graph;
calculating, based on said mapping and said one or more relational tables, a value of at least one column of at least one row of said one or more rows of said one or more node tables;
returning, based on an execution of a query of said graph, said value;
wherein the method is performed by one or more computers.

### Claim 2 (depends on 1)

The method of claim 1 wherein calculating said value is performed responsive to receiving said mapping.

### Claim 3 (depends on 1)

The method of claim 1 wherein calculating said value is performed responsive to receiving said query.

### Claim 4 (depends on 1)

The method of claim 1 further comprising calculating, based on said mapping, a value to at least one column of at least one row of said one or more rows of said one or more edge tables.

### Claim 5 (depends on 1)

The method of claim 1 wherein calculating said value comprises calculating one row of a particular node table of said one or more node tables for each row of several rows of a particular relational table of said one or more relational tables.

### Claim 6 (depends on 1)

The method of claim 1 wherein:
a particular relational table of said one or more relational tables comprises one or more rows;
each row of said one or more rows of said particular relational table comprises one or more columns;
the method further comprises performing, based on said mapping:
calculating one row of a particular node table of said one or more node tables for each unique value of a particular column of said one or more rows of said particular relational table;
calculating one row of a particular edge table of said one or more edge tables for each row of said particular relational table;
calculating a value of a particular column of at least one row of said particular edge table based on a particular row of said one or more rows of said one or more node tables.

### Claim 7 (depends on 1)

The method of claim 1 wherein further comprising calculating one row of a particular edge table of said one or more edge tables for each row of several rows of a particular relational table of said one or more relational tables.

### Claim 8 (depends on 1)

The method of claim 1 wherein:
a particular relational table of said one or more relational tables comprises one or more rows;
each row of said one or more rows of said particular relational table comprises one or more columns;
the method further comprises calculating one row of a particular edge table of said one or more edge tables for each row, of said particular relational table, that has a non-null value in a particular column of said one or more columns of said each row.

### Claim 9 (depends on 1)

The method of claim 1 wherein:
a particular relational table of said one or more relational tables comprises one or more rows;
each row of said one or more rows of said particular relational table comprises one or more columns;
the method further comprises calculating one row of a particular edge table of said one or more edge tables for each row, of said particular relational table, that has a non-null value in a particular column of said one or more columns of said each row.

### Claim 10 (depends on 1)

The method of claim 1 wherein said mapping comprises a declarative descriptor that is encoded in at least one format of: extensible markup language (XML) or JavaScript object notation (JSON).

### Claim 11 (depends on 1)

The method of claim 1 wherein:
each relational table, of a first relational table and a second relational table, of said one or more relational tables comprises one or more rows;
each row of said one or more rows of said each relational table comprises one or more columns;
said mapping comprises at least a partial specification of a join between said first relational table and said second relational table;
calculating said value comprises calculating said value for a first column of a particular node row of said one or more node tables based on a value of a particular column of said first relational table;
the method further comprises calculating a second value for a second column of said particular node row based on a value of a particular column of said second relational table.

### Claim 12 (depends on 1)

The method of claim 1 wherein:
said one or more node tables consists of one universal node table;
each relational table of said one or more relational tables comprises one or more rows;
each row of said one or more rows of said each relational table comprises one or more columns;
calculating said value comprises calculating said value for a first column of a first node row of said universal node table based on a value of a first column of a first relational table of said one or more relational tables;
the method further comprises calculating a second value for a second column of a second node row based on a value of a second column of a second relational table of said one or more relational tables.

### Claim 13 (depends on 1)

The method of claim 1 wherein a key of said one or more node tables is based on a key of said one or more relational tables.

### Claim 14 (depends on 1)

The method of claim 1 wherein:
said mapping comprises a value transform;
calculating said value comprises applying said value transform.

### Claim 15 (depends on 1)

The method of claim 1 further comprising generating, based on said mapping, at least one of: data definition language (DDL) or data manipulation language (DML).

### Claim 16 (depends on 15)

The method of claim 15 wherein:
receiving said mapping comprises generating a stored procedure;
calculating said value comprises executing said stored procedure.

### Claim 17 (depends on 1)

The method of claim 1 wherein said query comprises at least one of: a graph traversal query, a regular path query, or a context-free path query.

### Claim 18 (depends on 1)

The method of claim 1 wherein the method further comprises calculating a second value for at least one column of at least one row of a property table that is associated with said one or more node tables, wherein said property table comprises a name column and a value column for storing name-value pairs.

### Claim 19 (depends on 1)

The method of claim 1 further comprising copying content of at least one node table of said one or more node tables, or at least one edge table of said one or more edge tables, into an in-memory representation according to at least one format of: compressed sparse row (CSR) or compressed sparse column (CSC).

### Claim 20 (depends on 19)

The method of claim 19 further comprising storing said in-memory representation into a database according to at least one data type of: binary large object (BLOB) or character large object (CLOB).

### Claim 21 (depends on 1)

The method of claim 1 further comprising creating a database view that includes a universal node table based on at least one of:
at least one row of each node table of at least two node tables of said one or more node tables, or
at least one row of each edge table of at least two edge tables of said one or more edge tables.

### Claim 22 (depends on 1)

The method of claim 1 wherein the method further comprises storing said value within a column vector.

### Claim 23 (depends on 1)

The method of claim 1 further comprising providing at least one of:
a graphical user interface (GUI) for editing said mapping, or
a graphical representation of said graph.

### Claim 24

One or more non-transitory computer-readable media storing:
first instructions that, when executed by one or more processors, cause receiving a mapping of one or more relational tables to one or more node tables and one or more edge tables, wherein:
said one or more node tables comprise one or more columns and one or more rows,
said one or more edge tables comprise one or more columns and one or more rows, and
said one or more rows of said one or more node tables and said one or more rows of said one or more edge tables define a graph;
second instructions that, when executed by one or more processors, cause calculating, based on said mapping and said one or more relational tables, a value of at least one column of at least one row of said one or more rows of said one or more node tables;
third instructions that, when executed by one or more processors, cause returning, based on an execution of a query of said graph, said value.
