Resolves the database location shared by the CLI and other callers.
Resolves flag, environment, and home-directory paths in descending precedence.