---
title: "Extbase persistence – models and the database"
manual: "TYPO3 Explained"
version: "14.3"
permalink: "https://docs.typo3.org/permalink/t3coreapi:database-extbase@14.3"
source: "ApiOverview/Database/Extbase/Index.rst"
rendered: "2026-10-01T15:20:05+00:00"
---

# Extbase persistence – models and the database {#database-extbase}

Extbase provides its own way to persist and retrieve data using **models** and
**repositories**, which are built on top of TYPO3's database abstraction layer.

> [!NOTE]
> **See also**
>
> -   [Extbase models](https://docs.typo3.org/permalink/t3coreapi:extbase-domain-model@14.3)
> -   [Repository pattern in Extbase](https://docs.typo3.org/permalink/t3coreapi:extbase-domain-repository@14.3)
> -   [Manual mapping for arbitrary tables](https://docs.typo3.org/permalink/t3coreapi:extbase-domain-model-mapping@14.3)

Repositories in Extbase usually define custom `find*()` methods and rely on
`\TYPO3\CMS\Extbase\Persistence\Generic\Query` to perform queries on models.

While **Extbase persistence** is the standard way to work with data in Extbase,
you can also use the **DBAL QueryBuilder** directly within an Extbase context when:

-   You need better performance on large datasets.
-   You are performing complex queries (aggregates like `SUM`, `AVG`,
    ...).

> [!NOTE]
> Extbase queries and DBAL queries are **not interchangeable**. Extbase uses its
> own persistence layer with different concepts and behaviors. Use each
> approach where it fits best — and avoid mixing them in the same method or query logic.
