Tobias,Thank you for the informative reply! Im very glad that python is
supported (crossing my fingers for some sort of
django-like declarative syntax). Unfortunately I did run into an
installation problem earlier. Not sure if you had a chance to fix it, but it
turned out to be a missing URI tag in POM.xml and Elementtree appending
namespaces to tags.

Just discovered Allegrograph and it looks every bit as interesting (comes
with python bindings too!) Would love to hear opinions/comments on it if
any.

Thanks again!
Johny h.

On Thu, Jun 11, 2009 at 5:27 PM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> On Wed, Jun 10, 2009 at 9:41 PM, johny ho <jho...@gmail.com> wrote:
>
> > Hi,
> > I came across Neo4j while reading some articles on CouchDB and other
> > alternatives to RDMS. The idea that both nodes and relationships are
> > first-class citizens is very exciting. Im going to experiment with it
> using
> > Neo4j.py when i get the free time.
>
>
> Hi Johny,
>
> Yes, these are interesting times. I watch with great excitement as more and
> more people are getting interested in database models that in some way or
> another differ from the relational model that has dominated the area for
> such long time now. In particular I am of course happy to see the attention
> that goes to Neo4j, as in the case with you. Being the principal
> implementer
> of Neo4j.py, this makes me even more excited. I got back from a trip the US
> just yesterday, and am feeling just slightly jet lagged, otherwise I would
> have responded to your e-mail sooner.
>
>
> > Meanwhile i have a couple of newbie
> > questions that maybe somebody in the community could answer:
> >
> >   1. Node IDs. Quickly looking at the docs: "Ids are garbage collected
> over
> >   time so are only guaranteed to be unique at a specific set of time".
> Does
> >   this mean that the only way to set a ID for a node that can be
> referenced
> >   later, for example invoice numbers, would be to use UUIDs (much like
> how
> >   CouchDB identifies its' documents)? There was an example on the wiki
> > about
> >   auto-incrementing unique IDs, but isn't this also subject to race
> >   conditions?
>
>
> A node, once created keeps its ID until it is deleted. At this point the
> now
> unused ID may be reused by a new node. If you never delete the node in
> question you can rely on it having the same ID.
>
> IDs do, of course, not make much sense for many kinds of lookup, which is
> why we have the index utilities. When using Neo4j.py you will find that
> these are integrated into the experience.
>
> >
> >   2. Is it possible to to guarantee the uniqueness of a property?
> Something
> >   like email address as a login name for users? I guess i could always
> use
> > an
> >   alternative thrid party authentication.
>
>
> There are no constraints of this sort in Neo core. Neither built into
> Neo4j.py. The easiest way to implement this is to use an index for that
> property. So each time where your code sets the e-mail property, it does an
> index lookup in the e-mail index. If the lookup returns a node you will
> know
> that the value was not unique. If None is returned then there is no node
> with that e-mail, and you can go ahead and add it.
>
> We have been discussing exposing an event framework that could be used to
> implement such a constraint system, or automatic indexing of specific
> properties for that matter. The core developer team is having a meetup this
> weekend where I will make sure that the event-subsystem gets discussed. At
> the last meetup we set the schedule for the event framework to be included
> in the beta 10 release. I don't want to make any guarantees though, since
> this could still change (although I find it unlikely).
>
> >
> >   3. Can i reference a node from a relationship? for example
> >   A---->KNOWS---->B, become A----->KNOWS from School---->B with School
> > being a
> >   node.
> >
>
> Relationships in Neo4j are strictly from one node to one other node. This
> fits most common uses cases and helps us keep the performance
> characteristics of the API predictable. The usual way you model this is by
> having the semanitc knowledge of this structure in your domain model, and
> insert an intermediate node representing the reification of the
> relationship.
>
> In your example this would become:
>
> Alice ---KNOWS---> (intermediate) <---KNOWS--- Bob
>                    |
>                    |--FROM---> School
>
> In your domain model you would *know* that a KNOWS-relationship always ends
> up in a node that has two incoming KNOWS-relationships, one for each person
> who knows the other (it is a bi-directed relationship, that is why both are
> incoming), and one FROM-relationship to a node representing where the two
> persons got to know each other. You will know that it has this structure
> because this is how you always create it in your domain model.
>
> Thank you for these questions, they will make a good addition to our
> ever-growing library of questions and answers. Isn't it great how you can
> be
> a contributor to a project simply by asking questions? We do very much
> value
> the questions we get, as this helps us improve our documentation and find
> out what tools and libraries we should focus our efforts on.
>
> Now that I know that you will be looking at Neo4j.py tomorrow, I will make
> sure to spend some time on it tomorrow and fix the problem I discovered in
> the install script. Hopefully I will get there before you do, so that you
> don't have to experience this problem. If you do encounter any problem with
> Neo4j.py please file a ticket (https://trac.neo4j.org/newticket) or send
> an
> e-mail to either this list, or to me directly.
>
> Happy hacking,
> --
> Tobias Ivarsson <tobias.ivars...@neotechnology.com>
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> _______________________________________________
> 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