# What is an Entity?

* Langstack applications support Entities to store data.
* Using the Entity template, users can create database entities to store, display and access data.
* Users may create an Entity by defining the fields for the entity.
* An Entity may be created, updated, copied, or deleted.
* Users can define two (2) types of relationships between Entities:
  * One-to-One (1-to-1): One Parent Entity can be related to One Child Entity
  * One-to-Many (1-to-M): One Parent Entity record can be related to multiple child records in another Entity.
* An Entity may be configured with a Validation pipeline for data creation or update. The Validation pipeline serves as a series of checks before the data is stored in the target Entity.
* Triggers can be added and configured to perform operations when data is created, updated, or deleted in an Entity.
* Data within Entities can be accessed independently and through Langstack applications such as APIs, Flows, and ETL pipelines.

## How to create and work with an Entity

To create an Entity:

* Click on Database>Entity database on the left side panel.

{% embed url="<https://media.langstack.com/documentation/media/images/code/training_manual/chapter_2/ch2whatisanentity_entitydatabaseinmenu.png>" %}

* Click on the \[+ Entity] button.

{% embed url="<https://media.langstack.com/documentation/media/images/code/training_manual/chapter_2/ch2whatisanentity_addentity.png>" %}

* Add and define relevant fields.
* Click the \[Save] button.


---

# 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.langstack.com/welcome/get-started/learn-langstack/basics-and-essentials/what-is-an-entity.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.
