Update database.markdown (#7640)

This commit is contained in:
Robin 2018-11-26 08:40:17 +00:00 committed by Fabian Affolter
parent 6ae54cbf9a
commit b5d178be48

View File

@ -10,9 +10,9 @@ footer: true
redirect_from: /details/database/
---
The default database used by Home Assistant is [SQLite](https://www.sqlite.org/) and is stored in your [configuration directory](/getting-started/configuration/) (e.g., `<path to config dir>/.homeassistant/home-assistant_v2.db`). To change the database, use the [`recorder` component](/components/recorder/).
The default database used by Home Assistant is [SQLite](https://www.sqlite.org/), and the database file is stored in your [configuration directory](/getting-started/configuration/) (e.g., `<path to config dir>/.homeassistant/home-assistant_v2.db`). If you prefer to run a database server (e.g. PostgreSQL), use the [`recorder` component](/components/recorder/).
To work with the SQLite database manually, you will need an installation of `sqlite3`, the command-line for SQLite database, or [DB Browser for SQLite](http://sqlitebrowser.org/), which provides an editor for executing SQL commands.
To work with the SQLite database manually from the command-line, you will need an [installation](http://www.sqlitetutorial.net/download-install-sqlite/) of `sqlite3`. Alternatively [DB Browser for SQLite](http://sqlitebrowser.org/) provides a viewer for exploring the database data and an editor for executing SQL commands.
First load your database with `sqlite3`:
```bash
@ -124,4 +124,4 @@ The `VACUUM` command cleans your database.
sqlite> VACUUM;
```
For a more interactive way to work with the database or the create statistics, checkout our [Jupyter notebooks](http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/tree/master/).
For a more interactive way of working with the database, checkout our [Jupyter notebooks](http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/tree/master/).