Modeling Hypernode in Neo4j

479 views
Skip to first unread message

Alireza Rezaei Mahdiraji

unread,
Apr 11, 2013, 11:13:41 AM4/11/13
to ne...@googlegroups.com

Hi All,
I was wondering what is the best way to model a hypernode graph inside Neo4j?
Also, is there any specific Cypher clauses which help query such graphs?
Best,
Alireza

Michael Hunger

unread,
Apr 11, 2013, 11:37:31 AM4/11/13
to ne...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alireza Rezaei Mahdiraji

unread,
Apr 12, 2013, 5:29:55 AM4/12/13
to ne...@googlegroups.com

Hi Michael,

The link shows how to model a hyperedge in Neo4j.
A hyperedge connects several nodes together, while in
a hypernode graph each node itself could be atomic node or a
graph (a nested graph model). Any idea how this could be implemented in
Neo4j or is there any graph database which support this?

Best,
Alireza

Peter Neubauer

unread,
Apr 12, 2013, 5:36:50 AM4/12/13
to Neo4j User
Alireza,
there are a couple of projects that try to model Hypergraph, mostly academic. I know of http://www.hypergraphdb.org/index but it seems almost dormant ...


Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

The authoritative book on graph databases - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j

Alireza Rezaei Mahdiraji

unread,
Apr 12, 2013, 7:28:37 AM4/12/13
to ne...@googlegroups.com

Hi Peter,
Are you implying that this modeling is not possible in Neo4j (at least currently)?
Best,
Alireza

Jim Webber

unread,
Apr 12, 2013, 7:44:53 AM4/12/13
to ne...@googlegroups.com
Hi,

In the Neo4j 2.0 M01 preview I believe you can use labels to "tag" hypernodes. Then your Cypher queries or custom algorithms can be written to take into account those nodes that represent subgraphs.

Jim

Peter Neubauer

unread,
Apr 12, 2013, 7:48:00 AM4/12/13
to Neo4j User
Alireza,
I am saying that Neo4js model right now is a property graph with labels to handle named subgraphs. So, you can do either the explicit modeling mentioned above, or use, as Jim mentions, the new labels to denote a number of nodes that share the same affinity, see e.g. the Crew label in http://console-test.neo4j.org/

And yes, Hyperedge as a ore concept with that name does not exist in the core database engine, but well the semantics.

/peter


Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

The authoritative book on graph databases - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j


Alireza Rezaei Mahdiraji

unread,
Apr 12, 2013, 10:22:37 AM4/12/13
to ne...@googlegroups.com

Yes, what Jim said works for modeling hypernode. For interested people I found this post very useful
it contains an example about how to use labels in NEo4j.

Thanks,
Alireza
Reply all
Reply to author
Forward
0 new messages