$30 off During Our Annual Pro Sale. View Details »

Property Graph in Oracle Database: A Polyglot Solution

Property Graph in Oracle Database: A Polyglot Solution

Property Graph databases are a different way to “tell” a story through connections between objects instead of the typical tables and columns approach of relational databases. Oracle Database 12cR2 introduced support for Property Graph and didn’t stop at a simple support: they made Property Graph a polyglot solution accessible by almost any language. SQL, Java, Groovy, Python, REST api, Apache Zeppelin, Cytoscape - you name it. Property Graph can do them all. One tool speaking many languages. We will show you how powerful it is to use Property Graph in the Oracle Database with the various languages and tools.

Gianni Ceresa

December 03, 2018
Tweet

More Decks by Gianni Ceresa

Other Decks in Technology

Transcript

  1. View Slide

  2. You are still in time
    to change room

    View Slide

  3. View Slide

  4. View Slide

  5. vertex (node)
    vertex
    properties
    vertex ID
    edge
    edge label
    edge
    properties
    edge ID
    directed
    edge

    View Slide

  6. Scalable and Persistent Storage
    Graph Data Access Layer API
    Graph Analytics
    In-memory Analytic Engine
    Blueprints & SolrCloud / Lucene
    Property Graph Support on
    Apache HBase, Oracle NoSQL or Oracle 12.2
    REST Web Service
    Python, Perl, PHP, Ruby,
    Javascript, …
    Java APIs
    Java APIs/JDBC/SQL/PLSQL
    Cytoscape Plug-in
    R Integration (OAAgraph)
    Spark integration
    SQL*Plus, …
    PGX: Parallel Graph AnalytiX

    View Slide

  7. View Slide



  8. BEGIN
    OPG_APIS.CREATE_PG('sa607', 4, 8, '');
    END;

    View Slide


  9. View Slide



  10. View Slide

  11. View Slide










  12. View Slide

  13. View Slide









  14. View Slide

  15. View Slide

  16. View Slide





  17. View Slide















  18. View Slide





  19. Doesn’t support loading a
    graph from DB !!!

    Will support loading from DB

    View Slide

  20. View Slide

  21. GraalVM will make this part useless thanks to its polyglot feature
    • Python will have direct access to Java objects and methods

    View Slide

  22. View Slide

  23. View Slide

  24. WITH properties AS (
    SELECT DISTINCT k, t, 'Vertex' AS kind
    FROM sa607vt$
    UNION ALL
    SELECT DISTINCT k, t, 'Edge' AS kind
    FROM sa607ge$
    )
    ,cfg AS (
    SELECT '.add' || kind || 'Property("' || k || '",PropertyTypeClass.'
    || CASE WHEN t = 1 THEN 'STRING' WHEN t = 5 THEN 'DATE' WHEN t = 6 THEN
    'BOOLEAN' END
    || ')' AS prop
    FROM properties
    ) SELECT LISTAGG(prop,'') WITHIN GROUP(ORDER BY prop) FROM cfg;

    View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. View Slide

  30. View Slide

  31. View Slide







  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. View Slide






  38. Oracle XE 18c gives you graphs for free!
    Feel free to get in touch for any question or
    more examples of graphs in Zeppelin or Jupyter

    View Slide






  39. View Slide