private function getDatabase($name)
    {
        foreach ($this->getDataModels() as $dm) {
            foreach ($dm->getDatabases() as $db) {
                if ($db->getName() == $name) {
                    return $db;
                }
            }
        }
    }