For multiple databases, you have the database.php file where you can set as many databases as you need.
If you want to "switch" a database for a specific model on the fly, use the setDataSource() method.
For example, if you have two databases, you can define them in the database.php file...