# DBeaver UI

## Create a New SQLite Connection

1. Click the **"New Database Connection"** button (plug icon) in the toolbar or `Ctrl+Shift+N` ![Create new connection](/files/uqzahHEN8bmZVtajScGw)
2. Select **SQLite** from the list of databases ![Choose sqlite](/files/PpXTQT8YklQaWYVssRr4)
3. Click **Next**
4. In the **Path** field, click **Browse** and choose where to save your database file ![Create save path](/files/kVXk54a3G7YEKrobEWUP)
5. Name your database file: `tasks.sqlite3` **EXTENTION IS IMPORTANT**
6. Click **Test Connection** to verify everything works
7. Click **Finish**

## Browse through database

![View your database](/files/SEVgjioEiwi6d29P30vU)

## Create and run queries

Open a new SQL script to write your queries in. ![Open new script](/files/Gga7XCnQOCfDZ1CRueAH)

When running queries it is important to remember few things: ![Run your queries](/files/vbKsxX8f85uwnCItd9F5)

1. Orange triangle will only **run the selected query**.
2. Little document with triangle will **run the entire script file**.
3. **Query is selected** when it is **manually selected** or **the cursor is standing on the query**.
4. **Always remember to end queries with semi-colon**: `;`! Otherwise the edit does not know when query ends!

## Errors will be marked

In case of errors, DBMS will mark them red. If you hover on the error, **DBMS will tell you the exact issue with your query**! ![Errors](/files/1MAhJUGRlAteO0wn1zun)

## Saving queries for homework

When done with queries, save them to your homework repo using this "Save As" like from any other software. Remember the `.sql` extention! ![Save as for homework](/files/425EgttptSo6nkWFwmtF)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://program.hackyourfuture.dk/course-content/foundation/databases/week1/session-materials/dbeaver-ui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
