def _get_resource_name(resource):
    """Return the name identifier of the `resource` as stored in the db"""
    return (getattr(resource, 'name', '') or
            getattr(resource, 'title', '') or
            getattr(resource, 'domain', '') or '')