Database Confusion

Recently I had a problem where Home Assistant had a bunch of notification messages about items not working like recorder, etc. These appeared to all be linked to database issues. The Raspberry PI had no SQLITE install and the install failed. I was not able to resolve the dependency problems and eventually started over with a clean SD card and a fresh install of everything.

Home Assistant is back and running now. There are no dire warnings or messages in Notifications. However, I never installed a database program on the PI. There is a db file in
/home/homeassistant/.homeassistant/
I copied that file to my Windows computer and opened it with an SQLiteDatabase browser. I am too stupid to really understand the contents, but the file seems real and intact.
So my questions are:

Do I need a database program installed on the PI for normal operation?

What does a normal user ever do with the database contents?

Can I just open it with a browser tool on another machine when needed?

I seem to recall grumbling that a constantly growing database file was trashing the SD Card on the PI.
Is there documentation to limit what is stored in log files and the database? Or, can I put a small USB drive into the PI and redirect the logs to that device to stop wearing out the SD Card?

Thanks.

The database stores state and state attribute changes for entities over time. You can limit what’s stored to only what you want to see history for by setting values for include: and exclude: under recorder: in your configuration.yaml. See here for more info.

When you click on History in the sidebar, you’re seeing what’s recorded in the database in a visual format. You can also change what’s displayed there by doing the same thing above, but with the history integration. Note that removing items from History does not prevent them from being recorded to the database like removing them from Recorder does.

Home Assistant manages the default database, so you don’t need to worry about installing anything else.

I never installed a database program on the PI.

If you have this in your configuration.yaml file, you did install a database:

recorder: