Top Banner
Design of Declarative Graph Query Design of Declarative Graph Query Languages: On the Choice between Value, Languages: On the Choice between Value, Pattern and Object based Representations Pattern and Object based Representations for Graphs for Graphs Hasan Jamil Department of Computer Science Wayne State University IEEE ICDE Workshop on Graph Data Management Workshop Washington DC April 5, 2012
35

Design of Declarative Graph Query Languages: On the Choice

Feb 10, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Design of Declarative Graph Query Languages: On the Choice

Design of Declarative Graph Query Design of Declarative Graph Query

Languages: On the Choice between Value, Languages: On the Choice between Value,

Pattern and Object based Representations Pattern and Object based Representations

for Graphsfor Graphs

Hasan JamilDepartment of Computer ScienceWayne State University

IEEE ICDE Workshop on Graph Data Management Workshop

Washington DC

April 5, 2012

Page 2: Design of Declarative Graph Query Languages: On the Choice

BiologicalBiological

NetworksNetworks

Page 3: Design of Declarative Graph Query Languages: On the Choice
Page 4: Design of Declarative Graph Query Languages: On the Choice

OutlineOutline

� Algorithm v Query Language

◦ GraphQL (He and Singh 2008)

◦ SAGA (Tian et al, 2007), TALE (Tian and Patel, 2008), GADDI (Zhang, Li and Yang, 2009), NOVA (Zhu et al, 2010), etc.

� NetQL

◦ Subgraph isomorphism (ICTAI 2009, SAC 2011)

� IsoKEGG (BIBM 2010)

◦ Graph reachability (CIKM 2010)

◦ Top-k similar graphs (TCBB in press)

◦ Network extraction (SAC 2010)

Page 5: Design of Declarative Graph Query Languages: On the Choice

Many incarnations of graphsMany incarnations of graphs

Page 6: Design of Declarative Graph Query Languages: On the Choice
Page 7: Design of Declarative Graph Query Languages: On the Choice

Subgraph isomorph of subgraph Subgraph isomorph of subgraph

isomorphs of graphsisomorphs of graphs

Page 8: Design of Declarative Graph Query Languages: On the Choice

Declarative graph queryingDeclarative graph querying

� The query to find the set of graphs Gsuch that each g� G has a subgraph isomorph in another set of graphs G’such that a query graph q is a subgraph isomorph of each g’� G’.

◦ The answer is g4.

� Cannot be computed in GraphQL (He and Singh, SIGMOD 2008) or GraphGrep (Giugno and Shasha, ICPR 2002), for example.

Page 9: Design of Declarative Graph Query Languages: On the Choice

Research issuesResearch issues

� Computing this query requires a higher order query language◦ Variables need to range over set of tuples or structures◦ Completeness is at risk◦ Higher processing cost is also expected

� Compromise?◦ Develop operators such as� SQL aggregates� Data cube� Skyline � Association rule mining

Page 10: Design of Declarative Graph Query Languages: On the Choice

NyQL SolutionNyQL Solution

Page 11: Design of Declarative Graph Query Languages: On the Choice

Main IssuesMain Issues

� Representation that helps◦ Compare arbitrary graphs as single, perhaps complex, objects� Values

� No unified view of a graph

� Patterns� Need enumeration, GraphQL. Query limitations.

� Objects� In the form of a special tuple� Allows access to a whole graph through a handle� Allows comparing whole graphs without pattern enumeration

� But� Its higher order� Model graph comparisons as operators

Page 12: Design of Declarative Graph Query Languages: On the Choice

TechnicalityTechnicality

� Represent each graph as a pair <I,<V,E>> where I is a graph ID or handle, V is the set of vertices in graph I, and E is the set of edges.◦ Extension for labeled graphs� <I,<<V,Lv>, <E,Le>>>

◦ Extension for directed graphs� Enforce symmetry for E v no symmetry

� Define graph operators that satisfy this structure, undefined otherwise

� Consequence?◦ Any relation can be restructured to represent graphs

Page 13: Design of Declarative Graph Query Languages: On the Choice

DependenciesDependencies

Relation pairs: nodes and edges

X ⊆ nodes(R), IN ⋲ R, IN → X, N

discriminator of INXY ⊆ edges(S), IFT ⋲ R, IFT → Y, F and T

foreign key (N in R), FT discriminator of IFTY

Undirected: enforce symmetry of F and T

Labeled: use X and Y

Page 14: Design of Declarative Graph Query Languages: On the Choice

SyntaxSyntax

Page 15: Design of Declarative Graph Query Languages: On the Choice

Creating graphsCreating graphs

Page 16: Design of Declarative Graph Query Languages: On the Choice

QueryingQuerying

Page 17: Design of Declarative Graph Query Languages: On the Choice

Operations allowed in performOperations allowed in perform

� match, isomorph, subisomorph, similar, k-similar and circuit

� using library clause in BioFlow/Curray to support analysis tools

� Question?

◦ How to implement these operations?

◦ Query optimization?

◦ Selection, projection, join?

� Selection conditions, partial constraints a la IsoKEGG (BIBM 2010)

Page 18: Design of Declarative Graph Query Languages: On the Choice

isomorph, matchisomorph, match

� For computing isomorph, check if the query graph and the data graph have identical “type” of descriptors –restrict unification to full structure

� For match, do not apply term replacement/mapping◦ Question, how do we allow partial unification to support partial isomorphism?� Separate into two groups – no term replacement in one set (BIBM 2010)

Page 19: Design of Declarative Graph Query Languages: On the Choice

Basis Basis –– Minimum Hub CoverMinimum Hub Cover

Page 20: Design of Declarative Graph Query Languages: On the Choice

MHC of GMHC of G

Page 21: Design of Declarative Graph Query Languages: On the Choice

Computational modelComputational model

Similar to deep equality (Abiteboul and den Bussche, DOOD 1995).

Page 22: Design of Declarative Graph Query Languages: On the Choice

SearchSearch

Page 23: Design of Declarative Graph Query Languages: On the Choice

Cliques of order 3 or less of nCliques of order 3 or less of n

Page 24: Design of Declarative Graph Query Languages: On the Choice

Assembly processAssembly process

Page 25: Design of Declarative Graph Query Languages: On the Choice

IndexingIndexing

Page 26: Design of Declarative Graph Query Languages: On the Choice

IsoKEGG IsoKEGG (BIBM 2010, IJDMB 2011)(BIBM 2010, IJDMB 2011)

Page 27: Design of Declarative Graph Query Languages: On the Choice
Page 28: Design of Declarative Graph Query Languages: On the Choice

ResultsResults

Page 29: Design of Declarative Graph Query Languages: On the Choice
Page 30: Design of Declarative Graph Query Languages: On the Choice

EquivalenceEquivalence

Page 31: Design of Declarative Graph Query Languages: On the Choice

ContainmentContainment

Page 32: Design of Declarative Graph Query Languages: On the Choice

IsomorphismIsomorphism

Page 33: Design of Declarative Graph Query Languages: On the Choice

ConclusionsConclusions

� Graph querying is challenging

◦ Cost versus expressiveness

� Lacking clear model

◦ NyQL is a novel proposal

� Memory efficient computation

◦ Size is not a factor

� First to allow structure querying and comparison declaratively

Page 34: Design of Declarative Graph Query Languages: On the Choice

AcknowledgementAcknowledgement

� NSF Grants

◦ CNS 0521454 and IIS 0612203

� My students

◦ Anupam, Shafkat, Aminul, Saikat, Zakia

Page 35: Design of Declarative Graph Query Languages: On the Choice

Thank youThank you

Questions