How QueryDB Works
QueryDB lets you connect your PostgreSQL database and ask questions in plain English. Here is exactly what happens, step by step, with no hand-waving.
Create your account
Sign up with your email address. You will receive a verification email — click the link to activate your account before logging in.
Email verification is required before you can access the app.
Create account →Add your PostgreSQL connection
Navigate to Connections and click Add Connection. Enter a display name and your PostgreSQL connection string in the format:
postgresql://user:password@host:5432/databaseThe backend validates the connection is reachable before saving it. Duplicate connections to the same URL are prevented.
Go to Connections →Configure AI table & column access
Open your connection and choose which tables the AI is allowed to query. For each table you can also select specific columns and optionally add plain-English descriptions (e.g. 'Customer purchase history') and column comments (e.g. 'FK to users.id'). These hints make the AI significantly more accurate.
Saving your table selection triggers an async schema build. The status cycles through created → pending → ready. The AI can only run queries once the status is ready.
Add your LLM API key
Go to API Keys and save a key for your preferred provider. QueryDB supports OpenAI, Anthropic, and Groq. You supply the provider name, the exact model name (e.g. gpt-4-turbo), and your API key.
Keys are encrypted at rest and never exposed to the browser. Each (provider, model) pair is stored independently so you can switch models per query.
Manage API Keys →Start a conversation
Go to the Query page. Click New Chat, pick your database connection, and optionally give the conversation a title. A conversation is a persistent thread tied to one connection — all queries and replies are stored in its history.
If you leave the title blank it defaults to 'New Chat' and is automatically renamed to your first question once you send it.
Open Query →Ask a question
Type any question in plain English — 'How many orders were placed last week?' or 'List the top 10 customers by revenue'. QueryDB translates it into a safe PostgreSQL query, executes it, and returns a plain-English answer alongside the generated SQL so you can verify it.
Queries are rate-limited to 20 per hour per account. The generated SQL is always read-only — INSERT, UPDATE, DELETE, and DROP are blocked.
Under the hood: what happens when you send a query
The AI determines whether your message is a genuine data question or casual chat. Casual messages never reach your database.
Only the tables you previously enabled are visible to the AI. The system picks the relevant subset from your saved schema, keeping the prompt focused and token-efficient.
The AI produces a read-only PostgreSQL query using parameterised placeholders. DML statements (INSERT, UPDATE, DELETE, DROP) are explicitly blocked at the prompt level.
Before execution the query is parsed to catch hallucinated table names, multiple statements, and other disallowed patterns.
The validated query runs against your database. If it fails the system retries with the error context prepended to the prompt.
The raw result rows are passed to a separate formatting step that writes a concise plain-English summary for the user.
Team workspaces
QueryDB supports team workspaces. Owners can create a team, invite colleagues by email, and share database connections across the team. When a colleague accepts the invitation, they join the team and can use shared connections to run their own queries.
- → Team members see shared connections in read-only mode — they cannot change table/column configuration.
- → Each member's query history is private to them even within a shared workspace.
- → Only the team owner can rename or delete the team, evict members, or cancel invitations.
Common questions
Is my database password safe?+
What LLM providers are supported?+
What databases are supported?+
What happens if the schema build fails?+
Can the AI modify my data?+
Ready to try it?
Create a free account and run your first query in under five minutes.