# Racket and DuckDB

**URL:** https://racket.discourse.group/t/racket-and-duckdb/4003
**Category:** Questions & Answers
**Tags:** question
**Created:** [November 12, 2025, 2:09pm UTC](https://racket.discourse.group/t/racket-and-duckdb/4003 "2025-11-12T14:09:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jw\_gpc](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jw\_gpc](https://racket.discourse.group/u/jw_gpc)
#### Post date: [November 12, 2025, 2:09pm UTC](https://racket.discourse.group/t/racket-and-duckdb/4003/1 "2025-11-12T14:09:51Z")

</div>

Hello! I was wondering if anyone is using DuckDB with Racket. I know the db library works with SQLite, but I was interesting in trying out testing out DuckDB instead, and I haven't been able to find any references online to anyone using DuckDB with Racket. If someone out there is using it, would it be possible to give an overview of how you were able to set that up, please?

Thanks!

---

<div class="post-metadata">

### Author: ![LiberalArtist](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/liberalartist/32/151_2.png) [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)
#### Post date: [November 13, 2025, 12:45am UTC](https://racket.discourse.group/t/racket-and-duckdb/4003/2 "2025-11-13T00:45:38Z")

</div>

It looks like DuckDB supports access through ODBC: [ODBC API Overview – DuckDB](https://duckdb.org/docs/stable/clients/odbc/overview) If you install and configure the necessary DuckDB ODBC components, you should be able to use [`odbc-connect`](https://docs.racket-lang.org/db/connect.html#%28def._%28%28lib._db%2Fmain..rkt%29._odbc-connect%29%29) and related functions from the `db` library. You may find the [ODBC-related notes for the `db` library](https://docs.racket-lang.org/db/notes.html#%28part._odbc-requirements%29) helpful if you have problems.

If you want more direct integration, you would ultimately implement a `duckdb-connect` function for `db`. If it's correct that DuckDB provides an SQLite-compatible C API (but the link at [Overview – DuckDB](https://duckdb.org/docs/stable/clients/c/overview.html) seems to be broken), the fact that `db` internally uses an object-oriented design may make that relatively easy to define as a variant of the existing SQLite support.

---

<div class="post-metadata">

### Author: ![jw\_gpc](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jw\_gpc](https://racket.discourse.group/u/jw_gpc)
#### Post date: [November 13, 2025, 10:59am UTC](https://racket.discourse.group/t/racket-and-duckdb/4003/3 "2025-11-13T10:59:21Z")

</div>

Thank you! That's great information.
