Rename
From Wikipedia, the free encyclopedia
- For information about renaming articles on Wikipedia, see Help:Moving a page.
Rename (re- + name) is a word meaning change the name of something. Different areas, such as linguistics, relational algebra, and computer science incur renaming actions with different detailed activity, however the principles behind are all the same — change the name of something.
[edit] Computer science
In normal usage of computers, rename refers to the altering of a name of a file. This can be done manually, or by using batch renaming software that can automate the renaming process.
rename is also the name of the function performing the same action in C programming language: see rename (C).
In SQL, renames are performed by using the CHANGE
specification in ALTER TABLE
statements.
[edit] Relational algebra
In relational algebra, a rename is a unary operation written as ρa / b(R) where:
The result is identical to R except that the b field in all tuples is renamed to an a field. For an example, consider the following Employee relation and its renamed version:
Employee | ρEmployeeName / Name(Employee) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Formally the semantics of the rename operator is defined as follows:
where t[a / b] is defined as the tuple t with the b attribute renamed to a so that:
The result of the rename is only defined when the attribute a did not appear already in the header of the operand.