# Connect to SQLite

> Visualize a SQLite database with Schemity. Point it at a local .sqlite or .db file and reverse-engineer it into an ERD - a fully offline, file-based connection.

Source: https://schemity.com/doc/connect-sqlite/

SQLite is a file, not a server, so connecting is the simplest of all: you point Schemity at the database file. This makes it a natural fit for **database design software** - both the database and the diagram are files on your disk.

## How do I connect to a SQLite file?

Click **+** above the diagram list, set **DB type** to **SQLite**, click **Connect to a database**, and leave **Connect via** on **Direct connection**. (SQLite has no network host, so SSH Tunnel is not offered.)

## What do I need to configure for SQLite?

- **Database file** - click **Click to select .sqlite file** and browse to your `.sqlite`, `.db`, or `.sqlite3` file.

That is the only field. SQLite has no host, port, username, password, schema, or encryption.

## What does Schemity import from SQLite?

Schemity reads every table in the file: tables and columns with their SQLite types, primary keys and nullability, foreign keys (where defined) drawn as crow's foot relationships, and unique indexes.

## How do I open a SQLite database read-only?

To inspect a SQLite file without any chance of writing to it, right-click the saved connection and choose **Open read-only**. Schemity opens the file in read-only mode.

## How does Schemity handle SQLite column types?

SQLite uses flexible type affinity rather than strict column types. Schemity maps each declared type to one of SQLite's storage classes (INTEGER, TEXT, REAL, BLOB, NUMERIC) so the diagram stays consistent.

## Next

Clean up the layout on [The ERD Canvas](https://schemity.com/doc/erd-canvas/), or commit the diagram with [Version Control in Git](https://schemity.com/doc/version-control-git/).
