The idea of a "wiki ID" for (at least) sites in the local cluster is used in MediaWiki in several places, such as
LoadBalancer::getConnection used to have a $wiki parameter, which has recently be renamed to $domain. This parameter assumes that the ID provided encodes a database name (and possibly a schema name and a suffix). However, the relationship between the symbolic name used by SiteConfiguration and friends and the database name is not specified anywhere, and the two do not quite work the same in some edge cases (such as the database name containing a dash).
In order to allow application logic to reliable connect to the database of another wiki in the local cluster, there needs to be a way to obtain a database connection given a logical wiki ID. This is currently only possible if that symbolic name is the same as the database name, and does not contain any special characters. This relationship should at least be documented, but ideally, a proper mapping should be provided.