This module uses the target databases to set a number of 'extra' databases in which the users can connect at login. The optional connection to an extra database is stored in the user data array so if you want to retrieve data from the extra database you connected at login you can use:
db_query($query, $args, array('target' => $user->data['actualdb']));
This may be useful when you have multiple databases with the same structure and you want to extract info from each depending on the user selection. So you can have for example branch databases and some users can access to one or many of they.