Property Graphs in APEX.pptx

Use Oracle Graph with APEX
Make building modern data-driven applications easier
Rahul Tasker
Spatial and Graph Product Management
Safe harbor statement
The following is intended to outline our general product direction. It is intended
for information purposes only and may not be incorporated into any contract. It
is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
timing, and pricing of any features or functionality described for Oracle’s
products may change and remains at the sole discretion of Oracle Corporation.
Copyright © 2023, Oracle and/or its affiliates
2
Copyright © 2023, Oracle and/or its affiliates
3
• Introduction to graphs
• What are SQL property graphs
• Graphs in APEX
• Demo
• Q/A
Agenda
Copyright © 2023, Oracle and/or its affiliates
4
Graph
What is a graph?
• Data model representing entities as vertices and
relationships as edges
• Optionally including attributes
What are typical graphs?
• Social networks
• LinkedIn, Facebook, Twitter, ...
• Physical networks, supplier networks, ...
• Dependency graphs
• Part hierarchies, data lineage, org charts, ...
• Workflows
• Knowledge graphs
• Associating related entities, e.g. in public safety
E
A D
C B
F
Copyright © 2023, Oracle and/or its affiliates
5
A graph representation of your data
• Data entities become vertices
• Connections between them become edges
Graph Analytics
Consider new nodes J, K, L
• Node I is highly connected, so it could be an
important node
• Node J has only one connection, but that is an
incoming edge from Node I, an important node
• So Node J might be important too
Example: Pagerank algorithm identifies such
Graph Data Model
E
A
D
C
B
F
H
I
G
J
K
L
Ora-Gram-Book
Ora-Gram Book is a fictitious social media platform.
• Connect with family and friends
• Post photos and videos
• Comment and like others' posts
As new users join Ora-Gram-Book, they want to make it easier for friends and
family to find each other easier and faster.
Copyright © 2023, Oracle and/or its affiliates
6
Users
ID
Email
Name
DOB
Posts
ID
Content
Likes
ID
Post_ID
Liker_ID
Comments
ID
Post_ID
Commentor_ID
Follows
ID
Follower_ID
Followed_ID
Creates
ID
Poster_ID
Post_id
Copyright © 2023, Oracle and/or its affiliates
7
Users
ID
Email
Name
DOB
Posts
ID
Content
Likes
ID
Post_ID
Liker_ID
Comments
ID
Post_ID
Commentor_ID
Follows
ID
Follower_ID
Followed_ID
Users
Follows
Comments
Likes
Creates
ID
Poster_ID
Post_id
Posts
Creates
Copyright © 2023, Oracle and/or its affiliates
8
What users should we recommend Thom follows?
Recommend new connections to users based on a high amount of mutual follows/followers
Copyright © 2023, Oracle and/or its affiliates
9
What users should we recommend Thom follow?
Recommend new connections to users based on a high amount of mutual follows/followers
Copyright © 2023, Oracle and/or its affiliates
10
Copyright © 2023, Oracle and/or its affiliates
11
Create a Graph from Tables
ID
1
2
3
…
672
673
674
…
831
832
833
…
FOLLOWERS
USERS
FOLLOWER_ID FOLLOWED_ID
1 2
1 672
3 1
2 833
2 840
2 493
… …
PGQL DDL SYNTAX:
CREATE PROPERTY GRAPH Oragrambook_graph
VERTEX TABLES (
USERS LABEL Users PROPERTIES ( ID, EMAIL, NAME, DOB )
)
EDGE TABLES (
FOLLOWERS
KEY(POST_ID)
SOURCE KEY ( FOLLOWER_ID) REFERENCES USERS
DESTINATION KEY ( FOLLOWED_ID) REFERENCES USERS
LABEL follows PROPERTIES ( FOLLOWED_ID )
672
833
Query a Graph
Copyright © 2023, Oracle and/or its affiliates
12
/* List accounts which have transferred money to another account */
select id from GRAPH_TABLE(social_graph
MATCH (src)-[is follows]->(dst)
COLUMNS (src.id as id) );
Vertices are in (), edges are in []
Columns to return
follows
src dst
Query a Graph
Copyright © 2023, Oracle and/or its affiliates
13
/* List users who follow other users */
select id from GRAPH_TABLE(social_graph
MATCH (src)-[is follows]->(dst)
COLUMNS (src.id as id) );
Vertices are in (), edges are in []
Columns to return
select id from GRAPH_TABLE(social_graph
MATCH (src)-[is follows]->{1,3}(dst)
COLUMNS (dst.id as id) ); Path length in {} – from 1 to 3
hops
/* List users who follows a user who follows a user… (inclusive) */
follows
src dst
follows follows
Copyright © 2023, Oracle and/or its affiliates
14
Contrasting Developer Architectures
Document Reporting
Every App Requires distributed
execution and data movement across
multiple fragmented databases
Developers Focused on Innovation
Developers Focused on Integration
EVENT
RPC
ETL
REPLICATION
EVENT
RPC
ETL
REPLICATION
Simply invoke SQL or REST API to
run report, ML, graph, spatial,
blockchain, IoT, etc. in a
converged database
OracleStrategy
HeterogeneousStrategy
Text Search Graph
ML
EVENT
RPC
ETL
REPLICATION
ETL
REPLICATION
EVENT
RPC
Copyright © 2023, Oracle and/or its affiliates
Graphs in APEX
15
Newly release Graph Visualization and Sample App
Copyright © 2023, Oracle and/or its affiliates
16
Available at https://oracle.github.io/apex/
Graph Visualization Plugin
Copyright © 2023, Oracle and/or its affiliates
17
• Visualize Graph queries
• Customize appearance and layout
• Customize labels
• Interactive page item
Native Graph Support
Copyright © 2023, Oracle and/or its affiliates
18
• Property Graph Source
• SQL Query source
• Declares match, columns and
where clauses
• Wherever you can use SQL, you
can use SQL property graphs
Copyright © 2023, Oracle and/or its affiliates
Demo
19
Modern Apps Need To Generate Value From Data in New Ways
Machine
Learning
Real-Time
Analytics
Blockchain
Documents
Graph
Analysis
Spatial
Processing
Text
Search
IoT
Copyright © 2023, Oracle and/or its affiliates
20
Summary
• Graphs can make complex queries very simple
• New SQL syntax supported for Property Graph
• APEX and other SQL tools and development environments can be used with property graphs out-of-
the-box
• Native Support for APEX
• Graph visualization plugin
21 Copyright © 2023, Oracle and/or its affiliates
Blog posts
• Overview blog post on Oracle Graph 23c
• Get started with property graphs in 23c
Examples (Jupyter, SQLDev)
• Github
Videos
• Property graphs with SQL
• Create, query and visualize graphs with SQL
• OCW presentation – Property graphs join SQL
LiveLabs workshop
• Property graphs in Oracle 23c
Documentation
• Plugin and sample app download
• Plugin documentation
• Oracle Graph Developer‘s Guide
Oracle Graph 23c – Resources
Copyright © 2023, Oracle and/or its affiliates
22
• Learning Sessions
• Hands On Labs
• Digital Sessions
• Demos
• Details on all Graph Cloud World Sessions
• Details on all Spatial Cloud World Sessions
Learn more about Graphs at DatabaseWorld at CloudWorld
23 Copyright © 2023, Oracle and/or its affiliates
Q/A
24 Copyright © 2023, Oracle and/or its affiliates
1 de 24

Más contenido relacionado

Similar a Property Graphs in APEX.pptx(20)

Último(20)

CXL at OCPCXL at OCP
CXL at OCP
CXL Forum183 vistas
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh34 vistas
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet48 vistas
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum118 vistas

Property Graphs in APEX.pptx

  • 1. Use Oracle Graph with APEX Make building modern data-driven applications easier Rahul Tasker Spatial and Graph Product Management
  • 2. Safe harbor statement The following is intended to outline our general product direction. It is intended for information purposes only and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Copyright © 2023, Oracle and/or its affiliates 2
  • 3. Copyright © 2023, Oracle and/or its affiliates 3 • Introduction to graphs • What are SQL property graphs • Graphs in APEX • Demo • Q/A Agenda
  • 4. Copyright © 2023, Oracle and/or its affiliates 4 Graph What is a graph? • Data model representing entities as vertices and relationships as edges • Optionally including attributes What are typical graphs? • Social networks • LinkedIn, Facebook, Twitter, ... • Physical networks, supplier networks, ... • Dependency graphs • Part hierarchies, data lineage, org charts, ... • Workflows • Knowledge graphs • Associating related entities, e.g. in public safety E A D C B F
  • 5. Copyright © 2023, Oracle and/or its affiliates 5 A graph representation of your data • Data entities become vertices • Connections between them become edges Graph Analytics Consider new nodes J, K, L • Node I is highly connected, so it could be an important node • Node J has only one connection, but that is an incoming edge from Node I, an important node • So Node J might be important too Example: Pagerank algorithm identifies such Graph Data Model E A D C B F H I G J K L
  • 6. Ora-Gram-Book Ora-Gram Book is a fictitious social media platform. • Connect with family and friends • Post photos and videos • Comment and like others' posts As new users join Ora-Gram-Book, they want to make it easier for friends and family to find each other easier and faster. Copyright © 2023, Oracle and/or its affiliates 6
  • 9. What users should we recommend Thom follows? Recommend new connections to users based on a high amount of mutual follows/followers Copyright © 2023, Oracle and/or its affiliates 9
  • 10. What users should we recommend Thom follow? Recommend new connections to users based on a high amount of mutual follows/followers Copyright © 2023, Oracle and/or its affiliates 10
  • 11. Copyright © 2023, Oracle and/or its affiliates 11 Create a Graph from Tables ID 1 2 3 … 672 673 674 … 831 832 833 … FOLLOWERS USERS FOLLOWER_ID FOLLOWED_ID 1 2 1 672 3 1 2 833 2 840 2 493 … … PGQL DDL SYNTAX: CREATE PROPERTY GRAPH Oragrambook_graph VERTEX TABLES ( USERS LABEL Users PROPERTIES ( ID, EMAIL, NAME, DOB ) ) EDGE TABLES ( FOLLOWERS KEY(POST_ID) SOURCE KEY ( FOLLOWER_ID) REFERENCES USERS DESTINATION KEY ( FOLLOWED_ID) REFERENCES USERS LABEL follows PROPERTIES ( FOLLOWED_ID ) 672 833
  • 12. Query a Graph Copyright © 2023, Oracle and/or its affiliates 12 /* List accounts which have transferred money to another account */ select id from GRAPH_TABLE(social_graph MATCH (src)-[is follows]->(dst) COLUMNS (src.id as id) ); Vertices are in (), edges are in [] Columns to return follows src dst
  • 13. Query a Graph Copyright © 2023, Oracle and/or its affiliates 13 /* List users who follow other users */ select id from GRAPH_TABLE(social_graph MATCH (src)-[is follows]->(dst) COLUMNS (src.id as id) ); Vertices are in (), edges are in [] Columns to return select id from GRAPH_TABLE(social_graph MATCH (src)-[is follows]->{1,3}(dst) COLUMNS (dst.id as id) ); Path length in {} – from 1 to 3 hops /* List users who follows a user who follows a user… (inclusive) */ follows src dst follows follows
  • 14. Copyright © 2023, Oracle and/or its affiliates 14 Contrasting Developer Architectures Document Reporting Every App Requires distributed execution and data movement across multiple fragmented databases Developers Focused on Innovation Developers Focused on Integration EVENT RPC ETL REPLICATION EVENT RPC ETL REPLICATION Simply invoke SQL or REST API to run report, ML, graph, spatial, blockchain, IoT, etc. in a converged database OracleStrategy HeterogeneousStrategy Text Search Graph ML EVENT RPC ETL REPLICATION ETL REPLICATION EVENT RPC
  • 15. Copyright © 2023, Oracle and/or its affiliates Graphs in APEX 15
  • 16. Newly release Graph Visualization and Sample App Copyright © 2023, Oracle and/or its affiliates 16 Available at https://oracle.github.io/apex/
  • 17. Graph Visualization Plugin Copyright © 2023, Oracle and/or its affiliates 17 • Visualize Graph queries • Customize appearance and layout • Customize labels • Interactive page item
  • 18. Native Graph Support Copyright © 2023, Oracle and/or its affiliates 18 • Property Graph Source • SQL Query source • Declares match, columns and where clauses • Wherever you can use SQL, you can use SQL property graphs
  • 19. Copyright © 2023, Oracle and/or its affiliates Demo 19
  • 20. Modern Apps Need To Generate Value From Data in New Ways Machine Learning Real-Time Analytics Blockchain Documents Graph Analysis Spatial Processing Text Search IoT Copyright © 2023, Oracle and/or its affiliates 20
  • 21. Summary • Graphs can make complex queries very simple • New SQL syntax supported for Property Graph • APEX and other SQL tools and development environments can be used with property graphs out-of- the-box • Native Support for APEX • Graph visualization plugin 21 Copyright © 2023, Oracle and/or its affiliates
  • 22. Blog posts • Overview blog post on Oracle Graph 23c • Get started with property graphs in 23c Examples (Jupyter, SQLDev) • Github Videos • Property graphs with SQL • Create, query and visualize graphs with SQL • OCW presentation – Property graphs join SQL LiveLabs workshop • Property graphs in Oracle 23c Documentation • Plugin and sample app download • Plugin documentation • Oracle Graph Developer‘s Guide Oracle Graph 23c – Resources Copyright © 2023, Oracle and/or its affiliates 22
  • 23. • Learning Sessions • Hands On Labs • Digital Sessions • Demos • Details on all Graph Cloud World Sessions • Details on all Spatial Cloud World Sessions Learn more about Graphs at DatabaseWorld at CloudWorld 23 Copyright © 2023, Oracle and/or its affiliates
  • 24. Q/A 24 Copyright © 2023, Oracle and/or its affiliates

Notas del editor

  1. Here are some additional resources on Graphs in Oracle Database 23c
  2. Be sure to catch us at Cloud World if you’re interested in learning more