# What is a Nested table?

- Published on Sep 17, 2024
- 2 minute(s) read

## Overview

A nested table is a data structure that represents a table within another table. It is embedded as a row into another table, creating a hierarchical or a “nested” structure. Nested tables allow you to extract data from tables with complicated structures where child-row data points inherit data points from parent rows.

Hyperscience currently supports one and multiple tables with a single level of nested hierarchy. Learn more about multiple tables in [Table ID](https://help.hyperscience.ai/general-information/docs/table-identification).

## Elements

Nested tables consist of a Child Table and a Parent Table:

- **Child Table** - the embedded element of the structure. It usually contains more rows with detailed information.
- **Parent Table** - the “outline” of the Nested Table. It contains general information and usually consists of rows above and below the child table.

## Creating a layout with nested tables

Add a new table by clicking the **Add Table** button at the bottom of the Tables card of the Layout Editor. Clicking the **Add Table** button automatically creates a new table.

To learn more about semi-structured layouts see [Creating Semi-structured layout](https://help.hyperscience.ai/general-information/docs/creating-semi-structured-layouts).

Define a nested table by adding a child table. Doing so automatically creates a parent table for this layout. Create a child table by clicking the **Add Child Table** button.

## Annotating nested tables

You can annotate nested tables in Supervision and in Training Data Management (TDM).

### Annotating a nested table through Supervision

Once you’ve submitted your documents, the system lets you annotate the child table first, and then the parent table.

Follow the steps described in [Table ID](https://help.hyperscience.ai/general-information/docs/table-identification) to annotate your nested tables.

The right-hand sidebar indicates which table you’re currently viewing.

> The parent table’s row boundaries are indicated with a solid line. The child tables’ rows are indicated with a dashed line.

### Annotating a nested table through TDM

Navigate through each table by clicking on it on the right-hand side of the screen.

> The number of columns and the type of table you’re currently annotating (child or parent) are displayed in the right-hand sidebar.
> 
>

You can also display a certain column by selecting it in the **Visible Columns** drop-down menu at the top of the page.

Follow the steps described in [Table Identification](https://help.hyperscience.ai/general-information/docs/table-identification) to annotate your tables.

The number on the left displays the consecutive number of the parent row (e.g., 1, 2, 3), while the number on the right is a combination of the consecutive number of the child row and the child row’s parent row (e.g., 1-1, 2-1, 3-1), as shown in the screenshot below:

Ensure that all child rows are within the correct parent rows’ boundaries. If they’re not included, a warning will appear when you try to save the changes in the document, and an exclamation mark will appear next to the excluded row.
