Database Reference
In-Depth Information
We can then easily import a sample dataset into Neo4j. With a simple query, we
can see how many relationships we have from a certain type to get some insight
in the database:
The BCM database content
The sample dataset in total has 817 nodes and (as you can see from the preceding
screenshot) 1988 relationships. This is enough to ask some interesting questions
that are appropriate for our use case.
Which applications are used in which buildings
Let's say that we would like to use the graph model to determine which applications
areusedinspeciiclocations/buildingsofourcorporation.Then,ourCypherquery
would look something like the following:
MATCH (app:Application)<-[:USES]-(proc:Process)-[:USED_BY]-
>(bl:BusinessLine)-[:LOCATED_IN]->(b:Building)
RETURN DISTINCT app.name AS Application , b.name AS Building
ORDER BY app.name ASC;
Notethatthisisquiteanexpensivequerytorun,asitdoesnotuseanyspeciic
starting points in our graph traversals—it is a global query. However, the result
comes back quickly for this dataset:
 
Search WWH ::




Custom Search