I think the advantage of the sqlite database is that you retain more context for any given command (e.g. what the current working directory was, ...) in a structured way (it is a database after all).
That stored context can then be used to query the database (e.g. filter the history to only show commands that were executed in the cwd).
These queries are the point of using sqlite, not anything security as far as I can tell.
That stored context can then be used to query the database (e.g. filter the history to only show commands that were executed in the cwd).
These queries are the point of using sqlite, not anything security as far as I can tell.