Officially out now: The TypeDB 3.0 Roadmap

One giant leap for databases

TypeDB enables software engineers to build data applications faster, with a modern language that avoids complexity.

Documentation Get Started
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33

match
  $user isa user,
    has full-name $name,
    has email $email;
fetch
  $name;
  $email;
# This returns all users of any type

match
  $user isa employee,
    has full-name $name,
    has email $email,
    has employee-id $id;
fetch
  $name;
  $email;
  $id;
# This returns only users who are employees

match 
  $user-type sub user;
  $user isa $user-type,
    has full-name $name,
    has email $email;
fetch
  $name;
  $email;
  $user-type;
# This returns all users and their type

Every data point has a type that you define, like employee. Types can also be subtypes of other types, like user. So, a query for user entities could return both employee and contractor entities, without the query having to specify this. We call this polymorphism, and it drastically simplifies how you interact with your database.

Learn more

Model data directly as entities with attributes and relations

Designing your database requires nothing more than describing the real things your data represents. This puts an end to ‘object-relational mismatch’. You no longer need to think about your data in a different way between your application and your database.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33

insert

  $john isa full-time-employee,
    has full-name "John Doe", 
    has primary-email "john.doe@typedb.com",
    has email "j.doe@typedb.com",
    has email "john@typedb.com",
    has employee-id 183;
  $readme isa file, has path "/home/johndoe/repos/typedb/readme.md";
  $edit isa action, has name "edit file";
  $kevin isa user, has email "kevin@typedb.com";

  $perm (subject: $john, object: $readme, action: $edit) isa permission;
  $rqst (target: $perm, requestee: $kevin) isa change-request, has requested-change "revoke";

TypeDB uses the Enhanced Entity-Relationship model with a declarative schema and static type checking. This allows the natural implementation of a type hierarchy, multivalued attributes, and n-ary and nested relations. Leverage OOP concepts like abstraction, inheritance, and polymorphism without warping the conceptual model. Normalization, null values, and reification are things of the past.

Learn more

Modify your data model without refactoring or migrating

Extending an SQL database often involves a lengthy migration process. With TypeDB, you can extend your model without refactoring your queries or application code. Everything still works, because the data logic is in the structure, not the query.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33

match
  $user isa user, has email $email;
  $rsrc isa! $resource-type, has id $id;
  $resource-type sub resource;
  $own (resource: $rsrc, owner: $user) isa resource-ownership;
fetch
  $email;
  $resource-type;
  $id;

TypeDB is a truly polymorphic database. Queries are written in a high-level declarative language and resolved against the schema at query-time. Variables implicitly match all valid types, so queries never have to be updated when new subtypes are added. Attributes and relations are always implemented in the same way, so cardinality changes never require a change to the underlying model. All this means that extensions to the data model are trivial, and don't require refactors.

Learn more

Queries run in real-time on a single source of truth

TypeDB has the performance to resolve even complex queries in milliseconds. So you never need to precompute results or store redundant copies, which can result in stale, inconsistent and incorrect results. Work with a single source of truth, all the time.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33

define
  rule transitive-team-membership:
    when {
      (team: $team-1, member: $team-2) isa team-membership;
      (team: $team-2, member: $member) isa team-membership;   
    } then {
      (team: $team-1, member: $member) isa team-membership;
    };

match
  $user isa user, has email $email;
  $team isa team, has name $name;
  (team: $team, member: $user) isa team-membership;
fetch
  $email;
  $name;

TypeDB's built-in reasoning engine allows rules to be defined in the schema and resolved at query time. Rules are constructed using first-order logic and define how new facts can be inferred from existing data. When a query is issued, matching rules are triggered using the most recent data available. This allows all computed data to be built on a single source of truth, ensuring accuracy and consistency without delay or redundancy.

Learn more

Robust developer tools

We provide and maintain a whole ecosystem of reliable tools and documentation that make developing with TypeDB a joy.

Full support for your favorite language

We provide and officially support native drivers for all the languages below. Our APIs are asynchronous, reactive, stateful, and programmatic.

View GitHub Learn more
cargo add typedb-driver
pip install typedb-driver
npm install typedb-driver
com.vaticle.typedb:typedb-driver
dotnet add package TypeDB.Driver
#include <typedb.hpp>
#include <typedb_driver.h>

Go

go get github.com/typedb/typedb-driver/go

Request your language

Get started in the cloud for free

TypeDB Cloud is a fully-managed cloud database for your application, starting at $0/month with generous limits. Once your application needs it, upgrade for enterprise-level availability, auto-scaling, security and access control.

Learn more Sign up

Global deployment, cloud agnostic

Deploy in regions across AWS, GCP, and Azure, with different databases in different cloud providers and regions.

Scalability on demand, native clustering

Connect to clusters with topology-aware clients which can load balance requests across multiple replicas within a cluster.

Secure by default, roles and encryption

Ensure a high level of protection to safeguard data and maintain confidentiality with fully secured by default, with authentication as well as storage and network encryption.

Always available, automatic failover

Guarantee constant access to data thanks to synchronous replication and replicas which will automatically failover if the primary fails.

Teams and projects, organizational governance

Create teams, members and projects to manage databases across the entire organization with ease.

Supported by a global community

The TypeDB community is vibrant, active and always helpful. Join us on Discord or make contributions on GitHub. New faces are always welcome.

Discord

Twitter

YouTube

LinkedIn

Developers love TypeDB

Get started

Start building

Cloud or container, a polymorphic database with a conceptual data model, a strong subtyping system, a symbolic reasoning engine, and a type-theoretic language is minutes away.

Deploy
Feedback