215 points · by based2 · 5y ago · 45 comments
Another way to put it is: it is straightforward to map a property graph to a triple store. In most cases, the property graph will have fewer nodes and edges and will operate faster and be easier to maintain.
- Bill Gates
Also note that just because you can do something doesn't mean that it will be efficient, or that it will be enjoyable to work with.
http://www.opencypher.org/articles/2019/09/12/SQL-and-now-GQ...
But RDF can't claim the "standardization" argument in good faith when RDF/SemWeb overshadowed Datalog/Prolog (based on a true ISO and community standard) for such a long time. SemWeb, like XHTML, SOAP/WS-* and other W3C stuff, failed on the web to become an enterprise-y thing instead, W3C being a pay-as-you-go org.
I found this presentation from 2017 about AgensGraph: https://www.slideshare.net/mobile/kisung80/agensgraph-a-mult...
Example from the n4j Cypher docs, for the curious:
MATCH (user:User { name: 'Adam' })-[r1:FRIEND]-()-[r2:FRIEND]-(friend_of_a_friend)
RETURN friend_of_a_friend.name AS fofName
Returns names of friends-of-friends (connected with FRIEND-labeled edges) User nodes having the "name" property "Adam". Stuff like "friend_of_a_friend" is set as an alias for the matched nodes, like in SQL. () denotes a node, [] an edge. (It's been a while, so this explanation may be subtly wrong, but it's close)In terms of graphs, there is also an implementation of Tinkerpop which allows using Gremlin, very different in nature to Cypher.
http://www.sqlg.org/docs/2.0.1/
NB: I believe cypher can compile to bytecode that runs on the tinkerpop engine which I found interesting
A graph database is about storing data that the relationships between pieces of data, like a social graph as an example. You'd have a people and the relationships between them in the database.
Rather, pgRouting is a set of general graph- and path-search algorithms, exposed as procedures, that operate upon rowsets (most efficiently, upon indexed tables) of vertices and edges. You can use pgRouting to do SPARQL-like graph queries, or even full-blown network analysis, if you like.
In a previous job, I did just that: I loaded up social-network data into vertex and edge tables, and then I used pgRouting's implementation of Floyd-Warshall and Driving Distance to discover high-value potential social connections within a given relationship-weighted distance of a given user. Not as a one-time data-science thing, but as the backend of our service's matching engine, that ran every time a user refreshed their "candidate matches" page. It was pretty instantaneous.
I also chuckled at "Repeat 4 and 5." written in a `<ul>`
I _think_ it's just syntactic sugar and doesn't let you do anything you couldn't already do, although perhaps it would leave room in the future for the Postgres team to optimize query execution.
- https://github.com/apache/incubator-age/commit/bef50e5d86d45... (Mar 19, 2019)
- https://github.com/FiloSottile/age/commit/06cbe4f91ea9843069... (Oct 6, 2019)
What does this mean? Absolutely nothing.