def _resolve_collections(collections):
    """
    Split a list of raw collections into a list of database/collection tuples

    :param list[str] collections:
    :rtype: list[(str, str|None)]
    """
    ret = []
    for raw_collection in collections:
        attr_chain = raw_collection.split('.', 1)
        database = attr_chain[0]
        if len(attr_chain) == 2:
            ret.append((database, attr_chain[1]))
        else:
            ret.append((database, None))
    return ret