Why TypeDB?

TypeDB offers developers a new way to manage their data, with simplicity, safety, and expressivity at the forefront.

Why do we need something new?

Relational, document, and graph databases are the dominant general-purpose database models today. While these are powerful tools, they often make your life harder by pushing problems of data safety, expressivity, and evolution back to you.

TypeDB was designed specifically to overcome these limitations, while borrowing some of their best ideas like strict schemas and easy-to-read query languages. By using a higher-level model based on entities, relations, and attributes, you’ll never deal with normalization, joins, foreign keys, nulls, or missing data again.

TypeDB and TypeQL are grounded in a rigorous mathematical model called PERA (Polymorphic Entity, Relation, Attribute), with a peer-reviewed mathematical foundation. This foundation means that TypeDB’s development will always move forward in a mathematically sound and principled way that continues to improve developer experience. You can find our published paper online.

Developers need a database that will save them time, money, and effort. TypeDB allows you to spend less time on database design, query debugging, schema migrations, and worrying about data correctness. Instead, you can focus effort on application development and business logic.

Key reasons to choose TypeDB

There are many reasons developers love TypeDB. Here are a few of the top ones:

Easy to use

TypeDB and TypeQL are intuitive and easy to use.

TypeDB is made up of a few simple database concepts. By using the fully managed service, or a local TypeDB CE server, you’ll be up and running in minutes.

TypeQL’s data model is also easy to use, and more expressive than relational, graph, or document models. Built-in support for polymorphism and subtyping help close the object-relational gap that persists between most databases and their application code. You’ll also never need a semantic layer to enforce your data model: types you define in TypeDB’s schema serve as a semantic layer by themselves — with no extra work from you!

Powerful modelling

TypeDB’s baseline types are Entities, Relations, and Attributes. These can be combined in countless ways to capture your domain accurately. TypeDB supports many modifiers and uses of these basic types:

  • Subtyping: create sub-entities, relations, or even attributes that have the capabilities of all their supertypes

  • Hyper-relations: not only can you connect relationships with any number of entities, you can also nest them within other relations

  • Variadic relations: roles in relations can be filled multiple times, and different roles can even be filled by the same participant

  • Multivalued attributes: entities and relations can have multiple instances of the same attribute with different values

  • Cardinality constraints: configurable limits on the number of attributes, relations, or entities to connect to

You can even create reusable functions to capture modular pieces of database logic and invoke them at query time.

Put together, TypeDB can capture the most complex data models, while being easy to extend with new types and relationships as your application grows.

Safety

TypeDB’s users frequently work in domains that might normally require extensive application logic to validate their data.

TypeDB automatically provides stricter safety checks at write time, read time, and even during schema migration time.

Because TypeDB’s type system allows you to push more data constraints into the database, TypeDB can ensure that your inserted data conforms to the required relationships, value types, cardinalities, value ranges, and more.

During pure read operations, TypeDB’s type inference engine will reject semantically invalid operations. This allows developers to distinguish an invalid query returning no results, which returns an error in TypeDB, from a correct query returning no results.

Combined with transactions, you can be confident of moving between correct states. Even better, schema and data can be mutated together in one schema transaction, with full commit-time validation, making migrations safe and easy.

Choosing TypeDB

TypeDB is ideal in domains where you interact with:

  • Complex, highly interconnected data: Like cybersecurity, life sciences, financial fraud detection, or supply chain management

  • Strict data integrity requirements: Like financial services, identity management

  • Evolving data models: The polymorphic nature and schema capabilities make it easier to adapt your data model as your understanding of the domain grows

  • Intelligent systems: TypeDB provides an excellent data layer for AI and machine learning applications that require a deep understanding of relationships with built-in guardrails

It even suits simple applications that need to capture things like subtyping relationships!

Whatever your domain, TypeDB has the expressivity and capabilities to capture it intuitively.

Feel free to explore our Examples and use cases to get a feel for how TypeDB applications can look.

Next steps

Check out our Learning Journey for a guided path through the documentation, or jump into the Get started guide.