Saturday, August 20, 2022

Recent New Features in Oracle Graph

Feature Highlights

Path Visualization

The newest release of Oracle Graph includes a couple updates to path visualization for your graph queries. One is the ability to unnest the path in a graph query result, using the ONE ROW PER STEP syntax.

Here is an example:

SELECT v,e,v2

FROM MATCH ALL (a)-[:TRANSFERS]->{4}(b) ON bank_graph

ONE ROW PER STEP (v1, e, v2)

WHERE a.acct_id=934 AND id(a) = id(b)

Oracle Graph, Oracle Database Career, Database Skills, Database Jobs, Database Exam Study, Database Prep, Database Preparation, Database News

The INTERVAL Keyword when Using PGQL 

The newest release of Oracle Graph also includes the INTERVAL syntax in PGQL. This operates similarly to INTERVAL in PL/SQL, as it allows us to query and visualize using a period of time.

Here are some examples:

SELECT n.timestampProp
FROM MATCH (n) -> (m)
WHERE n.timestampProp < m.timestampProp + INTERVAL '1' DAY

SELECT n.timestampProp
FROM MATCH (n) -> (m)
WHERE n.timestampProp < INTERVAL '1' DAY + m.timestampProp
 
SELECT n.timestampProp
FROM MATCH (n) -> (m)
WHERE n.timestampProp > m.timestampProp - INTERVAL '1' DAY
 
Property Graph Support for SQL Developer

The PGQL Plugin for SQL Developer was recently released with SQL Developer 22.2. There are no additional settings, or plugins, required to use this feature of SQL Developer. This feature shows the list of PG Schema and PG Views in the connected database, and allows you to run CREATE, DROP, INSERT, DELETE, and SELECT queries through SQL Developer.

Oracle Graph, Oracle Database Career, Database Skills, Database Jobs, Database Exam Study, Database Prep, Database Preparation, Database News

Graph Client on Maven Central

Starting with version 22.4, the Property Graph Java client of Oracle Graph Server and Client can be obtained from Maven Central via the following dependency declaration:

<dependency>
  <groupId>com.oracle.database.graph</groupId>
  <artifactId>opg-client</artifactId>
  <version>22.3.0</version>
</dependency>

Or with the equivalent Gradle Declaration:

implementation group: 'com.oracle.database.graph', name: 'opg-client', version: '22.3.0'

With these declarations, you can easily access the Java client, and build out applications that can connect to an Oracle Database, read graphs into database memory, run algorithms on the graph and run PQGL queries on the graph.

Updates to Graph Studio on Autonomous Database


PGQL on RDBMS interpreter

The %pgql-rdbms interpreter executes PGQL queries directly against the underlying database, rather than against the %pgql-pgx, which runs queries against graph server. This feature also allows you to create graphs directly in the database using the PGQL-RDBMS interpreter. 

Oracle Graph, Oracle Database Career, Database Skills, Database Jobs, Database Exam Study, Database Prep, Database Preparation, Database News

Support for SPARQL UPDATE queries

Inserting and removing triples is now supported in the RDF Query Playground and with SPARQL interpreters. 

Source: oracle.com

Related Posts

0 comments:

Post a Comment