Added purpose of database (#11871)

This commit is contained in:
OscarHanzely 2020-01-25 13:04:29 -07:00 committed by Fabian Affolter
parent 3081aacda5
commit e20231575d

View File

@ -4,7 +4,7 @@ description: "Details about the database used by Home Assistant."
redirect_from: /details/database/
---
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](/integrations/recorder/).
Database is used in by Home Assistant as history and tracker only, to store the events and its parameters. 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](/integrations/recorder/).
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`: