def get_attributes(tables):
    """ Gets the list of attributes for each table in the database.

    Args:
        tables: the name of the tables.

    Returns:
        attributes: the attributes for all the tables.
    """
    attributes = {}
    for name, file_type in tables.items():
        table = name + '.' + file_type
        with open(table) as relation:
            attributes[name] = relation.readline().strip().split(',')
    return attributes