Guide · APIs & Databases

How to Open and Query a SQLite Database with DBeaver

You'll query a SQLite database with DBeaver Community and check three results from an original practice file. Allow time for installation and the first driver download; the exercise itself is short. You need a desktop computer, DBeaver Community and the sample database linked below.

A single database file opened into layered charcoal and violet table rows, small magnifier highlighting one record.
On this page

1. Download the practice database #

Get DBeaver Community through its official download, then save our SQLite practice database in a local folder you can identify easily.

The file contains one table, reading_list, and six invented book-planning records. It has no passwords, contacts or real customer data. Its fields are id, title, category and completed. We'll read it without changing any records.

Choose the Community package for your operating system. The application and the database file are separate downloads. Keep the database in a normal local working folder, so the path is easy to check when creating the connection.

If you want to inspect the sample's construction, the companion SQL file contains its schema and inserts. You don't need to execute that file for this tutorial: the downloadable database already contains the six rows. You can read the SQL in a code editor before connecting.

2. Create the SQLite connection #

In DBeaver, open the New Connection Wizard from the toolbar. Select the SQLite driver and click Next. The official connection guide describes this driver-selection workflow.

On the main connection page, set Path to your downloaded reading-list.sqlite file. This field names the database file. The SQLite settings documentation identifies Path as the local file location.

Click Test Connection. If DBeaver needs driver files, follow the download prompt. A successful test should identify a working SQLite connection. Click Finish to save the connection.

Use a name such as reading-list-practice if you change the connection label. The name should tell you what you're about to query. You don't need a server hostname or a hosted database account for this local example.

If the test fails, stop before moving on. Confirm that the file exists at the exact path, that it is the downloaded database and that DBeaver can read its folder. A successful wizard doesn't repair a missing or unrelated file.

3. Query a SQLite database with DBeaver in an SQL editor #

Select the practice connection in the connection tree. Choose SQL Editor → New SQL Editor from the main menu. The current SQL Editor documentation confirms that menu route.

Check the editor's active connection before entering SQL. It should refer to the practice connection you just created. DBeaver lets an editor's connection change without replacing its text, so the tab's words alone aren't enough to identify the target.

Enter this query:

SELECT id, title, category, completed
FROM reading_list
ORDER BY id;

Keep the cursor inside the statement and choose SQL Editor → Execute SQL Statement. The Windows/Linux shortcut shown in the execution documentation is Ctrl+Enter; use the menu if your keymap differs.

The results pane should contain six rows. The first title is Field Guide to Small Gardens; the last is Notebook of Night Skies. The completed values use 1 for finished and 0 for unfinished. The sample defines those values; other databases can use different conventions.

4. Filter the unfinished reading #

Replace the query with:

SELECT title, category
FROM reading_list
WHERE completed = 0
ORDER BY title;

Run Execute SQL Statement again. You should see three titles in alphabetical order: Everyday Bread, Notebook of Night Skies and Weekend Walks.

The statement requests only two columns and filters by the stored completion value. It doesn't modify the table. Compare the result with the first query: each returned title should have had a 0 in the earlier grid.

An empty grid is different from an error. It means a valid query returned no rows, provided execution succeeded. A misspelled table or column produces an error instead. Read that message before changing the application settings.

5. Count records by category #

Enter:

SELECT category, COUNT(*) AS books
FROM reading_list
GROUP BY category
ORDER BY category;

Run Execute SQL Statement. The expected result has three categories: Cooking, Outdoors and Science, each with a count of 2.

Add the counts yourself: the total should be six, matching the first query. This cross-check makes it easier to catch a wrong connection or an incomplete sample download. It also shows the difference between listing individual rows and summarizing several rows into a group.

You can keep these statements in a text file named reading-list-queries.sql. Save your own SQL in Git if you want a versioned record of later changes. For this exercise, there are no database changes to commit: all three statements are SELECT queries.

Known connection problems and their fixes #

A Java library was entered as the database path

A September 2026 DBeaver discussion identified a .jar driver path entered where the database file belonged. Use reading-list.sqlite in Path. Driver libraries are application components; they aren't the data file containing reading_list.

The first driver download fails

In a March 2025 driver-download thread, developers asked about repository access and the driver configuration. Later replies traced a Windows virtual-desktop problem to certificate trust and described correcting the certificate store. Check the download error and ask your administrator to fix repository or certificate access; don't bypass certificate validation just to reach the next step.

The official driver guide explains the role of JDBC libraries. If your network blocks downloads, resolve that installation requirement before retrying the connection. Changing the SQLite file won't fix a blocked library download.

Troubleshooting the query results #

ProblemLikely place to checkWhat to do
Connection test failsDatabase path or driver setupVerify the downloaded file path, then read the driver error
no such table: reading_listActive connection or wrong fileSelect the practice connection and recheck its Path
Only one query runsStatement execution modePut the cursor in the intended statement or select it
Filter returns no rowsSQL condition or different dataRun the six-row query again and inspect completed
Result pane isn't visibleEditor layoutUse Ctrl+6 to toggle the results panel, as documented for the current editor
Counts don't total sixWrong sample or changed recordsDownload a fresh practice file into a new local folder

Variations after the first three queries #

Show finished books

Change the filter to WHERE completed = 1. The expected titles are Field Guide to Small Gardens, Kitchen Notes and A Short History of Weather. Keep ORDER BY title if you want an easily checked order.

Count only unfinished books

Put WHERE completed = 0 before GROUP BY category. In this sample, each category should return one unfinished book. SQL clause order matters: the filter acts on rows before the groups are counted.

Analyze an exported result separately

Once you understand the query, a spreadsheet can help with charts and presentation. LibreOffice and the other free spreadsheet tools cover that separate task. Keep the SQL alongside the export so you can explain which records were included.

Completion checklist #

  • The connection points to reading-list.sqlite, not a driver library.
  • The active SQL editor uses the practice connection.
  • The first query returns six rows.
  • The unfinished filter returns three named titles.
  • The grouped query returns three categories with two books each.
  • Your saved query text contains only the intended read-only statements.

Next steps #

For another local-file interface, DB Browser for SQLite concentrates on SQLite browsing and editing. Continue with a different practice dataset before applying queries to application data. Keep your query files versioned when they become part of a repeatable project task.

Sources #

D
Donna PickardSenior Technical Writer

Donna Pickard is a Senior Technical Writer dedicated to making enterprise software and SaaS products easy to navigate. With 7+ years of experience delivering everything from deep-dive API guides to intuitive online help systems, she knows how to make technical content click. Donna currently lives…