Hi all. This is the first post of a small series called New to AI? Short posts, one topic each, written for DBAs who keep hearing the words and want the picture without a 40-minute talk. I'll link the official docs, so you can check me. Today: the big picture.
What a model actually does
A large language model (LLM) does one thing: it looks at the text in front of it and predicts what comes next, a little piece at a time. Those pieces are called tokens, roughly a word or part of a word. It learned that from huge amounts of text. That's why it can explain an execution plan, write a decent SQL query or sum up an alert log.
What it doesn't do is look things up. It has never logged in to your database. It doesn't know your table names, your version or what happened at 02:00 last night, unless that text is in front of it. The amount of text it can read for one answer is the context window.
Think of a very well-read new colleague who has never had a login to your systems. Smart, fast, never tired. But everything it knows about your database, you have to show it.
One surprise for many people: the chat doesn't really remember. The app sends the whole conversation again with every question. Close the chat, and the model starts from zero.
Why it can be sure and wrong
Because it predicts likely text, it always has an answer, and it sounds equally sure whether it's right or not. A column that doesn't exist, a parameter from another version, a view name that's almost right. This is what people call hallucination. For a DBA it feels a lot like a plan built on stale statistics: confident, and wrong.
Running without errors doesn't mean correct either. When I gave seven AI models the same broken SQL Server, one small model "fixed" a deadlock by dropping the stock update. No errors, 30 units of stock gone.
Three ways AI meets your database
This is the part I wish someone had drawn for me at the start. The model is the same, but where it sits changes everything, especially who actually runs the SQL.
| Way | What it looks like | Where to read more |
|---|---|---|
| 1. A chat next to you | You paste an error or a plan, it explains and drafts SQL. You decide what runs. | Copilot in SSMS, or a local model with Ollama |
| 2. AI inside the database | Embeddings, vector search and plain-English questions, called straight from SQL. | Oracle AI Vector Search, Select AI, SQL Server 2025 AI features, pgvector for PostgreSQL |
| 3. An agent with tools | The model picks its next step and asks a tool to run a query. Most tools now speak MCP, a standard way to plug a model into a system. | SQLcl MCP server, SQL MCP Server, a Postgres MCP server in my lab |
MySQL, MongoDB and others are adding vector features too. I'll compare them in the vector search post of this series.
Way 3 is the one to be careful with. The model never touches the database itself. It asks, and the tool runs the query with whatever account you gave it. Give it a read-only user, and the worst case is a bad query. Give it your DBA account, and you've handed a fast, confident stranger the keys.
Local or cloud?
A cloud model (ChatGPT, Claude, Gemini, Copilot) is usually stronger, but your prompt leaves your network, including anything you pasted. A local model running on your own machine keeps the data with you, and on a normal laptop it's smaller and slower. For lab work I use both, and anything sensitive stays local.
Prompt, token, context window, tool call, agent: I mapped every AI word to something DBAs already know, with video, in You Already Speak AI, one for each database:
Official reading, if you want to go deeper
- Microsoft Learn: Understanding tokens
- Oracle: AI Vector Search User's Guide and Select AI
- Microsoft: Intelligent applications and AI in SQL Server
- PostgreSQL: pgvector
- Model Context Protocol, the official site
- Risks: OWASP Top 10 for LLM applications
Next in New to AI?
Next up is the practical one: how DBAs actually use AI day to day, and which old habits it makes faster. After that come embeddings and vectors, vector search in your database or in a vector database, RAG, text-to-SQL, MCP and agents, and local vs. cloud models with the security side.
Which AI word would you like explained next? Leave it in the comments.



Comments
Post a Comment