# Modelling trails that share point locations and segments

**URL:** <https://community.neo4j.com/t/modelling-trails-that-share-point-locations-and-segments/14226>\
**Category:** Modeling\
**Tags:** cypher\
**Created:** [January 31, 2020, 8:49am UTC](https://community.neo4j.com/t/modelling-trails-that-share-point-locations-and-segments/14226 "2020-01-31T08:49:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![D\_C](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/d_c/32/19041_2.png) [@D\_C](https://community.neo4j.com/u/D_C)\
**Post date:** [July 6, 2021, 3:43pm UTC](https://community.neo4j.com/t/modelling-trails-that-share-point-locations-and-segments/14226/6 "2021-07-06T15:43:34Z")

</div>

interesting idea using multiple labels to indicate the trail / session. I wonder how that would scale? I saw this thread that talked about the pros/cons of using route labels vs intermediate nodes

> [@What is a preferable way to model a context of relationships?](https://community.neo4j.com/t/what-is-a-preferable-way-to-model-a-context-of-relationships/13500):
>
> Let's assume that we have 2 types of nodes i.e. Node1 and Node2. They can be connected via BELONGS\_TO relationship e.g.: (:Node1) - [:BELONGS\_TO] -\> (:Node2). Now we want to associate additional information with each BELONGS\_TO relationship. Let's call it context. This context will be used for querying/filtering. We see 3 possibilities of how to implement that: Add a property to the edge e.g. (:Node1) - [:BELONGS\_TO {context: 'XXX'}] -\> (:Node2) Use a context as a label e.g. (:Node1) - …

It just seems the name of the label is a 'key' whereas your trails are more like the 'value', so using labels in the way you're proposing seems like it would run out of steam, to say nothing about how indexes work?

For my project, with cypher I'm having trouble just getting back info on arbitrary sized paths with a different number of nodes in-between, as per:

> [@How to get edge properties in query result?](https://community.neo4j.com/t/how-to-get-edge-properties-in-query-result/40930/3):
>
> Thanks @cobra actually didn't know about this. That does get a bit further.. it allows me to get the list of edges data, but not any data on in-between nodes. eg I can get {startNode}, [{edge}, {edge}, {edge} ...] { endNode } The benefit of the patterns like -[\*..2]- is that I can have a varying number of edges AND nodes. What I really want is just a sequence of objects, of varying types, eg: [[{node}-{edge}-{node}], // first path [{node}-{edge}-{node}-{edge}-{node}] // longer …

If you're going with a node-first approach I'd be interested to see your queries to read that stuff back (and what driver you're using).

---

_[View the full topic](https://community.neo4j.com/t/modelling-trails-that-share-point-locations-and-segments/14226)._
