def is_sf_database(db, model=None):
    """The alias is a Salesforce database."""
    from django.db import connections
    if db is None:
        return hasattr(model, '_salesforce_object')
    engine = connections[db].settings_dict['ENGINE']
    return engine == 'salesforce.backend' or connections[db
        ].vendor == 'salesforce'
