---
title: "Introduction"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:database-introduction@12.4"
source: "ApiOverview/Database/Introduction/Index.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Introduction {#database-introduction}

TYPO3 relies on storing its data in a relational database management
system (RDBMS). The Doctrine DBAL component is used to enable connecting to
different database management systems. Most used is still MySQL / MariaDB, but
thanks to Doctrine others like PostgreSQL and SQLite are also an option.

The corresponding DBMS can be selected during installation.

This chapter gives an overview of the basic TYPO3 database table structure,
followed by some information on upgrading and maintaining table and field
consistency, and then deep dives into the programming API.

## Doctrine DBAL {#doctrine-dbal}

Database queries in TYPO3 are done with an API based on [Doctrine DBAL](https://www.doctrine-project.org/projects/dbal.html).
The API is provided by the system extension `core`, which is always loaded and
thus always available.

Extension authors can use this low-level API to manage query operations
directly on the configured DBMS.

Doctrine DBAL is rich in features. Drivers for various target systems enable
TYPO3 to run on a long list of ANSI SQL-compatible DBMSes. If used properly,
queries created with this API are translated to the specific database engine by
Doctrine without an extension developer taking care of that specifically.

The API provided by the Core is basically a pretty small and lightweight facade
in front of Doctrine DBAL that adds some convenient methods as well as some
TYPO3-specific sugar. The facade additionally provides methods to retrieve
specific connection objects per configured database connection based on the
table that is queried. This enables instance administrators to configure
different database engines for different tables, while being transparent to
extension developers.

This document does *not* outline every single method that the API provides. It
sticks to those that are commonly used in extensions, and some parts like the
rewritten schema migrator are omitted as they are usually of little to no
interest to extensions.

## Understanding Doctrine DBAL and Doctrine ORM {#understanding-doctrine-dbal-and-doctrine-orm}

Doctrine is a two-part project, with [Doctrine DBAL](https://www.doctrine-project.org/projects/dbal.html) being the low-level
database abstraction and the interface for building queries to specific database
engines, while [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html) is a high-level object relational mapping on top
of Doctrine DBAL.

The TYPO3 Core implements - only - the DBAL part. Doctrine ORM is neither
required nor implemented nor used.

## Low-level and high-level database calls {#low-level-and-high-level-database-calls}

This documentation focuses on low-level database calls. In many cases, it is
better to use higher level APIs such as the [DataHandler](https://docs.typo3.org/permalink/t3coreapi:datahandler-basics@12.4) or [Extbase repositories](https://docs.typo3.org/permalink/t3coreapi:extbase-repository@12.4) and
to let the framework handle persistence details internally.

> [!TIP]
> Always remember the **high-level** database calls and use them when
> appropriate!
