|
35 | 35 | "In this notebook, we work around a subset of the GeoNames and AirRoutes ontologies, linked by the country code, as shown here:"
|
36 | 36 | ]
|
37 | 37 | },
|
| 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 | + }, |
38 | 48 | {
|
39 | 49 | "attachments": {
|
40 | 50 | "Airroutes-GeoNames-111.png": {
|
|
244 | 254 | "RETURN gn_country.gn::name, ar_country.rdfs::label"
|
245 | 255 | ]
|
246 | 256 | },
|
| 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 | + }, |
247 | 269 | {
|
248 | 270 | "cell_type": "markdown",
|
249 | 271 | "id": "843d2e72",
|
|
281 | 303 | "id": "45a59ae1",
|
282 | 304 | "metadata": {},
|
283 | 305 | "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", |
287 | 307 | "\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", |
289 | 309 | "\n",
|
290 | 310 | "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."
|
291 | 311 | ]
|
|
0 commit comments