cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Graph Data Modeling: All About Relationships - Bank Transfer Example

@DavidAllen wrote a great article "Graph Data Modeling: All About Relationships" However, as a learner, I tried to make the bank transfer example work and could not figure it out. I realize I need to create the wf and c nodes, but got hung up on b:BankTransfer and b:Account
/* Much better */
MATCH (wf:Bank { name: "Wells Fargo" })
MATCH (c:Currency { name: "USD" })
CREATE (a:Account)-[:INITIATES]->
(b:BankTransfer { id: 555, time: '2pm', amount: 123 })
-[:RECEIVES]->(b:Account)
CREATE (b)-[:ORIGIN_BANK]->(wf)
CREATE (b)-[:CURRENCY]->(c)

1 ACCEPTED SOLUTION

MATCH (wf:Bank { name: "Wells Fargo" })
MATCH (c:Currency { name: "USD" })
CREATE (a:Account)-[:INITIATES]->
(b:BankTransfer { id: 555, time: '2pm', amount: 123 })
-[:RECEIVES]->(acc:Account)
CREATE (b)-[:ORIGIN_BANK]->(wf)
CREATE (b)-[:CURRENCY]->(c)

View solution in original post

1 REPLY 1

MATCH (wf:Bank { name: "Wells Fargo" })
MATCH (c:Currency { name: "USD" })
CREATE (a:Account)-[:INITIATES]->
(b:BankTransfer { id: 555, time: '2pm', amount: 123 })
-[:RECEIVES]->(acc:Account)
CREATE (b)-[:ORIGIN_BANK]->(wf)
CREATE (b)-[:CURRENCY]->(c)