Officially out now: The TypeDB 3.0 Roadmap

Crash course

The TypeDB crash course will give you a concise overview of the main aspects of working with TypeDB and TypeQL. For a more in-depth introduction, check out TypeDB Academy.

Introduction

The TypeDB crash course is divided into two sections: the environment setup, followed by a choice of pathways. Follow the instructions on this page to quickly set up the environment you’ll need for the crash course. At the end of this page, choose the pathway that most closely matches your previous database experience:

  • New database users: Pathway for those completely new to databases.

  • Relational database users: Pathway for those used to working with relational databases.

  • Graph database users: Pathway for those used to working with graph databases.

Log in to TypeDB Cloud and deploy a new cluster on the Clusters page.

For self-hosted TypeDB installation and setup, see the Self-hosted deployment page.

Connect to TypeDB

In this guide, we will use TypeDB Studio, the standalone GUI-based client for TypeDB. Ensure Studio is installed, then launch the application.

  • Cloud

  • Core

  1. In the TypeDB Cloud dashboard, find the cluster you want to connect, and click Connect. Copy the displayed connection URI, replacing the password placeholder with your actual database password.

  2. In Studio, click Connect to TypeDB. Paste the copied URI into the Connection URI field and click Connect.

Click Connect to TypeDB. Your connection URI is typedb-core://<host>:<port> (e.g: typedb-core://localhost:1729).

Create a project

TypeDB Studio stores queries you create as TypeQL files in a local project directory. To select a project directory, click either Open Project in the Project panel, or the studio projects Open Project Directory button in the top toolbar.

Create a new database

To create a new database:

  1. Click the studio dbs Manage Databases button in the top toolbar.

  2. Enter a name for a new database and click Create.

  3. Select the new database from the Select Database dropdown (database none) in the top toolbar.

Running queries

To run a query:

  1. Make sure you are using the correct session type and transaction type. You can change these using the session type toggle (session schema) and transaction type toggle (transaction write) in the top toolbar. The course material will tell you which session and transaction type to use for each query, but you can also refer to the following table.

    Session type Transaction type Query types

    schema

    write

    Define

    data

    write

    Insert, Delete, Update

    data

    read

    Fetch, Get

  2. Open a studio new New Tab in the Text Editor and paste in the query.

  3. Click the studio run Run Query button.

  4. If the transaction is a write transaction: when the query has completed, click studio check Commit Transaction. The course material will tell you when this is necessary.

Choose a pathway

With setup complete, choose the pathway that most closely matches your previous database experience.

Pathway for those completely new to databases.

Pathway for those used to working with relational databases.

Pathway for those used to working with graph databases.