If the databases are on the same server, you can create views (and 3 part naming) so that all the tables are queryable from one database.
If the databases are on different servers, you can use linked servers and views (and 4 part naming) so that all the tables are queryable from one database.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…