nl: get the value under the 'database' key of the options dictionary, use it as the key to get the value from the connections dictionary, substitute the result for connection.
code: connection = connections [ options [ 'database' ] ]