“Soccer Scouting System” with Neo4j, part 5

So far we have the following:

A connected League structure

A connected Player, Team and Club structure:

We need to connect these together, with the “TAKING_PART” connection.

Added the following code to the one from earlier:

// Init teams

CREATE (myc:Club {id:'myc', name:'My Club'})
CREATE (teamA:Team {id:'mycTeamA', name:'Team A', season:'2015-2016'})
    (teamA)-[:REPRESENTS {season:'2015-2016'}]->(myc),
CREATE (teamB:Team {id:'mycTeamB', name:'Team B', season:'2015-2016'})
    (teamB)-[:REPRESENTS {season:'2015-2016'}]->(myc),
// CREATE Players
CREATE (goalie1:Player {name:'Goalie One', birthday:20000101, position:'Goalie', handedness:'right'})
CREATE (player1:Player {name:'Left Defender', birthday:20010101, position:'Left defender', handedness:'left'})

Results in following graph: