
Sheikh LimonIntro Imagine you’re running a real production system — real users, real payments, real...
Imagine you’re running a real production system — real users, real payments, real consequences.
And you want to ask AI:
Sounds easy… until you realize the risk.
Letting AI directly access your production database is a bad idea.
Not “maybe risky.” Just bad.
Because:
DROP TABLE users)Giving an AI direct DB access is like handing a stranger the keys to your bank vault.
AskDB solves this by creating a sandboxed copy of your database.
You can check out the project here:
👉 https://github.com/mgorabbani/askdb
Here’s how it works:
Production Database (live system)
│
│ dump (pg_dump / mongodump)
▼
Sandbox Database (Docker container)
│
│ AI queries happen here
▼
ChatGPT / Claude / Cursor
The sandbox is completely isolated.
The AI can:
And none of it touches production.
Think of it like a photocopy of your vault — safe to explore without risk.
A natural question is:
“Why not just use a read-only database user and call it a day?”
That does help — it prevents writes.
But it doesn’t solve the full problem.
A read-only user can still access everything:
Now imagine that data flowing through an AI tool.
Even if nothing is modified, you still risk:
So the problem isn’t just writes — it’s also what the AI is allowed to read.
AskDB adds a layer of control:
email, password, etc.)Once you have a safe sandbox, things get powerful:
“How many users churned last month?”
“Top 10 products by revenue”
“Why did this order fail?”
All answered without risking your live system.
There’s one catch.
Your sandbox is a snapshot in time.
Meanwhile, production keeps changing:
If your snapshot is old, your insights are wrong.
Right now, AskDB refreshes the sandbox once a day.
That works — but for fast-moving systems, it’s not always enough.
AskDB lets you safely combine:
Without risking your system, your users, or your sanity.
One limitation of this approach is data freshness.
If the sandbox isn’t updated frequently, the insights can become outdated.
I’m currently working on adding configurable auto-sync, so the sandbox stays fresh without touching production.
I’ll break that down in the next post.