14
Converting Relational to Graph Databases Roberto De Virgilio Riccardo Torlone Antonio Maccioni a u t h o r au t h o r a uth or New York, USA 23 June 2013 GRADES 2013 a f f i l i a t e d affiliated affil iated In proceeding where when where affiliated workshop t o p i c t o p ic

Converting Relational to Graph Databases

Embed Size (px)

DESCRIPTION

Graph Database Management Systems provide an effective and efficient solution to data storage in current scenarios where data are more and more connected, graph models are widely used, and systems need to scale to large data sets. In this framework, the conversion of the persistent layer of an application from a relational to a graph data store can be convenient but it is usually an hard task for database administrators. In this paper we propose a methodology to convert a relational to a graph database by exploiting the schema and the constraints of the source. The approach supports the translation of conjunctive SQL queries over the source into graph traversal operations over the target. We provide experimental results that show the feasibility of our solution and the efficiency of query answering over the target database.

Citation preview

Page 1: Converting Relational to Graph Databases

Converting Relational to Graph Databases

Roberto De Virgil io

Riccardo Torlone

Antonio Maccioni

author

author

author

New York, USA

23 June 2013

GRADES 2013

affil

iate

d

affiliated

affiliated

In proce

eding

wherewhen

where

affiliated workshop

topi

c

topi

c

Page 2: Converting Relational to Graph Databases

Relational Database Migration

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

SQLselect *from Twhere T.A1 = v1

Page 3: Converting Relational to Graph Databases

R2G: Features

● Data migration

● Query translation

● Automatic non-naïve approach

● Try to minimize the memory accesses

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 4: Converting Relational to Graph Databases

Graph Modeling of Relational DB

● Full Schema Paths:FR.fuser → US.uid → US.unameFR.fuser → FR.fblog → BG.bid → BG.bnameFR.fuser → FR.fblog → BG.bid → BG.admin → US.uid → US.uname ...

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 5: Converting Relational to Graph Databases

Basic Concepts• Joinable tuples t1 ∈ R1 and t2 ∈ R2:

● there is a foreign key constraint between R1.A and R2.B and t1[A] = t2[B].

• Unifiability of data values t1[A] and t2[B]:● (i) t1=t2 and both A and B do not belong to a multi-

attribute key;● (ii) t1 and t2 are joinable and A belongs to a multi-

attribute key;● (iii) t1 and t2 are joinable, A and B do not belong to a

multi-attribute key and there is no other tuple t3 that is joinable with t2.

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 6: Converting Relational to Graph Databases

Data Migration (1)● Identify unifiable data exploiting schema and constraints

FR.fuser US.uid US.uname

FR.fuser : u01

n1

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 7: Converting Relational to Graph Databases

Data Migration (2)● Identify unifiable data exploiting schema and constraints

FR.fuser US.uid US.uname

FR.fuser : u01US.uid : u01

n1

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 8: Converting Relational to Graph Databases

Data Migration (3)● Identify unifiable data exploiting schema and constraints

FR.fuser US.uid US.uname

n1

FR.fuser : u01US.uid : u01

US.uname : Date

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 9: Converting Relational to Graph Databases

Data Migration (4)● Identify unifiable data exploiting schema and constraints

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 10: Converting Relational to Graph Databases

Query Translation

XQueryGremlin

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 11: Converting Relational to Graph Databases

Experimental Results

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 12: Converting Relational to Graph Databases

• Automatic data mapping

• Conjunctive query translation into a path traversal query

• Independent of a specific GDBMS

• Efficient exploitation of Graph Database Features

Conclusion

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 13: Converting Relational to Graph Databases

• Consider frequent queries to migrate data

• Consider wider range of queries than CQ

• Improve compactness of the graph database

Future Work

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013

Page 14: Converting Relational to Graph Databases

Thanks For The Attention

... demo presentation during the following interactive session!

GRADES 2013 Converting Relational to Graph Databases New York, 23-06-2013