> For the complete documentation index, see [llms.txt](https://docs.sdv.dev/sdv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sdv.dev/sdv/integration/overview/data-modalities.md).

# Data Modalities

SDV is designed to work on tabular data, where each data table contains rows and columns. SDV supports single-table, multi-table, and sequential data modalities.

## Single Table Data

Single table data contains rows and columns of information. Each row typically represents a new entity such as a user, transaction, or session. Each column represents an attribute of an entity. It should contain the same type of data.

<figure><img src="/files/gbKU9GXWo5FzmzeF0TaO" alt=""><figcaption><p>This example of a single table includes a new row for each guest of a hotel.</p></figcaption></figure>

{% hint style="info" %}
SDV supports missing values in single table data. Single table data should be loaded into Python as a pandas DataFrame object.
{% endhint %}

**Key Concepts:**

* Primary key, a column that uniquely identifies every row in the table.

## Multi Table Data

Multi table data is present in multiple tables that each have rows and columns. The tables are connected to each other through foreign and primary key references.

<figure><img src="/files/m1Iuq2Jqjk4o6YoMDk3T" alt=""><figcaption><p>This example of a multi table dataset has a table for hotels and a table for their guests. Each hotel has multiple guests who have visited.</p></figcaption></figure>

**Key Concepts:**

* Primary key, a column that uniquely identifies every row in the table.
* Foreign key, a column that references another primary key column. Typically the reference is to another table's primary key, but it's possible to reference the same table.
* Alternate key, a column that is unique for every row, but is not the primary key.
* Composite key, when multiple columns together act as a primary, foreign, or alternate key to the table.

{% hint style="info" %}
Multi-table data can contain relationships. These are references from one table (foreign key) to another table (primary key). SDV requires *referential integrity*, meaning that  there should be no unknown references or broken links between the tables.

Multi-table data should be loaded into Python as a dictionary. The dictionary should map each table name (string) to a pandas DataFrame object containing the data for that table.

```python
my_data = {
    'hotels': <hotels DataFrame>,
    'guests': <guests DataFrame>
}
```

{% endhint %}

### Sequential Data

Sequential data represents ordered records, such as in a timeseries.  SDV is designed for the case where your table may contains multiple, independent sequences belonging to different entities (users, patients, etc.).

<figure><img src="/files/tdvX2emldgh3F9LBcyfp" alt=""><figcaption><p>This example shows sequential data related to vital signs. The table contains multiple sequences, each corresponding to a different patient. For each sequences, health measurements change over time.</p></figcaption></figure>

{% hint style="info" %}
The main difference betwen single-table and sequential data is that in single-table data, the rows do not have an order. In sequential data, you have multiple ordered sequences.

Sequential data should be loaded into Python as a pandas DataFrame object.
{% endhint %}

**Key Concepts:**

* Primary key, a column that uniquely identifies every row in the table. Sequential data may or may not have a primary key.
* Sequence key, a column that uniquely identify each multi-row sequence in the table. In our example, the sequence key is `Patient ID`.
* Sequence index, a column that determines the order of the rows. This is typically an index or timestamp. Some types of sequential data may not have a sequence index.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sdv.dev/sdv/integration/overview/data-modalities.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
