Database understanding

I am currently having problems understanding the database while setting up my HA system.

In order to be able to monitor historic data, I have set up InfluxDB as an addon, with the intention to use it for a grafana dashboard some time.
After getting reported wrong data by some sensors, I was looking into getting rid of the values. I first purged the whole entity, which lead to the data source to be long term statistics, so I simply dropped all sqlite tables.
With that, all my history data was gone, while the InfluxDB was still populated with data.

I thought, that the whole system used InfluxDB. But I assume that its actually not the case and that the SQL database is still used to hold data for the last 10 days (default) and influx data is only used for Grafana?

Yes, influxdb is an addon and usually just keeps a sample of the data long term. For the main database SQLite is used, with mariadb as an option to replace sqlite…

The are couple blogs explaining influxdb use with HA. Its worth learning about about influx and Grafana as these are reactively complicated to use compared to standard history provided by default.