Git Product home page Git Product logo

graql's Introduction

Grabl GitHub release Discord Discussion Forum Stack Overflow Stack Overflow

Grakn is a distributed knowledge graph: a logical database to organise large and complex networks of data as one body of knowledge.

Get Started Documentation Discussion
Whether you are new to coding or an experienced developer, it’s easy to learn and use Grakn. Get set up quickly with quickstart tutorial. Documentation for Grakn’s development library and Graql language API, along with tutorials and guides, are available online. Visit our documentation portal. When you’re stuck on a problem, collaborating helps. Ask your question on StackOverflow or discuss it on our Discussion Forum.

Meet Grakn and Graql

Grakn is a distributed knowledge graph: a logical database to organise large and complex networks of data as one body of knowledge. Grakn provides the knowledge engineering tools for developers to easily leverage the power of Knowledge Representation and Automated Reasoning when building complex systems. Ultimately, Grakn serves as the knowledge-base foundation for intelligent systems.

Graql is Grakn's reasoning and analytics query language. It provides an expressive knowledge schema language through an enhanced entity-relationship model, transactional queries that perform deductive reasoning in real-time, and analytical queries* with native distributed Pregel and MapReduce algorithms. Graql provides a strong abstraction over low-level data constructs and complex relationships. (* analytics queries are temporarily unavailable in 2.0.0)

Graql is distributed as an open-source technology, while Grakn comes in two forms: Grakn Core - open-source, and Grakn Cluster - our enterprise distributed knowledge graph.

Knowledge Schema

Grakn provides an enhanced entity-relationship schema to model complex datasets. The schema allows users to model type hierarchies, hyper-entities, hyper-relationships, and rules. The schema can be updated and extended at any time in the database lifecycle. Hyper-entities are entities with multiple instances of a given attribute, and hyper-relationships are nested relationships, cardinality-restricted relationships, or relationships between any number of entities. This enables the creation of complex knowledge models very easily and allows them to evolve flexibly.

Under the hood, Grakn has an expressive knowledge representation system based on hypergraph data structures (that generalises an edge to be a set of vertices - non-binary). Graql is Grakn’s reasoning (through OLTP) and analytics (through OLAP) declarative query language.

Logical Inference

Grakn’s query language performs logical inference through deductive reasoning of entity types and relationships, to infer implicit facts, associations, and conclusions in real-time, during runtime of OLTP queries. The inference is performed through entity and relationship type reasoning, as well as rule-based reasoning. This allows the discovery of facts that would otherwise be too hard to find, the abstraction of complex relationships into its simpler conclusion, as well as translation of higher-level queries into the lower level and more complex data representation.

Distributed Analytics (temporarily unavailable in 2.0.0)

Grakn’s query language performs distributed Pregel and MapReduce (BSP) algorithms abstracted as OLAP queries. These types of queries usually require custom development of distributed algorithms for every use case. However, Grakn creates an abstraction of these distributed algorithms and incorporates them as part of the language API. This enables large scale computation of BSP algorithms through a declarative language without the need of implementing the algorithms.

Higher-Level Language

With the expressivity of the schema, inference through OLTP, and distributed algorithms through OLAP, Grakn provides a strong abstraction over low-level data constructs and complicated relationships through its query language. The language provides a higher-level schema, OLTP, and OLAP query language, which makes working with complex data a lot easier. When developers can achieve more by writing less code, the productivity rate increases by orders of magnitude.

Importing Graql through Maven (for Java)

<repositories>
    <repository>
        <id>repo.grakn.ai</id>
        <url>https://repo.grakn.ai/repository/maven/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>io.graql</groupId>
        <artifactId>lang</artifactId>
        <version>{version}</version>
    </dependency>
</dependencies>

Replace {version} with the version number, in which you can find the latest on Graql's Maven Repository. Further documentation: http://dev.docs.grakn.ai/docs/client-api/java#graql

Building Graql from Source

Note: You don't need to compile Graql from source if you just want to use it in your code. See the "Importing Graql" section above.

  1. Make sure you have the following dependencies installed on your machine:

  2. Build the JAR:

    a) to build the native/raw JAR:

    bazel build //java:graql
    

    The Java library JAR will be produced at: bazel-bin/libclient-java.jar

    b) to build the JAR for a Maven application:

    bazel build //:assemble-maven
    

    The Maven JAR and POM will be produced at:

    bazel-bin/java/io.graql:lang.jar
    bazel-bin/java/pom.xml
    

Contributions

Grakn & Graql has been built using various open-source Graph and Distributed Computing frameworks throughout its evolution. Today Grakn & Graql is built using RocksDB, ANTLR, SCIP, Bazel, GRPC, and ZeroMQ, and Caffeine. In the past, Grakn was enabled by various open-source technologies and communities that we are hugely thankful to: Apache Cassandra, Apache Hadoop, Apache Spark, Apache TinkerPop, and JanusGraph. Thank you!

Licensing

This product includes software developed by Grakn Labs Ltd. It's released under the GNU Affero GENERAL PUBLIC LICENSE, Version 3, 29 June 2007. For license information, please see LICENSE. Grakn Labs Ltd also provides a commercial license for Grakn Cluster - get in touch with our team at [email protected].

Copyright (C) 2020 Grakn Labs

graql's People

Contributors

grabl avatar lolski avatar haikalpribadi avatar flyingsilverfin avatar vmax avatar maxbaxt avatar lriuui0x0 avatar alexjpwalker avatar kasper-piskorski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.