What is connected to is a database, and what a database holds is one or more data containers. That distinction is the whole of the configuration: a data container is one platform reached through one driver - an Exact Online division set, a Microsoft SQL Server, a folder of files, the [[Invantive Query Tool/Sample Database|sample database]] - and a database is the set of them which a statement may name in one go. ## Why Several in One A database holding two containers lets one statement read from both: ```sql select * from Projects@dummy pjt join MyTable@sqlserver tbl on tbl.code = pjt.pjt_code ``` The engine reads each side from its own platform and joins them itself. That is what makes an exchange between two platforms a statement rather than a program, and it is why the containers are grouped rather than connected to one at a time. ## Where They Are Defined Both are defined in the [[Settings]] file, which is shared with the other Invantive products on the device: what is defined for Invantive Query Tool is there for [[Invantive Data Hub/Invantive Data Hub|Invantive Data Hub]] and for [[Invantive Control for Excel/Invantive Control for Excel|Invantive Control for Excel]] as well. The databases are grouped, and the group and the name together are what the connection button in the ribbon shows as `<group>\<database>`. Credentials do not sit in that file. They are held in the [[Invantive Keychain]], per data container, so a settings file can be copied or shared without carrying a password with it. ## Naming One in a Statement A statement names a container with `@` after the table: `Projects@dummy`. A container which is the default of the database can be left out. Which containers a connection has is visible in [[Invantive Query Tool/Available Objects|Available Objects]], which shows them as the top level of its tree. The alias is the name of the container in the settings file, not the name of the driver. Two containers of the same driver - two divisions of the same platform, an acceptance environment beside a production environment - therefore differ in the statement by their alias, and that is the safest way to keep them apart. ## Discovery Automatic discovery adds the databases a workstation can reach without them being written out by hand. It writes a settings file of its own, which is kept apart from the one maintained by hand so that a discovery never overwrites what somebody wrote. A workstation which should not discover anything is given an empty, read-only discovery file, or the discovery is switched off.