Skip to content

Commit

Permalink
OC-OVER-RDF 725 cleaned up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
charivie committed Feb 3, 2025
1 parent 374dff8 commit d5d7d86
Showing 1 changed file with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
"In this notebook, we work around a subset of the GeoNames and AirRoutes ontologies, linked by the country code, as shown here:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "69284480",
"metadata": {},
"outputs": [],
"source": [
"%graph_notebook_host g-rvcp9jxb51.us-east-1.neptune-graph.amazonaws.com"
]
},
{
"attachments": {
"Airroutes-GeoNames-111.png": {
Expand Down Expand Up @@ -244,6 +254,18 @@
"RETURN gn_country.gn::name, ar_country.rdfs::label"
]
},
{
"cell_type": "markdown",
"id": "d38bce25",
"metadata": {},
"source": [
"## Modifying the RDF graph using openCypher\n",
"\n",
"We can use openCypher to modify the RDF graph, by performing CRUD (create, update and delete) operations.\n",
"\n",
"Here we insert new edges, creating alternative connections within the data to simplify querying and pathfinding:"
]
},
{
"cell_type": "markdown",
"id": "843d2e72",
Expand Down Expand Up @@ -281,11 +303,9 @@
"id": "45a59ae1",
"metadata": {},
"source": [
"### Modifying the linked data graph\n",
"\n",
"We can use openCypher to insert new edges, creating alternative connections within the data to simplify querying and pathfinding.\n",
"### Create a transitive edge (shortcut)\n",
"\n",
"Execute the following query to extend the model. It adds a direct edge between airports whenever a direct route exists, allowing for more efficient traversal.\n",
"Execute the following query to create a 'shortcut' in the model. It adds a direct edge between airports whenever a direct route exists, allowing for more efficient traversal.\n",
"\n",
"This modification, known as \"edge shortcutting\" or \"transitive edge creation,\" is a common technique in graph data modeling to enhance pathfinding efficiency and speed up queries. It is particularly useful when integrating large graphs into a unified structure."
]
Expand Down

0 comments on commit d5d7d86

Please sign in to comment.