Skip to main content

Intro to the Knowledge Graph

What is a Knowledge Graph?

A Knowledge Graph is a version-controlled semantic model of a dataset, which is used by Veezoo to understand your question and generate the correct SQL query that answers it.

It is represented as a set of files using a modelling language called VKL, the Veezoo Knowledge Language. The Veezoo Knowledge Language is a semantic modelling language that is based on SQL, allowing you to model and document your data in a way that business users and Veezoo can understand.

Let's go over a simple example to explore the basics of VKL and how you can use it to answer your questions.

An Example

Let's say you are a data analyst at Hitchhiker, a small sci-fi movie e-commerce website, and you have the following flat table, called ORDERS.

idcustomer_idcustomer_firstnamecustomer_lastnamecountrymoviedatereturned
10001TillHaugCHThe Hitchhiker's Guide to the Galaxy2020-10-29yes
10012AlbertEinsteinDEClockwork Orange2019-08-09no
10021TillHaugCH2001: A Space Odyssey2020-10-30no
10033MichaelJacksonUSInterstellar2020-09-20no

You want to make it available to your manager in an easy way, so you can work on some cool prediction models, instead of answering his reporting questions.

Thankfully, you have Veezoo.

You open Veezoo, go to Veezoo Studio and connect it to this flat table on your PostgreSQL database. In 1 click, Studio creates the following Knowledge Graph for you.

hitchhiker
├── database
│   └── postgres
│   └── movie_db
│   ├── database.vkl
│   └── ORDERS
│   └── table.vkl
└── knowledge-base
└── classes
   └── Order
   ├── entities
   | ├── Country.vkl
   | ├── Customer.vkl
   | └── Movie.vkl
   └── class.vkl

Now, first of all: Don't Panic!

We will explore together the essence of this Knowledge Graph layer-by-layer, so you can get quickly up and running.

The Knowledge Graph is divided into different layers. We will focus here on the two most important ones: knowledge-base and database layers.