Resolve the database name