Grakn is a platform for developing applications that work with complex data leveraging artificial intelligence. In order to support this, the company has developed its own declarative language, called Graql. This has a syntax that is similar to SQL but is much sparser. Like Grakn Core, Graql is open source.

Fig 02 - Defining the meaning of relationships
There are effectively five things that you can do with Graql. Firstly, you can model your domain using a concept level schema with an entity-relationship paradigm but including hyper-entities and hyper-relationships, as well as rules to build complex knowledge models. Further, you can define the meaning of the relationship your entities have with those relationships: in other words, the roles they play in them (for example, husband and wife, or employer and employee – see Figure 2). A variety of relationship styles can be modelled, including symmetric, asymmetric, reflexive, ternary and infinitary. Nested, transitive and equivalence relations are all supported as well. Moreover, the roles specified by your relationships act as constraints that prevent you from using inappropriately typed entities within them.
Secondly, you can model type inheritance into your knowledge model. Again, an example of this is shown in Figure 2. Thirdly, you can define rules within your knowledge schema. Rules can be chained if required.
Fourthly, the product supports both type-based and rule-based inferencing (with backward chaining – the company is working on an implementation of forward chaining). This is enabled by its automated reasoning engine, which is also notable for readily handling highly permutative queries (that is, queries that deal with a significant amount of permutation).
In this context, it is worth commenting on one of the major differences between Graql and OWL (Web Ontology Language). This is that changing your database schema is a major exercise when using OWL (or SQL for that matter), and while Grakn requires a schema, it has been built to be more flexible: for example, you can add/update/ delete new entities, attributes and relation types in varying orders and combinations, even after data has already been loaded into the database, without breaking your existing model, which you can’t do in OWL.
Fifth, Grakn has various distributed analytic algorithms, such as community detection, built into Graql as native functionalities of the language. In effect, what Grakn has done here is to provide an abstraction layer that hides the complexity of deploying these algorithms. There is no need to import a relevant model, configure it or do anything else, you simply use the appropriate Graql statement. We are especially impressed with this feature.
Finally, and not related to Graql, there is a migration facility that Grakn uses that can help you to migrate existing, into your Grakn knowledge base. This is also important for companies wishing to migrate to Grakn from other RDF-based graph databases.