I have to store biological interactions in a Neo4j database. For example, 
consider a scenario where I have two types of nodes, Protein & Experiment 
and a relationship INTERACTS_WITH. The relationship exists as 
(Protein)-[INTERACTS_WITH]-(Protein). Now, the INTERACTS_WITH also relates 
to Experiment because this biological interaction was observed in that 
experiment.


I need to relate the INTERACTS_WITH relationship to the Experiments.


One way to achieve this can be to store the ID of all such Experiments in 
an array type property of the INTERACTS_WITH relationship. But that will be 
just like storing the Primary Key of an entity as Foreign Key of another 
entity in the relational database, which I want to avoid.


Another way can be to create an Interaction node for each pair of 
interacting genes and then relate it to the two Proteins and the 
Experiments. But an interaction is possible between two Protein nodes only, 
so I will have to programmatically put a constraint on the number of 
Protein nodes that relate to an Interaction node. This approach is also not 
good because INTERACTS_WITH is actually a relationship and perhaps it will 
be not a good idea to model it as a node.


Is there a better, graphical way to do this? If not, which of the above two 
approaches will be better?

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to