Ollama is popular because it makes running large language models (LLMs) locally simple, private, and inexpensive. DBeaver 26.2.5, also free & open-source, recently added support for Ollama. And both pair well with PostgreSQL.

Why Ollama Is Popular?

  1. Runs AI Locally — Execute models such as Llama, Qwen, Gemma, and DeepSeek on your own computer without relying on cloud services.

  2. Privacy and Data Control — Prompts and data can remain entirely on your machine, making Ollama attractive for sensitive business information and internal applications.

  3. Free and Open Source — Ollama is free to use locally, with no per-token API charges. Individual models have their own licenses.

  4. Easy Installation — Download and run models with simple commands:

    ollama run llama3.2
  5. Developer-Friendly API — Provides a local REST API compatible with many AI development tools, making integration with Python, applications, and databases straightforward.

  6. Broad Model Support — Supports numerous open-weight models, allowing developers to experiment with different capabilities, sizes, and performance characteristics.

  7. Works Offline — Once models are downloaded, inference can run without an internet connection.

  8. Hardware Flexibility — Runs on macOS, Linux, and Windows, supporting CPU inference and GPU acceleration on compatible hardware.

Why Developers Especially Like It

Ollama removes much of the complexity traditionally associated with deploying LLMs. Developers can prototype AI applications, build RAG systems, experiment with AI agents, and implement natural-language-to-SQL interfaces without managing complicated inference infrastructure.

Bottom Line

Ollama has become popular because it makes local AI accessible. It provides a straightforward way to download, run, and integrate powerful language models while retaining control over data, infrastructure, and costs.

For database developers, its biggest attraction is the ability to connect an LLM to database schemas and metadata, enabling the development of AI-assisted SQL applications without sending that information to an external AI provider.

DBeaver Community 26.2.5 added Ollama support, and now you can take your first steps.

Installation

I am using Ubuntu and installing Ollama is as you expect, pretty simple.

$curl -fsSL https://ollama.com/install.sh | sh












$ollama

First try at running Ollama


I selected the gemma4:12b model





Confirm the download


Ollama is ready to go. 






























































DBeaver


If you have not downloaded DBeaver Community Edition 26.2.5, now is the time to do so.  Open up the AI preferences and look for the green plus sign  '+' on the right side. It previously supported Copilot and OpenAI.  Ollama support was added in this release.


Windows -> Preferences -> AI -> Model configuration

























Hit the green + to add Ollama














Now we can configure Ollama

Scroll for Ollama    






















Pick the model by clicking on the two blue arrows.













We have connected to the model











Now that we are connected to the model, test the connection to Ollama.
Test the connection















First Step

Open the AI Assistant, and in the lower-right corner, we can enter prompts.  Note that I have a connection to a PostgreSQL 18 server with the DVDrental database loaded.

The first prompt







First, DBeaver wants to double-check that you REALLY want to trust the AI with your data.  Once you confirm, the prompt is sent to the AI.  


Double-check the LLM and the model

Now we can watch Ollama work with the database.  



The first response




















Ollama prompts you to request a clearer overview of the data structure. Enter 'yes,' and we get background on the tables and views. 



Information about views




Have The AI Write SQL

Anyone who deals with relational databases knows the angst that sets in when you get a data request and have to work your way through a complex schema in an attempt to deliver an answer.   Now you can ask Ollama your question in a human language and get an answer. 

Below is a request to find the top five rentals by their revenue.
New prompt












The Query


Ollama responds with an explanation of how it plans to proceed, then provides a query. It also provides three options for that query.  The three little squares will run the query for you, copy the query to a SQL Editor, or copy the code to a clipboard.


Run, Edit, or Copy 








If you pick the middle option, you will see the SQL generated by the prompt.



























Here is an easier-to-read version of the query.



SELECT

f.title,

SUM(p.amount) AS total_revenue

FROM public.payment p

JOIN public.rental r ON p.rental_id = r.rental_id

JOIN public.inventory i ON r.inventory_id = i.inventory_id

JOIN public.film f ON i.film_id = f.film_id

GROUP BY f.title

ORDER BY total_revenue DESC

LIMIT 5;


You can now run that query to see the results.


The Top five titles by revenue





















Summary

By using DBeaver 26.2.6 with Ollama, you can also start interrogating your PostgrSQL database for answers without having to write SQL.