How do I update and delete tuples in a relationship?
LEAP now allows existing tuples to be easily updated and deleted. Deleting tuples takes the form: delete (relation) (condition) This will search the relation specified for any tuples that match the specified condition. On encountering such a tuple, the tuple is marked as deleted. The condition takes the form of a condition you’d use in the select or join operator, and can refer to attributes in the relation, or to always true (or false) statements if required. To delete an ENTIRE relation use the ‘delrel’ command. Deleting all of the tuples in a relation will leave an empty relation. Updating tuples takes the form: update (relation) (condition) (update_statements) The first three components of the update command are identical to the delete operator. The last component is new – This is where the attributes to be updated are specified, along with the values to update them with, eg. update (r) (a=’4′) (a=’5′) The relation ‘r’ is updated, where attribute ‘a’ equals ‘4’, and where this cond