# SchemaCrawler LLM Context: Extract and Prune Relational DB Schemas

DevFeed: [SchemaCrawler LLM Context: Extract and Prune Relational DB Schemas](<https://devfeed.tech/articles/schemacrawler-llm-context-extract-and-prune-relational-db-schemas-50878.md>)

Original publisher: [Read original article](<https://www.sitepoint.com/schemacrawler-llm-context-extract-prune-db-schemas/>)

Author: SitePoint Team

Published: 2026-09-10T19:34:44Z

Content type: tutorial

Language: en

Sources: [SitePoint](<https://devfeed.tech/sources/sitepoint.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [text2sql](<https://devfeed.tech/topics/text2sql.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [Python](<https://devfeed.tech/topics/python.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [context-window](<https://devfeed.tech/tags/context-window.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [docker](<https://devfeed.tech/tags/docker.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llm-agents](<https://devfeed.tech/tags/llm-agents.md>), [llm-prompts](<https://devfeed.tech/tags/llm-prompts.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [schemas](<https://devfeed.tech/tags/schemas.md>)

## AI overview

A tutorial on extracting relational database schemas with SchemaCrawler, filtering irrelevant objects and columns, reducing the schema to a connected subgraph, and compacting it into pseudo-DDL for LLM text-to-SQL workflows. It also covers Docker or Homebrew installation and regenerating schema context in CI after migrations.

## Source excerpt

Extract, filter, and compact relational database catalogs using SchemaCrawler to feed precise, token-efficient database context to LLM agents. Continue reading SchemaCrawler LLM Context: Extract and Prune Relational DB Schemas on SitePoint.