https://github.com/memgraph/sng-demo
A Flask web application that displays a social network graph stored in Memgraph DB.
https://github.com/memgraph/sng-demo
Last synced: 10 months ago
JSON representation
A Flask web application that displays a social network graph stored in Memgraph DB.
- Host: GitHub
- URL: https://github.com/memgraph/sng-demo
- Owner: memgraph
- Created: 2020-08-31T15:33:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-16T09:27:39.000Z (almost 3 years ago)
- Last Synced: 2023-05-16T10:35:37.885Z (almost 3 years ago)
- Language: Python
- Homepage:
- Size: 142 KB
- Stars: 7
- Watchers: 6
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Social Network Graph Demo
When you think about a web application, a graph database doesn’t usually spring to mind. Instead, most people just take the familiar route of using an SQL database to store information. While this is perfectly acceptable for most use cases there are sometimes those that would see tremendous benefits by using a graph database.
In this tutorial, I will show you how to make a basic web application using Flask that stores all of its information in a graph database. To be more precise we are using Memgraph DB, an in-memory database that can easily handle a lot of information and perform read/write instructions quite quickly.
Our use case is a Social Network Graph (in the code referred to as **SNG** for convenience) representing users and the connections between them. Usually, such a graph would contain millions of nodes and edges and the algorithms that are performed on them don’t do well with data being stored in relational databases.
## Start the app
Here are the instructions on how to build and start the app:
```
docker-compose build
docker-compose up
```
Once the app is up, head over to the `localhost:5000` to see the demo.
To learn how we built the demo, read our [blog post](https://memgraph.com/blog/how-to-visualize-a-social-network-in-python-with-a-graph-database).