Modeling conditional relationships in neo4j v.2 (cypher)

前端 未结 1 1323
天涯浪人
天涯浪人 2021-01-26 00:40

I have two related problems I need help with.

Problem 1: How do I model a conditional relationship? I want my data to indicate that when test CLT1\'s \"Result\" property

相关标签:
1条回答
  • 2021-01-26 00:43

    For your first question, I'd take the relationship-centric approach as this kind of represents the inference of the information leading from your result-node to the disease.

    Should work pretty well in modeling and querying too.

    For your second question. That's what node-labels are for they represent different roles a node can play, each with different relevant properties and relationships.

    So you could do MATCH (p:Person {name:"Jose"}) and treat it differently from MATCH (d:Developer {name:"Jose"}). I.e look at other props and rels.

    0 讨论(0)
提交回复
热议问题