update operation
the Update (or Modify) operation is used to change the values of one or more attributes in a tuple (or tuples) of some relation
. It is necessary to specify a condition on the attributes of the relation to select the tuple (or tuples) to be modified.
updating an attribute that is neither part of a primary key nor part of a foreign key usually causes no problems; the DBMS need only check to confirm that the new value is of the correct data type and domain. modifying a primary key value is similar to deleting one tuple and inserting another in its place because we use the primary key to identify tuples. if a foreign key attribute is modified, the
DBMS must make sure that the new value refers to an existing tuple in the referenced relation (or is set to NULL). similar options exist to deal with referential integrity violations caused by Update as those options discussed for the delete operation. in fact, when a referential integrity constraint is specified in the ddl, the DBMS will allow the user to choose separate options to deal with a violation caused by delete and a violation caused by Update.
[cite:@elmasri_db_2015 chapter 5.3.3 the update operation]
updating an attribute that is neither part of a primary key nor part of a foreign key usually causes no problems; the DBMS need only check to confirm that the new value is of the correct data type and domain. modifying a primary key value is similar to deleting one tuple and inserting another in its place because we use the primary key to identify tuples. if a foreign key attribute is modified, the
DBMS must make sure that the new value refers to an existing tuple in the referenced relation (or is set to NULL). similar options exist to deal with referential integrity violations caused by Update as those options discussed for the delete operation. in fact, when a referential integrity constraint is specified in the ddl, the DBMS will allow the user to choose separate options to deal with a violation caused by delete and a violation caused by Update.
[cite:@elmasri_db_2015 chapter 5.3.3 the update operation]