Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Connecting the Dots: Graph Databases and Laravel

Connecting the Dots: Graph Databases and Laravel

Presented at Laracon US 2019

Keith Damiani

July 23, 2019
Tweet

Other Decks in Programming

Transcript

  1. "

  2. What is a graph database? CONNECTING THE DOTS Graph DBs

    vs. relational DBs Use cases Writing queries Laravel graph DBs
  3. stations id name 1 14th St./8th Ave. 2 6th Ave.

    3 Union Square 4 1st Ave. 5 Washington Square 6 Houston St. lines id name 1 3 2 4 3 5 4 L 5 B 6 K line_station id station_id line_id connected_to 1 3 4 2 2 4 4 7 3 5 5 4 4 5 6 8 5 6 5 6 6 6 6 9
  4. stations id name 1 14th St./8th Ave. 2 6th Ave.

    3 Union Square 4 1st Ave. 5 Washington Square 6 Houston St. lines id name 1 3 2 4 3 5 4 L 5 B 6 K line_station id station_id line_id connected_to 1 3 4 2 2 4 4 7 3 5 5 4 4 5 6 8 5 6 5 6 6 6 6 9
  5. FRIEND-OF-A-FRIEND QUERY Depth Relational DB Neo4j Graph DB Records 2

    0.02 0.01 2500 3 30 0.17 110,000 4 1,544 1.36 600,000 5 Unfinished 2.13 800,000 PERFORMANCE, IN SECONDS
  6. Social networks COMMON USE CASES Real-time product recommendations Would you

    like to 
 Join my Professional Network? Social + Recommendation
  7. Social networks COMMON USE CASES Real-time product recommendations Social +

    Recommendation Geospatial Geospatial + Recommendation
  8. Digital asset management COMMON USE CASES (MORE!) Textual analysis /

    search PageRank search Financial / fraud detection Public policy / journalism
  9. Disconnected data BAD FITS Bulk data scans Aggregating across nodes

    When write speed is paramount BLOBs / large amounts of text
  10. What is a graph database? CONNECTING THE DOTS Graph DBs

    vs. relational DBs Use cases Writing queries Laravel graph DBs