3. DEX:GraphDatabaseManagementSystem
http://www.sparsity-technologies.com
Basic Concepts
Persistent and temporary graph management library.
Data model: Typed and attributed directed multigraph.
Node and edge instances belong to a type.
Node and edge instances have attribute values.
Edge can be directed or undirected.
Multiple edges between two nodes.
Use of identifiers.
Object (node and edge) identifiers: long
Attribute identifiers: long
Type identifiers: int
7. DEX:GraphDatabaseManagementSystem
http://www.sparsity-technologies.com
Running Example
…
DbGraph dbg = gpool.getDbGraph();
int person = dbg.newNodeType(“PERSON”);
long name = dbg.newAttribute(person, “NAME”, STRING);
long age= dbg.newAttribute(person, “AGE”, INT);
long p1 = dbg.newNode(person);
dbg.setAttribute(p1, name, “JOHN”);
dbg.setAttribute(p1, age, 18);
long p2 = dbg.newNode(person);
dbg.setAttribute(p2, name, “KELLY”);
long p3 = dbg.newNode(person);
dbg.setAttribute(p3, name, “MARY”);
…
JOHN
18
KELLY
MARY
8. DEX:GraphDatabaseManagementSystem
http://www.sparsity-technologies.com
Running Example
…
int friend = dbg.newUndirectedEdgeType(“FRIEND”);
int since = dbg.newAttribute(friend, “SINCE”, INT);
long e1 = dbg.newEdge(p1, p2, friend);
dbg.setAttribute(e1, since, 2000);
long e2 = dbg.newEdge(p2, p3, friend);
dbg.setAttribute(e2, since, 1995);
…
int loves = dbg.newEdgeType(“LOVES”);
long e3 = dbg.newEdge(p1, p3, loves);
…
JOHN
18
KELLY
MARY
2000
1995
9. DEX:GraphDatabaseManagementSystem
http://www.sparsity-technologies.com
Running Example
…
int phones = dbg.newEdgeType(“PHONES”);
int when = dbg.newAttribute(phones, “WHEN”, TIMESTAMP);
long e4 = dbg.newEdge(p1, p3, phones);
dbg.setAttribute(e4, when, 4pm);
long e5 = dbg.newEdge(p1, p3, phones);
dbg.setAttribute(e5, when, 5pm);
long e6 = dbg.newEdge(p3, p2, phones);
dbg.setAttribute(e6, when, 6pm);
…
JOHN
18
KELLY
MARY
2000
1995
4pm
5pm
6pm
13. DEX:GraphDatabaseManagementSystem
http://www.sparsity-technologies.com
Schema Module
A high-level logical view of the graph structure
Encapsulates graph generation and maintenance
Definition of schemas through script files
dbgraph WIKIPEDIA (
datasource WIKIPEDIA (
dataset TITLES ( ID int, NLC string, TITLE string )
dataset IMAGES ( ID int, NLC string, FILENAME string )
)
edge REFS ( NLC string, TYPE string ) // TITLES --> TITLES
edge IMGS ( ) // TITLES --> IMAGES
)
14. DEX:GraphDatabaseManagementSystem
http://www.sparsity-technologies.com
Exploral Module
Framework for complex queries
Extracts data from the DbGraph to return multiple graph results
Multiple phases and tasks
Querying: selects objects and explodes relationships
Preparing: transforms and filters the candidate graphs
Mining: finds the graphs that match a condition
Browsing: prepares the result graph for the visualization tool
A
B