public function getDatabase($connectionName = 'default')
    {
        if ($this->databases->containsKey($connectionName)) {
            return $this->databases->get($connectionName);
        }

        $configuration = $this->getConfiguration($connectionName);
        $database = $this->getConnection($connectionName);

        $database->DBOpen(
            $configuration->getDatabase(),
            $configuration->getUser(),
            $configuration->getPassword()
        );

        $this->databases->set($connectionName, $database);

        return $this->databases->get($connectionName);
    }