1

I've started with a project where I need to present my data as hypergraph. The idea is:
I have sequence of elements (vertices) and I can mix them (create edge). Every edge can be mixed with elements. The idea looks like this:

                result
                 /
            mix(1+2) +
            element 3
                |
                +---------+
                |         |
             element      |
             1+2(mix)  element
               /|         3
              / |
             /  |
            /   |
        element |
           1    |
             element
                2

I need to know all mixes and save the result. After I have enough data I'll need to analyze it and when user picks 3 or more elements I'll need to show all the results he can get.

I need to build a db structure to support graph algorithms and it must work fast. Which type of database will solve this and how I should build the structure? Do I need to use graph database, sql or NoSql?
I'll appreciate any ideas or examples.

Lokki
  • 372
  • 1
  • 6
  • 20

2 Answers2

1

It depends on what type of queries you want to run. But for graph oriented exploration (read graph traversals) a graph database is what you need.

To support hyper-edges in any graph-databases, the trick is to create a node with a type: hyperedge and link nodes to it exactly like you did in your figure.

The hyperedge object can have child nodes or hyperedge objects (the results of a query).

To implement this, the fastest graph database I know is Sparksee written in C++ with .Net, Java, Python, Obj-C bindings. It is free for academic usage (you will need a serial anyways.)

Otherwise, you can use Neo4j which is the most popular graph database (free for open-source).

If the scale of your data is very big, you maybe want to explore Titan, and open-source graph database on top of Cassandra, or HBase (2 NoSQL databases).

Kirell
  • 9,228
  • 4
  • 46
  • 61
  • Thank you, I'll have a look at all of them. – Lokki Jul 15 '15 at 06:04
  • Of course I will. I wanted to mark it as useful, but my reputation doesn't allow me to do it yet. I'll read about all the databases you mentioned and then accept the answer :) – Lokki Jul 15 '15 at 08:27
1

You could try HypergraphDB http://www.hypergraphdb.org/.

It is a simple Java library (jar file to add to your project) and uses an embedded database as backend, it permits you to work with graphs without installing a specific background running server.

sarah.ferguson
  • 3,167
  • 2
  • 23
  • 31