topogram / graph-query

A straightforward query syntax for networks
http://topogram.io/graph-query
1 stars 0 forks source link

Review of existing network query languages #2

Open clemsos opened 7 years ago

clemsos commented 7 years ago

I am going to list here some query languages for graphs that exists

Cypher

MATCH (node:Label) RETURN node.property

MATCH (node1:Label1)-->(node2:Label2)
WHERE node1.propertyA = {value}
RETURN node2.propertyA, node2.propertyB

Gremlin

user--rated[stars:0-5]-->movie
user--occupation-->occupation
movie--category-->category

gremlin> g.V().hasLabel('movie').values('year').min()

NQL

inspired by SQL -based attempt

SELECT (name like 'Roman*Empire*') 
/ [  
    depth='5' 
    USEONLY (CHN_TYPE='COUNTRY' name='country-previous-next') 
  ]
/ (name like '*Empire*') 
LIMIT 100

Facebook Graph (user search query)

notes : how the parser works

places that people who work at x visited
movies liked by people who visited x
movies liked by people who visited x-city/state

SPARQL (RDF)

SELECT ?title
WHERE
{
  <http://example.org/book/book1> <http://purl.org/dc/elements/1.1/title> ?title .
}    
clemsos commented 7 years ago

 Academic papers

PGQL: a Property Graph Query Language (2016)

1 SELECT person.eyeColor, COUNT(*), MAX(person.age)
2 // 'Brown' 1 29
3 // 'Blue' 1 43
4 FROM snGraph
5 WHERE
6 (person:Person),
7 NOT EXISTS {
8 person -[:has_father|:has_mother]-> parent,
9 parent.eyeColor = 'Blue'
10 }
11 GROUP BY person.eyeColor
12 HAVING COUNT(*) < 4
13 ORDER BY COUNT(*) DESC

A Practical Query Language for Graph DBs (201?)

selection_187

G-Path : Flexible Path Pattern Query on Large Graphs (2013 )

[name>>KEYWORD].[type=Person]”

GUESS: A Language and Interface for Graph Exploration, CHI 2006

selection_188

Gram: a graph data model and query languages (1992)

Others ref

clemsos commented 7 years ago

some more stuff here https://github.com/declarativitydotnet/declarativity