A user typically works with a handful of the databases defined in [[Settings]], while the log on screen shows all of them in name order. From release 27.0 onwards the databases used most are placed in front, in two groups:
- **Favorites**: the databases pinned by the user, plus the databases proposed by whoever maintains the settings file.
- **Recently used**: the databases connected to before and not pinned, most recent first.
Both groups are a shortcut. Every database also keeps its own entry in its database group.
## Pinning and Unpinning
- In the log on screen of [[Invantive Studio]], [[Invantive Query Tool]] and the other products with a window, a star in front of a database pins it and unpins it.
- In text mode, `F` lists the favourites and the recently used databases with the number by which a database is chosen. `+` followed by that number pins a database, `-` followed by that number unpins it.
Unpinning also applies to a database which the settings file proposes: the answer of the user prevails over the proposal.
## Proposing a Favourite
A database definition in `settings*.json` can carry `"starred": true`. Such a database is offered as favourite to every user reading that settings file, until that user unpins it. That makes it possible to put the databases which matter in front for a group of users, without prescribing anything.
## Where They Are Held
The favourites and the recently used databases are held per user in `user.settings`, see [[User Settings]]. They therefore apply to every Invantive product of that user on that workstation: a database pinned in Invantive Studio is also in front in Invantive Query Tool and in [[Invantive Data Hub]]. At most 25 favourites and 10 recently used databases are kept.
Since these settings belong to the user profile, a service account has its own set. See [[Folders]] for placing the user profile elsewhere.
## Unattended Use
[[Invantive Data Hub]] and other unattended use keep requiring an explicit database with `-d`/`--database`. A scheduled job which silently switches database because someone changed their favourites is an incident which is hard to trace, so the favourites are not used there.
With a window, a database is chosen as before: the requested database, otherwise the database last connected to, and otherwise the only favourite when the user has exactly one.