changes names. It does not change tuples.
text
ρ teacher (instructor) the relation is now called teacher
ρ staff(staff_id, staff_name, dept, pay) (instructor) also renames the 4 attributes, in orderρrenamestaffnew relation name(staff_id, staff_name, dept, pay)new attribute names(instructor)the input expression
In SQL, both are AS:
sql
SELECT id AS staff_id, name AS staff_name, dept_name AS dept, salary AS pay
FROM instructor AS staff;Why rename
- The result of an expression has no name. ρ gives it one, so a later operator can refer to its attributes as
staff.pay. - An expression that uses the same relation twice needs two different names for it, such as
ρ a (department)andρ b (department). The next lesson uses this.