# DuckDB

> A small database for sums and counts. It runs inside your own program.

**Field:** Data Engineering  
**Category:** Analytics & BI  
**Also known as:** Duck DB

## Think of it like

It is like a small tool you keep in your pocket for data. There is no server to set up. It just runs where you are.

## Definition

DuckDB is a free, open source database for crunching numbers, and it runs inside your own program. There is no server to install or start. It stores data in columns. So sums and group-bys over millions of rows are fast, even on a laptop. It can query CSV and Parquet files directly, and work with pandas or Polars data in Python. People often call it the SQLite of data work.

## Example

An analyst downloads 2 GB of Parquet files. On her laptop, DuckDB queries them in seconds. She never needs a login to the warehouse.

## Example code

```sql
SELECT country, COUNT(*) AS orders
FROM 'orders.parquet'
GROUP BY country
ORDER BY orders DESC;
```

DuckDB reads the Parquet file straight from disk. There is no load step and no server.

## Why it matters

Much analysis does not need a cluster. DuckDB makes a laptop enough for data that once needed a warehouse.

## Common mistake

Using it as the main database for a busy app. It is built for analysis, not many small writes from many users.

## Three principles

- **In-process.** Runs inside your program.
- **Column storage.** Fast sums and group-bys.
- **Reads files.** CSV and Parquet, no loading.

## Related terms

- [Query Engine](https://learn.benibix.com/term/data/query-engine)
- [Apache Parquet](https://learn.benibix.com/term/data/apache-parquet)
- [Columnar Storage](https://learn.benibix.com/term/data/columnar-storage)
- [pandas](https://learn.benibix.com/term/data/pandas)
- [SQLite](https://learn.benibix.com/term/development/sqlite)
- [ClickHouse](https://learn.benibix.com/term/data/clickhouse)

## Told apart from

- [DuckDB vs SQLite](https://learn.benibix.com/compare/duckdb-vs-sqlite): People think DuckDB is just SQLite. Both run inside your program, with no server. SQLite is built for an app's own data, with many small reads and writes. DuckDB is built for sums and counts over millions of rows. Many teams use both, each for its own job.
- [ClickHouse vs DuckDB](https://learn.benibix.com/compare/clickhouse-vs-duckdb): People think ClickHouse and DuckDB are the same kind of tool, since both store data in columns and add up numbers fast. DuckDB runs inside your own program, on one machine, with no server. ClickHouse runs as a server, often on many machines. Many people can query it at once. Use DuckDB on a laptop and ClickHouse behind a live dashboard.

![Left: an app talks over the network to a separate database server. Right: DuckDB sits inside the app's own process, reading a Parquet file and a CSV file on the same disk, with no server in between.](https://learn.benibix.com/diagrams/duckdb-in-process.svg)

---

Source: https://learn.benibix.com/term/data/duckdb
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
