neo4j-contrib / neoclipse

Graph Database Tool
218 stars 136 forks source link

Possible to create duplicate relations between nodes #21

Closed nrkkalyan closed 12 years ago

nrkkalyan commented 12 years ago

It is possible to create an already existing relation between 2 nodes as a duplicate relation. Please check if the relation already exist between the 2 nodes, if yes then ignore creating or display error.

nawroth commented 12 years ago

Creating duplicate relationships is perfectly valid on the database level, so I don't think this should be prohibited. But a warning could maybe be helpful to prevent users adding such a rellationship by mistake.

nrkkalyan commented 12 years ago

Hi Andres,

Thank you for replying, Can you also please give me a use case where duplicate relations between nodes is required or could be possible.

Kalyan

On Mon, Jan 23, 2012 at 8:55 AM, Anders Nawroth < reply@reply.github.com

wrote:

Creating duplicate relationships is perfectly valid on the database level, so I don't think this should be prohibited. But a warning could maybe be helpful to prevent users adding such a rellationship by mistake.


Reply to this email directly or view it on GitHub: https://github.com/neo4j/neoclipse/issues/21#issuecomment-3610305

Thanks and Regards N Radhakrishna Kalyan

nawroth commented 12 years ago

Hey!

I'm not sure tools on top of Neo4j should make too much effort to question operations supported by the DB itself :-) If the DB supports it, I think they should as well! Or users will sooner or later be disappointed.

Anyhow, I'd use duplicate relationships when modeling transportation for example. Let's say we have a rail network, then there'll probably be duplicate relationships between cities for different trains (but having different properties then). Or let's say we're tracking trucks ... they'll head down the same roads many times, which could be modeled as many relationships of the same type.

I do realize that for beginners, it would be useful with a warning in this case. But thinking about people having such use-cases all the time, there should be an option to turn it off as well. (maybe just a checkbox with the warning itself?)

/anders

nrkkalyan commented 12 years ago

Yes duplicate relations with different properties makes sense.

Thanks for your explanation.

Sent from my iPhone

On Jan 23, 2012, at 12:04 PM, Anders Nawrothreply@reply.github.com wrote:

Hey!

I'm not sure tools on top of Neo4j should make too much effort to question operations supported by the DB itself :-) If the DB supports it, I think they should as well! Or users will sooner or later be disappointed.

Anyhow, I'd use duplicate relationships when modeling transportation for example. Let's say we have a rail network, then there'll probably be duplicate relationships between cities for different trains (but having different properties then). Or let's say we're tracking trucks ... they'll head down the same roads many times, which could be modeled as many relationships of the same type.

I do realize that for beginners, it would be useful with a warning in this case. But thinking about people having such use-cases all the time, there should be an option to turn it off as well. (maybe just a checkbox with the warning itself?)

/anders


Reply to this email directly or view it on GitHub: https://github.com/neo4j/neoclipse/issues/21#issuecomment-3612167