# Building Data Model

## Create Data Model

The video below guides you through the steps to **create a Data Model** and **set up Primary Keys** for the corresponding datasets.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwHpnhGKp0mcSL3nAcxD%2Fuploads%2FlLhdlDyxVI4D3A0dGHVT%2Fscreen-capture-create-datamodel-and-primary-key.webm?alt=media&token=5bd0abbe-ad99-403d-9c6d-59aa9b1c13e3>" %}

## Set up Primary Keys

**A Primary Key** is essential for setting up **Relationships** within each Data Model.

## Establish Relationships

The video below walks through the steps to **create a Relationship** in a Data Model, assuming the Data Model has been created previously.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwHpnhGKp0mcSL3nAcxD%2Fuploads%2F7sDyUCWmvXD0kIeXyOT2%2Fscreen-capture-create-relationship.webm?alt=media&token=bd679747-3a19-4794-a654-8d9025262a13>" %}

## Define Measures

**Measures** are created using aggregate functions (such as **SUM**, **COUNT**, etc.) that can be calculated from data.

FPT Data Suite supports **Basic Measures** (like SUM, AVG, MIN, MAX), and users can leverage these in the report-building process.

Additionally, users can create their own custom Measures for different, more complex calculations to meet specific reporting needs.

The video below walks you through the steps to **create a Measure** and test the newly created Measure.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwHpnhGKp0mcSL3nAcxD%2Fuploads%2FZzSbAPJ0MZwcGBFiKsVu%2Fscreen-capture-create-measure.webm?alt=media&token=782ea9fe-5197-483c-b01d-88525bc1be41>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasuite.vn/english/get-started-with-fpt-data-suite/tutorial/building-data-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
