Skip to Main Content

Write Great SQL Office Hours

Free tips and training every month! Subscribe for reminders and more from Office Hours. FAQ

Header container

July 16

13:00 UTC   Start Times Around the World

Description

Advanced SQL - Graph Traversal Problems with Spatial and Graph solutions
SQL is a powerful language. But there are still some queries it struggles with!

In this session we investigate some thorny problems:

Find all the fully connected subgraphs in a graph
Find the average (mean) of a node's children in a tree

Key highlights include:

01:15 - Finding all the fully connected subgraphs in a graph; introduce the problem
07:00 - Walk through Live SQL solutions to this problem
20:30 - Performance considerations for this: are graph technologies better suited?
22:20 - Introduction to Oracle Spatial & Graph
25:10 - Spatial & Graph architecture
30:20 - Solutions could be slow; reframe the problem - perhaps looking for strongly connected components instead?
41:30 - Find the hierarchical mean; introduce the problem
45:30 - Walk through Live SQL solutions to this problem
50:35 - Introduce PGQL (property graph query language) & sketch solutions with this
55:10 - Further graph resources

Live SQL scripts with setup & solutions:

Fully Connected Subgraphs https://livesql.oracle.com/apex/livesql/file/content_IOHVI2K4AYK6GOMOAVG93YBF6.h tml

Hierarchical Mean https://livesql.oracle.com/apex/livesql/file/content_IOHVI2K5THQ213SZ6XOZPB402.h tml

Subscribe to give us feedback and be notified of upcoming sessions!

Having trouble watching the video on this page? Open the video in your browser.

Your Experts

Chris Saxon
Chris Saxon, Oracle Developer Advocate for SQL    
Chris Saxon is the quizmaster for the Database Design competitions and an Oracle Developer Advocate for SQL. His job is to help you get the best out of the Oracle Database and have fun with SQL! He's also part of the answer team on Ask TOM and creates YouTube videos at The Magic of SQL channel.
Hans Viehmann
Hans Viehmann, Product Manager - Spatial and Graph    
Hans Viehmann works for Oracle as Product Manager for spatial and graph technologies on both the Database and Big Data platforms. He holds a degree in Physics from Hamburg University and started his career in Research before joining Oracle over twenty-five years ago. After various positions in Presales and Business Development, he joined the Product Management Team in 2011. He is responsible for the outbound product managers on the Oracle spatial and graph team. With his team, he looks after strategic projects and partnerships, marketing activities, as well as internal awareness around Oracle's spatial and graph technologies worldwide. He works closely with various Oracle User Groups and helped establish Spatial and Graph Special Interest Groups in several countries. He is a regular speaker at conferences and user group events and serves on the advisory board of InGeoForum, Germany.