What are the advantages of using a graph database?

Mingxi Wu wrote an interesting article about graph databases. The question is - what are the advantages of using a graph database?

The data usage patterns have changed dramatically in the last ten years or so, and various organizations are interested in 'hidden' relationships between data - ones that were not initially recognized or planned for the database. This is when the graph databases may be used.

The question stated by Mingxi is quite broad in fact. There are situations when using a graph database may not be advantageous. However, there is a benefit of storing data in relational structures and underlying storage. Yes, the queries retrieving the data may not be as close to the domain language as the ones used in graph databases, but they do the work - and it might be, they do the work better in some cases.

I like the article and its backing example. There is some elegance in the query loading the CSV file into the database, and creating the graph.

Tigergraph db sample graph

 

# define the loading job
CREATE ONLINE_POST JOB load_cf FOR GRAPH gsql_demo {
  LOAD
    TO VERTEX User VALUES ($0),
    TO VERTEX User VALUES ($1),
    TO EDGE Liked VALUES ($0, $1)
    ;
}
# load the data
RUN JOB load_cf USING FILENAME="../cf/data/cf_data.csv", SEPARATOR=",", EOL="\n"

Now, have you noticed? The graph is described in a CSV file - which is pretty much a table!

Leave a comment

Please note, comments must be approved before they are published