From the course: Data Ingestion with Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with graph databases

Working with graph databases - Python Tutorial

From the course: Data Ingestion with Python

Start my 1-month free trial

Working with graph databases

- [Instructor] Sometimes we're interested in relations between entities in our system. For example, when analyzing a social network, you can probably model relationships with a relational database, but it's not fun. Graph database lets you define entities, their properties, and their relations between them. One of the most common graph databases is Neo4J, but there are others as well. You should know your requirements, only then choose a candidate, then run some tests, and pick one. Here you use Docker to run and populate a small database. So python, run Neo4J, once you see Neo4J ready, you can use the database. Let's have a look at the code. We input Neo4J package, and we create a driver and get a session which is a database. In line 10, we define a query, Neo4J has its own query language called Cypher. All we are saying is that we want to match a user, where the log in equal the log in that we're going to provide, and return the name. We run the query, where the log in is the one we…

Contents