2.1.1 Quick Start: Create and Query a Graph in the Database, Load into In-Memory Graph Server (PGX) for Analytics

This tutorial shows how you can get started using property graph data when you create a graph and persist it in the database. The graph can be queried in the database. This tutorial uses the JShell client.

See Create and Query a Graph in the Database for more information on creating and storing graphs in database.

  • Convert existing relational data into a graph in the database.
  • Query this graph using PGQL.
In Load the Graph into Memory and Run Graph Analytics, you will run graph algorithms after loading the graph into the in-memory graph server (PGX).
  • Load the graph into the in-memory graph server (PGX), run graph algorithms on this graph, and visualize results.
Prerequisites for the following quickstart are:
  • An installation of Oracle Graph server (this is PGX, the in-memory graph server).

    See Oracle Graph Server and Client Installation for information to download Oracle Graph Server and Client.

  • An installation of Oracle Graph client
  • Java 11
    • The in-memory graph server can work with Java 8 or Java 11.
    • The JShell client used in this example requires Java 11.

    For Java downloads, see https://www.oracle.com/technetwork/java/javase/overview/index.html.

  • Connection details for your Oracle Database. See Database Compatibility and Restrictions to identify any limitations. The Property Graph feature is supported for Oracle Database versions 12.2 and later.
  • Basic knowledge about how to run commands on Oracle Database (for example, using SQL*Plus or SQL Developer).

Set up the example data

This example uses the HR (human resources) sample dataset.

Note that the database schema storing the graph must have the privileges listed in Required Privileges for Database Users.