Should one make an effort to keep "node 0" from becoming a 'supernode'?
-----Original Message----- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Steven Kalemkiewicz Sent: Friday, September 02, 2011 10:58 AM To: Neo4j user discussions Subject: Re: [Neo4j] 10 questions What would you consider the lower-bound to be to classify a node as a supernode? I saw that you referred to a city node with 100K relationships... -Steve On Fri, Sep 2, 2011 at 10:33 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > > 1, what's the general rule for choosing properties or relationship? > > say a User lives in a City, which just contains a simple int id > > value. to find users live in a city, i can do a simple traversal, of > > all user nodes, or find the city node first, then collect all the > > users. seems to me both ways work and share same level of performance. > > (am i right here?) > > > Generally, if a number of properties really is denoting the same > concept (like a city) and you don't want to duplicate the data, and be > able to traverse or query it, I would introduce nodes. However, if the > node woudl turn into a supernode (like a city node with 100K > relationships), then consider introducing an in-graph indexing > structure, or an out-of-graph external index like Lucene in order to > look up relationships or nodes when you need them, since that will be cheaper. > > 6, say a facebook user may "likes" thousands of things, and these > > things are sparsly connected. in this case, things should be modeled > > as nodes or array property? > > > Nodes. Sparse connections are one of the places where Neo4j shines - a > fairly balanced graph where supernodes are seldom. > > _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user