For CakePHP, database configurations are saved in the
app/config/database.phpfile. But notice each config is given a variable name. Any number of configs can be added in this file so that when you're working on a controller you can set the
$useDbConfigvariable equal to a string of the same name as your config array. Simple.
here's more info