Database Reference
In-Depth Information
From a reading, querying, and traversing perspective, any data written into the underlying
graph from SDN can safely be accessed in a read-only manner using any of the native
Neo4j tools you've come across thus far, such as Cypher via the Web Admin Console, the
Neo4j Shell, and so on.
SDN tries to be as unobtrusive as possible when it comes to storing data in the graph,
but it needs to store some meta information in order to do some of the things it does.
For example, there are a few different ways in which a domain model's Java hierarchy
can be represented in the graph, and these options are handled by something called
type representation strategies . These strategies rely on storing some information in the
graph. The LabelBasedNodeTypeRepresentationStrategy (which is the de-
fault strategy from SDN 3.0 onward) creates labels against the underlying nodes based on
the simple class names of the node entities. The IndexingNodeTypeRepresenta-
tionStrategy creates legacy indexes as well as adding a property called __type__
on each entity, whereas the SubReferenceNodeTypeRepresentationStrategy
may create INSTANCE_OF and SUBCLASS_OF relationships between entities.
You'll need to understand and take this additional meta information into account if you
want to update the underlying entities outside of SDN. Creating a new Person entity, for
example, may involve more than simply adding one node in the graph with its basic attrib-
utes.
We can't cover all the scenarios where meta information is used and stored by SDN, but
we can highlight this point here to make you aware of it and the possible limitations it may
impose on you should you consider using SDN.
For more information about the different type representation strategies available, see the
“Entity type representation” detailed in http://docs.spring.io/spring-data/neo4j/docs/cur-
rent/reference/html .
Before we move on to the final functional section regarding how to perform queries and
traversals using entities, let's detour to cover OGM. We've occasionally referred to simple
object mapping throughoutthischapter,andnow'sthetimetodefineexactlywhatwemean
by this.
Search WWH ::




Custom Search