neo4j - Conditional Relationship in Graph DB -


how graph model handle conditional relationship like:

(alice -[dates]-> bob)   [dates] exists if , if  (bob -[owns]-> ferrari) true 

besides querying, i'm wondering whether relationship applied database engine based on condition or whether needs managed in application.

i can't speak arangodb, neo4j bit has addressed application. bits of schema can assert graphs don't address kinds of relationships can exist off of node type. contingent relationships you're talking step further even.

doing validation can more complex first appears. let's bob owns ferrari. , alice dates bob (so shallow!). fine , -- whether enforced application or database. ok now, bob sells ferrari. should database do?

  1. should bob prohibited selling ferrari? (i.e. delete of relationship fails)
  2. should alice forced break bob? (i.e. delete of dates relationship....brutal!)
  3. should nasty error thrown?

these domain-specific considerations. you'd want in application layer think through validation conditions, , right thing. if graph database did support it, it's not clear you'd want use graph database's default enforcement policy (whatever be).


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -