Home

Awesome

TypeDB Driver Examples

Factory

Table of contents

Examples in this repository

This repository includes examples that showcase usage of TypeDB Drivers in reading from and writing to a TypeDB database.

Biology: Catalogue of Life

Catalogue of Life is a database of over 4.5 million currently known taxa in biology, compiled from over a hundred different sources. The example showcases simple data preparation and a sample configuration file for loading a large taxonomic dataset using TypeDB Loader.

Commerce: Bookstore

The bookstore example uses Python to showcase migration of data into TypeDB and executing queries on this data.

The data of the Books, Users and Orders loaded from the .csv files in the data directory.

Read the README file for instructions. Check the schema or the initial dataset for additional information. All logic accessible in the script files in the python directory.

Finance: Fraud Detection

The Fraud Detection example uses Quarkus, the Supersonic Subatomic Java Framework in order to let us present results with GraphQL. In this project, we use TypeDB to represent a queryable database of relevant fraud detection data about some transactions between Cardholders and Companies.

Gaming: XCOM Project

The XCOM 2 example contains a database of interdependent research tasks in the game XCOM 2, featuring automatic inference of available research based on completed tasks and available items. See the schema for the examples of reasoner rules inferring attributes.

Software: GitHub

The GitHub example showcases migration of heavily interconnected data from a live repository on GitHub or from a Vaticle GitHub snapshot, and provides a visual interface to explore some sample queries.

Telecom: Phone Calls

TypeDB officially supports drivers for Java, Node.js, Python, and more. Learn more about TypeDB Drivers.

The Phone Calls example showcases basic migration of a database of customers of a fictional telecom company and calls they make in various formats (CSV, JSON, and XML) and expressive TypeQL queries using the Java, Node.js, and Python drivers.

Data migration

Query examples

Data visualisation

After loading the data for any of the examples, you can use TypeDB Studio to explore the graph structure of the database.

Additional examples

There are some examples in other repositories that are recommended for more advanced users.

TypeDB Bio

TypeDB Bio is a collection of knowledge graphs of biomedical data.

TypeDB Bio provides an intuitive way to query interconnected and heterogeneous biomedical data in one single place. The schema that models the underlying knowledge graph alongside the descriptive query language, TypeQL, makes writing complex queries an extremely straightforward and intuitive process. Furthermore, the automated reasoning capability of TypeDB, allows TypeDB Bio to become an intelligent database of biomedical data that infers implicit knowledge based on the explicitly stored data. TypeDB Bio can understand biological facts, infer based on new findings and enforce research constraints, all at query (run) time.

TypeDB CTI

TypeDB CTI is an open source threat intelligence platform for organisations to store and manage their cyber threat intelligence (CTI) knowledge. It enables threat intel professionals to bring together their disparate CTI information into one database and find new insights about cyber threats.