Take quiz below to complete unit.

DSE Version: 6.0

DSE Graph Intro


Write Up




DSE Graph is a property graph database. A property graph database is a persistent set of vertices (nodes) and edges (connecting lines), where the vertices represent things and the edges represent relationships between things. Properties are name/value pairs you can associate with vertices and/or edges. This learning unit gives and introduction to DSE Graph.


Write Up

While relational databases are great for a lot of applications, some applications require an extremely rich set of relationships. Modeling these relationships can become cumbersome using conventional relational join tables. For these types of problems, graph databases may be a better solution. DSE offers just such a graph database as part of the DSE suite.

In graph database, we represent things as vertices and relationships as labeled directed edges. The label on the directed edges describes the relationship. For example, to model actors and movies in a graph database, we might create a vertex representing the actor Johnny Depp and another representing the movie Edward Scissorhands, and we might have a directed edge from Johnny Depp to Edward Scissorhands labeled  acted-in.

 DSE Graph is a property graph which means that we can also store data as properties associated with vertices and edges. Storing data as properties makes the vertices and edges look like records in a relational table. For our example with Johnny Depp as the actor, we might create a property like his birthdate. Similarly, we might add a salary property to the acted-in edge indicating how much he was paid to act in the movie.

We can index graph properties (both vertices and edges) so that we can quickly search vertices and edges, like a relational database. Once we have located a vertex based on some property value, we can use the vertex as a starting point for a traversal. For example, we might search for the vertex labeled Johnny Depp, and the traverse all the acted-in edges to find all the movies in which Johnny Depp has acted. Further we might continue to traverse to find all the actors that were also in those movies. Traversals can get very complex as we use the rich set of relationships to identify useful patterns within the data.

Typical graph applications or use-cases include fraud detection, customer 360, network monitoring, social networks and identity management.

DSE Graph uses a query language named Gremlin. Gremlin is a powerful language that supports both graph alterations (adding nodes and edges) as well as sophisticated graph traversals.

DSE Graph is a derivative of the Apache Tinkerpop™ Graph Framework. It stores node, edges and their associated properties in DSE Core tables. DataStax has integrated DSE Graph with DSE Core so that DSE Graph enjoys the benefits of high throughput, low latency, scalability and availability.

No Exercises.

I am used to my relation database and I’m good at modeling domains with relational technology. Why would I ever want to use a graph database like DSE graph?

Graph databases, like DSE Graph, model relationship rich domains well. For example, in a Customer 360-type of application, you might want to keep track of what products and services a customer has used, what training they have received, what interactions they may have had with customer support, when they accessed the website, what other customers they know, and how they rate their experiences with your company. In a fully normalized relational representation, each of these relationships requires its own join table. This can become unwieldy. Even though these types of domains are cumbersome for relational technology, they are very natural for graphs. Further, the Gremlin query language makes it intuitively easy to query your graph and traverse the relationships to find patterns and identify opportunities.