def getRelationName(relation):
    """ If the relation has a "name" use it. otherwise create a name using
     fk_<fkcolumnname>
    """
    strConstraintName = relation.getAttribute('name')
    if len(strConstraintName) == 0:
        strConstraintName = "fk_%s" % (relation.getAttribute('column'))

    return strConstraintName