I'm no expert, but I tried to answer your questions.

On Sat, May 1, 2010 at 7:23 PM, ilya <il...@nyc.rr.com> wrote:

> Hi all,
>
>
>
> I went through all docs on Neo site and it looks very interesting.
>  However,
> I still have couple of things I was wondering about that I couldn’t find
> answers to.  I hope I can get some information or someone can point me in
> the right direction on some of these.
>
> Sorry for many questions but really appreciate it even if only some can be
> answered.
>
>
>
> 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.
>
> Is there something in Neo that will help me achieve this? If not what’s the
> best (or good approach) of achieving this? (ie assuming I use Java  -
> should
> I keep my own class hierarchy?)
> At the same time I wonder how this structure will affect indexing/searching
> (ie find all car/sedan/Toyotas)
>
> Just create a Camry Se Node that IS_A Sedan and IS_A Car.  Traverse IS_A
> relationships and add property where the property doesn't already exist.
>
> 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
>
> Do I need to create separate nodes and properties for each color?
>

You can store a delimited string as a property or use JSON.

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?
>
>

Drives can be a relationship type which has its own properties which you can
customize. Remember that NEO doesn't really enforce the properties in a node
or a relationship, so you can add whatever you want.


> 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.
>

3 Person nodes, 2 Car nodes
Person 1 OWNED (relationship: start_date, end_date) Car 1 Node
Person 1 OWNED (relationship: start_date, end_date) Car 2 Node
Person 2 OWNED (relationship: start_date, end_date) Car 1 Node

For multi relationship objects you switch from a relationship to a node.
Trasfer Node - Sold_By Relationship to Person 1
Trasfer Node - Sold_to Relationship to Person 2
Trasfer Node - Thing_Sold Relationship to Car 1
Transfer Node can have a property of transfer_date, and transfer_price




>
> 5)      Neo clustering (load balancing) / accessing from multiple sources
> From what I read I understand that Neo only accessible from JVM that runs
> it.
> So if I want to access it from the web I would probably setup Application
> server such as JBoss and have it run in the same JVM.  How does one address
> the following:
>
> -          In case I want to do load balancing say run 2 JBoss instances in
> cluster mode that need to access Neo?
>
> -          What if I want to connect to Neo both via web and via stand
> alone
> process (probably run on different machine) for batch processing.
>
>
> See work on REST API.


>
> Sorry for too many questions but these are really important for my
> architecture.
>
>
>
> Thanks a lot,
>
> Ilya
>
> _______________________________________________
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to