A.10.1 Quick Start: Create and Query a Graph in the Database, Load into 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.
- Load the graph into the graph server (PGX), run graph algorithms on this graph, and visualize results.
-
An installation of Oracle 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 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 Verifying Database Compatibility 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
orSQL Developer
).
Set up the example data
This example uses the HR (human resources) sample dataset.
- For instructions how to import that data into a user managed database, see: https://github.com/oracle/db-sample-schemas
- If you are using Autonomous Database, see: https://www.thatjeffsmith.com/archive/2019/07/creating-hr-in-oracle-autonomous-database-w-sql-developer-web/
Note that the database schema storing the graph must have the privileges listed in Required Privileges for Database Users.
- Create and Query a Graph in the Database
In this section, you will use the Oracle Graph client to create a graph from relational tables and store it in the property graph schema in the database. - Load the Graph into Memory and Run Graph Analytics