Hi Ilya!

> 1)      Inheritance.
> Suppose I want to draw tree where every node is derived from other node; say
> Car à Sedan à Toyota
> So when creating Toyota node I don’t need to recreate same properties and
> relationships that Sedan has.

I think this example can help you:
http://blog.neo4j.org/2010/03/modeling-categories-in-graph-database.html
Java code for the example is found here (blog post uses Python):
http://github.com/neo4j-examples/java-shop-categories

> 2)      Multi value properties
> When it come to properties I see I can store key=value pairs but what if I
> want to store key=values
> For example, I’d like to have property possibleColors where my values are
> red, blue, green, etc

Neo4j has multivalue properties, see:
http://api.neo4j.org/current/org/neo4j/graphdb/PropertyContainer.html#setProperty%28java.lang.String,%20java.lang.Object%29

> Do I need to create separate nodes and properties for each color?

I'd go for having a node represent each color, and then draw 
relationships from car nodes to all color nodes that are possible for 
that car. Then you can store extra information on the color as 
properties on the color node (and by adding relationships for example to 
the manufacturer node or whatever).

> 3)      Interfaces
> If I have the following: person – drives -> car,  person – drives -> boat
> Is there a way to define drives interface which might have its own
> properties that can be used as template or even reused in both relationships
> above? If not what’s the good approach to achieve this?

In our IMDB example we have Actor --Role--> Movie, where the Role is a 
wrapper around the realtionship. Not sure if that's what you're looking for.
http://wiki.neo4j.org/content/IMDB_The_Domain
Or maybe your looking for something like meta model?
http://components.neo4j.org/neo4j-meta-model/

> 4)      Categorizing/grouping multiple nodes including relationships
> What  is the best strategy of grouping nodes if I want to include
> relationships as well?
> For example, person 1 – owns à car 1    car 1 – sold à person 2  then car 1
> -- sold àperson 3
> I want to keep track of how long each person had car 1; this also need to
> account for each person having more than one car.

Not sure what your requirements are here. One simple way to model this 
would be "purchased" and "sold" relationships between persons and cars, 
both having a property keeping the date. Depending on your needs, you 
could have a current_owner relationship as well.

> 5)      Neo clustering (load balancing) / accessing from multiple sources
> From what I read I understand that Neo only accessible from JVM that runs
> it.

I leave this one for someone else to chime in on!


/anders

_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to