ARPANET Again
Explore how to set up and query the ARPANET graph using Dgraph and DQL. Learn to define schemas with reverse predicates, run path queries, and apply recursion to traverse the graph effectively, enabling you to manage complex graph data queries.
We'll cover the following...
We'll cover the following...
Here, we’ll revisit the ARPANET graph and also look at some additional DQL features: inverses, paths, and recursion.
Dgraph schema for the ARPANET
Here’s the DGraph schema for the ARPANET graph:
import GraphCommons
import RDFGraph
import RDF.Sigils
alias RDFGraph.Vocab.{DC, BIBO, DCTERMS, EVENT, FOAF, PRISM, SCHEMA, STATUS}
import GraphCommons.Utils ; alias GraphCommons.Utils
rdf_store :local
DGraph schema for ARPANET
Note the @reverse directive set on the H_LINK predicate. Also note the ~ syntax used to indicate an inverse predicate ...