{"id":15990855,"url":"https://github.com/prrao87/graphdb-case-studies","last_synced_at":"2026-05-14T20:05:55.649Z","repository":{"id":131348755,"uuid":"223616382","full_name":"prrao87/graphdb-case-studies","owner":"prrao87","description":"Case studies showing the analysis of connected data using different graph databases and their Python client libraries","archived":false,"fork":false,"pushed_at":"2021-10-15T22:52:10.000Z","size":73,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-30T08:25:49.387Z","etag":null,"topics":["grakn","graph-databases","knowledge-graph","neo4j","python","python-clients"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prrao87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-23T16:07:56.000Z","updated_at":"2023-09-09T22:13:36.000Z","dependencies_parsed_at":"2023-05-09T16:52:11.650Z","dependency_job_id":null,"html_url":"https://github.com/prrao87/graphdb-case-studies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prrao87/graphdb-case-studies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Fgraphdb-case-studies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Fgraphdb-case-studies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Fgraphdb-case-studies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Fgraphdb-case-studies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prrao87","download_url":"https://codeload.github.com/prrao87/graphdb-case-studies/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prrao87%2Fgraphdb-case-studies/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33041239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grakn","graph-databases","knowledge-graph","neo4j","python","python-clients"],"created_at":"2024-10-08T05:40:37.557Z","updated_at":"2026-05-14T20:05:55.629Z","avatar_url":"https://github.com/prrao87.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Working with Graph Databases to Build Knowledge Graphs\nThis repository contains example code for building knowledge graphs using the below graph databases and their client libraries.\n\n* Neo4j\n* Grakn\n\n## What is a knowledge graph?\nA knowledge graph uses an [*ontology*](https://blog.grakn.ai/what-is-an-ontology-c5baac4a2f6c) to bind connected data into a knowledge domain that can then be reasoned with programmatically. It makes use of specialized data structures defined within its underlying graph database to efficiently store and query connected data.\n\n## Why use knowledge graphs?\nSimply put, knowledge graphs allow us to represent highly connected data in a more natural way. By representing entities and how they are related to one another in the real world, we can ask intuitive questions such as \"How does person X know person Y, and how many common interests do they share?\". Since data is stored natively in a connected format, it becomes very efficient to traverse the paths between connected entities in the graph to answer these questions, regardless of the size of the graph.\n\n\n## Datasets\nThe following datasets are used as case studies for each different graph database.\n* `phone_calls` - Dataset of persons and their phone calls, obtained from the [Grakn documentation examples](https://dev.grakn.ai/docs/examples/phone-calls-overview). \n* `social_network` - Dataset of a simple, artificial social network that connects people and the places they live in.\n\n\n## Neo4j\nThe world's most popular graph database, [Neo4j](https://neo4j.com/) uses a *Labelled Property Graph* model to store data natively as a graph. This is done by defining \"nodes\" that represent an entity in the real world (such as a person or a company) and \"edges\" that represent how these nodes are connected to one another via triples - for example, `person-A` `-[WORKS_AT]-` `company-B`. The primary benefit of using a property graph model is that it is intuitive and easy to understand - it is very simple to get a Neo4j graph model up and running.\n\n## Grakn\nStrictly speaking, Grakn is a \"true\" knowledge graph, in the sense that it models data using an entity-relationship model that makes use of multiple inheritance of hierarchies, hyper-entities and hyper-relations - this is referred to as a \"[*hypergraph model*](https://blog.grakn.ai/modelling-data-with-hypergraphs-edff1e12edf0)\".\n\nA key feature of hypergraphs is that they generalize the notion of edges (from graph theory) to be composed of a collection of nodes (each of which represents a relationship). This allows not only entities to be related to one another, but also *relationships to be related to other relationships*. In addition, thanks to its ontology layer and schema definitions, Grakn can perform automated reasoning by utilizing user-defined rules to identify *[inferred relationships](https://blog.grakn.ai/inference-made-simple-f333fd8abce4)* that were not explicitly defined in the graph structure. \n\n## Installation\n\n#### Neo4j\nThe installation instructions for Neo4j on Mac/Ubuntu/Windows are shown on their [web page](https://neo4j.com/docs/operations-manual/current/installation/).\n\n#### Grakn\nThe installation instructions for Grakn on Mac/Ubuntu/Windows are shown on their [web page](https://dev.grakn.ai/docs/running-grakn/install-and-run).\n\n#### Python clients\nTo more easily work with the raw data while building the graph, we use the Python clients for Neo4j and Grakn.\n\nIt is recommended to set up a virtual environment and install the required Python clients using ```requirements.txt``` as follows:\n\n    python3 -m venv venv\n    source venv/bin/activate\n    pip3 install -r requirements.txt\n\nFor further development, simply activate the existing virtual environment.\n\n    source venv/bin/activate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprrao87%2Fgraphdb-case-studies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprrao87%2Fgraphdb-case-studies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprrao87%2Fgraphdb-case-studies/lists"}