Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You model looks good, however after looking at your use cases, I have a few questions/suggestions:</p> <h1>Query</h1> <p>I'll give these in Cypher as it's easiest to show in this format.</p> <p>Player</p> <p><em><strong>Show all the leagues played by a player.</em></strong></p> <pre><code>START player=node:Player('indexForPlayer') MATCH player-[PLAYED]-&gt;match-[PART_OF]-&gt;league RETURN league </code></pre> <p><em><strong>Show all the matches played by a player in each league.</em></strong></p> <pre><code>START player=node:Player('indexForPlayer') MATCH player-[PLAYED]-&gt;match-[PART_OF]-&gt;league RETURN match, collect(league) </code></pre> <p><em><strong>Player's current team and his previous teams.</em></strong></p> <pre><code>START player=node:Player('indexForPlayer') MATCH player-[BELONGED_TO]-&gt;team RETURN team </code></pre> <p><em><strong>How many times the player was a captain and all the leagues for which he was the captain.</em></strong> </p> <pre><code>How do you determine if they were a captain of a league? </code></pre> <p>Team <strong><em>How many times the team was a winner or runner.</em></strong> You might want to put this as a relationship such as <code>(match)-[WINNER]-&gt;(team)</code> this way to find out how many wins your team has, all you have to do is count the <code>WINNER</code> relationship. </p> <h1>Data Model</h1> <p>Add a property to the <code>Match</code> node for date played. I'm unfamiliar with sports, but Year may not be enough if they can swap teams within a year, however <code>Neo4j</code> doesn't really have a good method for dealing with time, other than a 'seconds since epoch ` type system. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload