[Neo] How to efficiently query in Neo4J?
milu71 at gmx.de
Thu Apr 8 23:35:21 CEST 2010
Alastair James schrieb am 07.04.2010 um 15:53:50 (+0100)
[[Neo] How to efficiently query in Neo4J?]:
> Briefly, the site consists of posts, each tagged with various
> attributes, e.g. (its a travel site) location, theme, cost etc... Also
> the tags are hierarchical. So, for location we have (say) 'tuscany'
> inside 'italy' inside 'europe'. For theme we have (say) 'cycling'
> inside 'activity'.
After giving this some thought, it looks to me as if there is nothing
particularly graphy in your example. I know, most everything is a graph,
but here the data is more regular: Your hierarchical catalog of tags
immediately made me think of Joe Celko's nested sets, which is a very
efficient way to represent trees in terms of sets, as found in SQL
databases. (Heresy again, I know, but well.) And the relationship of
posts to tags is simply N-M, and that's it.
There aren't any real links (edges) between posts, which arguably would
make your data model more graphy. In your model, related posts are
related by virtue of their attributes (they share some tags, or are
posted by the same user), and not eis ipsis. So I'd say there is not
much in the way of graphiness.
More information about the User