Added support for connecting multiple databases

Please tell me if that's the right approach and what's still missing (except documentation).