Operations On Property Graph

DSE Version: 6.0

Video

Now that you understand the basics of the property graph data model, let's move on to exploring what kinds of things we can do with DataStax Enterprise Graph. This cover operations on a property graph.

Transcript: 

Now that we understand the basics of the graph data model, lets start to explore how we can do thing with DSE Graph.

Managing graphs in DSE Graph is similar to working in any database. We can create graphs, list and modify graphs, and remove graphs.

Note that in DSE, a single graph is associated with a keyspace in Apache Cassandra.

This is an important point for those who are familiar with Apache Cassandra. Any operation/configuration that can be executed against a keyspace in Cassandra can also be executed against a graph.

Just like with any database system, before you can begin working with a graph schema, you have to create it. Creating graphs in DSE Graph is easy, just use the System API and use the create graph method. You have an option to check to see if a graph already exists.

Just like with DataStax's version of Apache Cassandra.

Graphs created in multi-datacenter clusters should use the DSE database NetworkTopologyStrategy setting and a replication factor greater than one.

The default replication strategy for a multi-node or multi-datacenter graph is NetworkTopologyStrategy, whereas for a single node, the replication strategy will default to SimpleStrategy. The number of nodes will determine the default replication factor as shown in the table.

It is quite straightforward to create graphs with NetworkTopologyStrategy and custom replication factors. NetworkTopologyStrategy should be used in production.

The replication specification syntax is identical to the syntax used in the CQL CREATE KEYSPACE statement.

Here we see another way to set the replication factor of a graph.

The describe method of the system API is very handy to see the DDL that was used to create a Graph. As we'll learn in a later section of this course, one cn also use the describe method on a specific graph to get the DDL that was used to create the graph.

To find all graphs in your DSE Graph cluster, use the graphs method of the system API.

Removing graphs from DSE Graph is pretty straight forward. Simply use the .drop() method to do so.

As you can see, there are parallels with Apache Cassandra schema management and DSE Graph graph database management.

Finally, and I highly recommend you do this, you can see the actual key spaces created in Cassandra when creating a graph through DSE Graph.

For each graph you create using the system API, you'll see 2 key spaces in Apache Cassandra.

The first contains the graph data itself. Which the second, the one with the underscore system name, contains graph's metadata and schema information.

Okay, it's that time again for you to put your hands on keys and exercise all that new knowledge you gained in this section of the course.

Happy graphing.





















































 

No write up.
No Exercises.
No FAQs.
No resources.
Comments are closed.