Turning Your Relational Database into a Graph Database

Leveraging LLMs to augment your data

Katia Gil Guzman
Towards Data Science

Image generated by the author

Relational databases have been the backbone of data management for decades, handling structured data with their tabular format and strict schemas.

But what if your data’s true potential lies in the relationships between data points? That’s where graph databases come into play.

Unlike traditional relational databases, graph databases excel in scenarios where each data point can be connected to a multitude of other entities, forming relationships that can be leveraged to discover new insights.

They are particularly useful when building recommendation systems, CRMs, or tools to analyze customer behavior for example.

In this tutorial, I’m going to guide you through transforming your relational database into a dynamic graph database in python. We will use the Amazon Products Dataset as an example, and extract entities from the products’ title to enrich the dataset and turn it into a graph.

To do this, we’ll leverage OpenAI’s GPT-3.5-turbo model, and we will then use cypher queries to load the data into a Neo4j graph database.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (2)

What are your thoughts?

Great article, it was a pleasure to read. I would like to mention ArcadeDB as an alternative to Neo4j which is a multi-paradigm database supporting SQL and Cypher as well and it is available under the liberal Apache 2 license: https://arcadedb.com/
Disclaimer: I am not affiliated with ArcadeDB, just a fan

--

Have you considered doing this article using kudu. Kuzu is an in process graph database like sqllite and duckdb. This would help your readers to reproduce your article more easily. Since it is as simple as doing a pip install…...

--