TypeDB

From Wikipedia, the free encyclopedia
(Redirected from GRAKN.AI)
TypeDB
Original author(s)Haikal Pribadi
Developer(s)Vaticle
Initial release9 September 2016; 7 years ago (2016-09-09)
Stable release
2.26.3 / 9 January 2024; 4 months ago (2024-01-09)[1]
Repositorygithub.com/vaticle/typedb
Written inJava[2]
Operating systemCross-platform
LicenseAGPL 3.0
Websitevaticle.com

TypeDB is an open-source, distributed, strongly-typed database with a logical type system.[3] TypeQL is its query language. TypeDB models domains based on logical and object-oriented programming principles, composed of entity, relationship, and attribute types, as well as type hierarchies, roles, and rules.

TypeDB provides means to describe the logical structures of data. This capability enables the tool to validate both code insertions and data queries for correctness. Query validation extends beyond static type-checking and encompasses the logical validation of queries to eliminate meaningless ones. TypeDB also encodes data for logical interpretation by a reasoning engine, facilitating type-inference and rule-inference processes that generate logical abstractions of data. These functionalities aid in the discovery of facts and patterns that might be challenging to uncover through other means.

TypeDB is developed by Vaticle Ltd. and is published under the GNU Affero General Public License. Vaticle was previously known as Grakn Labs; TypeDB was known as Grakn; and TypeQL was known as Graql.

Main features[edit]

Expressiveness[edit]

TypeDB allows users to model their domains using the entity-relationship (ER) model. It is composed of entity types, relation types, and attribute types, with the introduction of role types and also lets users to harness the Entity-Relationship (ER) model. It also allows ursers to model type inheritance to their domain model and allows types to inherit the behaviors and properties of their super types, which lets complex data structures become reusable and the interpretation of data with polymorphism. It also can represent an arbitrary number of things as N-ary relations. TypeDB can represent structures where things can be relations themselves, as it enables relations to be nested inside another relation.

Safety[edit]

In TypeDB, inserted data gets validated beyond static type-checking of attribute value types. Entities are validated to only have the correct attributes, and relations are validated to only relate things that are logically allowed. TypeDB performs validation of inserted entities and relations by evaluating the polymorphic types of the things involved. Queries executed on TypeDB also undergo a type resolution process. This process not only optimizes query execution but also serves as a static type checker. It's role is to identify and reject queries that are meaningless or unsatisfiable, often indicating user errors.

Logical inference[edit]

Rules[4]

TypeDB allows users to define rules within their schemas. This feature enhances the expressiveness of the model by enabling the system to derive new conclusions when specific logical conditions within a dataset are satisfied. Similar to functions in programming, rules can be chained together, allowing the creation of abstractions related to data-level behaviors.

Inference

TypeDB's inference capabilities encompass the translation of a single query into all its potential interpretations. This occurs through two key mechanisms: type-based inference and rule-based inference. These processes yield fresh insights, reveal concealed relationships, and facilitate the simplification of intricate patterns into straightforward queries.

Architecture[edit]

TypeDB is composed of two parts: TypeDB as Storage, and TypeQL as the definition language.

TypeDB[edit]

TypeDB is a database with a rich and logical type system. Under the hood, TypeDB has built an expressive type system with a transactional query interface. TypeDB’s type system is based on hypergraph theory, a subfield in mathematics that generalizes an edge to be a set of vertices.[5] The hypergraph data structure itself is represented in the form of key-value pairs and persisted on a distributed NoSQL database, RocksDB. Using the Raft algorithm, TypeDB gives a distributed system designed to be shared and replicated over a network of computers.

TypeQL[edit]

TypeQL is TypeDB’s declarative reasoning (through OLTP) query language that creates a higher level abstraction over complex relationships. TypeQL also allows users to derive implicit information that is hidden in a dataset, as well as reduce the complexity of that information.

Licensing[edit]

TypeDB is available in two versions: an open-source version and a proprietary version (TypeDB Cluster).

The open-source version is available for free under the GNU Affero General Public License V3. It is limited to running on one node only due to the lack of clustering and comes without much security.

The proprietary version, TypeDB Cluster, allows for scalability and higher security.[6] TypeDB Cluster is available under a closed-source proprietary license.

References[edit]

  1. ^ "Releases · vaticle/typedb". GitHub.
  2. ^ "TypeDB System Properties".
  3. ^ Barolli, Leonard; Terzo, Olivier (2017-07-04). Complex, intelligent, and software intensive systems : proceedings of the 11th International Conference on Complex, Intelligent, and Software Intensive Systems (CISIS-2017). Cham. ISBN 9783319615660. OCLC 992988924.{{cite book}}: CS1 maint: location missing publisher (link)
  4. ^ "Inference in TypeDB". blog.typedb.com. 3 October 2022.
  5. ^ "Hyper-relation - UNL Wiki". www.unlweb.net.
  6. ^ "Introduction to TypeDB Cluster". blog.vaticle.com. 21 March 2022.

Bibliography[edit]

  • Malewicz, Grzegorz; Austern, Matthew H.; Bik, Aart J.C; Dehnert, James C.; Horn, Ilan; Leiser, Naty; Czajkowski, Grzegorz (2010), "Pregel", Proceedings of the 2010 ACM SIGMOD International Conference on Management of data, SIGMOD '10, New York, NY, USA: ACM, pp. 135–146, doi:10.1145/1807167.1807184, ISBN 9781450300322, S2CID 53034533