Property graph model is a kind of formal definition of graph data. In this
model, data is reprensented as a directed, attributed multi-graph.
Let's say:
O is a set of objects.
K is a set of property keys.
L is a set of labels.
N is a set of values.
Then a property graph is a structure (V,E,η,λ,μ) where
V⊆O is a set of objects, called vertices.
E⊆O is a set of edges, called edges.
η:E→V×V is a function assigning each edge to an ordered
pair of vertices.
λ:V∪E→P(L) is a function assigning each object to a set
of labels.
μ:(V∪E)×K→N) is a function assigning each object and
key to a value.
Example.
Here is an example property graph of three people and their relations:
For this example:
V={1,2,3}
E={4,5,6}
η=E→V×V is:
object
vertices
4
1, 2
5
2, 3
6
3, 3
λ=V∪E→P(L) is:
object
labels
1
Emily, Kiwi
2
Grey
3
Bog
4
teaches
5
knows
6
worksFor
μ=(V∪E)×K→N is:
object
key
value
1
occupation
teacher
1
age
35
2
occupation
student
2
age
25
3
occupation
self-employed
4
subject
English
5
since
2019
6
since
2018
1.2 OPPGM - Objectified Paths Property Graph Model
Based on PGM, if we turn paths into objects, we get objectified
paths property graph model (OPPGM).
An OPPGM is a structure (V,E,P,η,δ,λ,μ) where
V⊆O is a set of objects, called vertices.
E⊆O is a set of objects, called edges.
P⊆O is a set of objects, called paths.
η:E→V×V is a function assigning each edge to a pair of
vertices.
δ:P→∪n>=0En is a function assgining each path to a
sequence of edges.
λ:V∪E∪P→P(L) is a function assigning each object to
a set of labels.
μ:(V∪E∪P)×K→N is a function assigning each object
and key to a value.
1.3 OSPGM - Objectified Subgraph PGM
Based on PGM, if we turn subgraphs into objects, we get objectified subgraph
PGM (OSPGM).
An OSPGM is a structure (V,E,G,η,γ,λ,μ) where
V⊆O is a set of objects, called vertices.
E⊆O is a set of objects, called edges.
G⊆O is a set of objects, called subgraphs.
η:E→V×V is a function assigning each edge to a pair of
vertices.
γ:G→P(V)×P(E) is a function assigning every subgraph to
a pair of vetex set and edge set.
λ:V∪E∪G→P(L) is a function assigning each object to
a set of labels.
μ:(V∪E∪G)×K→N is a function assigning each object
and key to a value.
1.4 HVPGM - Hypervetex PGM
Based on PGM, if we turn subgraphs into vertices, we get hypervetex PGM (HVPGM).
An HVPGM is a structure (V,E,η,γ,λ,μ) where
V⊆O is a set of objects, called vertices.
E⊆O is a set of objects, called edges.
η:E→V×V is a function assigning each edge to a pair of
vertices.
γ:V→P(V)×P(E) is a function assigning every subgraph to
a pair of vetex set and edge set.
λ:V∪E→P(L) is a function assigning each object to
a set of labels.
μ:(V∪E)×K→N is a function assigning each object
and key to a value.
1.5 HEPGM - Hyper Edge Property Graph Model
Based on HVPGM, if a edge can link to any non-empty sequence of vertices without
repetitions (not only 2 vertices), we get hyper edge property graph model
(HEPGM).
Ans HEPGM is a structure (V,E,η,γ,λ,μ) where
V⊆O is a set of objects, called vertices.
E⊆O is a set of objects, called edges.
η:E→∪X∈P(V)−∅[π(1),...,π(∣X∣)] is a
function assigning each edge to a non-empty sequence of vertices without
repetitions.
γ:V→P(V)×P(E) is a function assigning every subgraph to
a pair of vetex set and edge set.
λ:V∪E→P(L) is a function assigning each object to
a set of labels.
μ:(V∪E)×K→N is a function assigning each object
and key to a value.
2. Graph Data Queries
2.1 Regular Path Queries
For any property graph G=(V,E,η,λ,μ), the regular path
queries (PRQ) over G are recursively generated as follows:
∀a∈L,a∈PRQ
∀e∈PRQ,(e)−∈PRQ
∀e∈PRQ,(e)+∈PRQ
∀e,f∈PRQ,(e)/(f)∈PRQ
∀e,f∈PRQ,(e)+(f)∈PRQ
Let's say [[g]]G⊆V×V is the result of query
g∈PRQ, then:
∀g=a∈L,[[g]]G={(s,t)∣∃e∈E,η(e)=(s,t)∧a∈λ(e)}
∀g=(e)−∈PRQ,[[g]]G={(t,s)∣(s,t)∈[[e]]G}
∀g=(e)+∈PRQ,[[g]]G=transitive closure for relation[[e]]G