Skip to content

Commit d5d7d86

Browse files
author
charivie
committed
OC-OVER-RDF 725 cleaned up a bit
1 parent 374dff8 commit d5d7d86

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/graph_notebook/notebooks/02-Neptune-Analytics/04-OpenCypher-Over-RDF/02-Air-Routes-GeoNames.ipynb

+24-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
"In this notebook, we work around a subset of the GeoNames and AirRoutes ontologies, linked by the country code, as shown here:"
3636
]
3737
},
38+
{
39+
"cell_type": "code",
40+
"execution_count": null,
41+
"id": "69284480",
42+
"metadata": {},
43+
"outputs": [],
44+
"source": [
45+
"%graph_notebook_host g-rvcp9jxb51.us-east-1.neptune-graph.amazonaws.com"
46+
]
47+
},
3848
{
3949
"attachments": {
4050
"Airroutes-GeoNames-111.png": {
@@ -244,6 +254,18 @@
244254
"RETURN gn_country.gn::name, ar_country.rdfs::label"
245255
]
246256
},
257+
{
258+
"cell_type": "markdown",
259+
"id": "d38bce25",
260+
"metadata": {},
261+
"source": [
262+
"## Modifying the RDF graph using openCypher\n",
263+
"\n",
264+
"We can use openCypher to modify the RDF graph, by performing CRUD (create, update and delete) operations.\n",
265+
"\n",
266+
"Here we insert new edges, creating alternative connections within the data to simplify querying and pathfinding:"
267+
]
268+
},
247269
{
248270
"cell_type": "markdown",
249271
"id": "843d2e72",
@@ -281,11 +303,9 @@
281303
"id": "45a59ae1",
282304
"metadata": {},
283305
"source": [
284-
"### Modifying the linked data graph\n",
285-
"\n",
286-
"We can use openCypher to insert new edges, creating alternative connections within the data to simplify querying and pathfinding.\n",
306+
"### Create a transitive edge (shortcut)\n",
287307
"\n",
288-
"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",
308+
"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",
289309
"\n",
290310
"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."
291311
]

0 commit comments

Comments
 (0)