Attributes in relation after cross product
To express that relation in algebraic notation you actually need to alias the attribute.

The Cartesian product, by design, does not recognize common attribute names, so much like a single operation doesn't work in a self relation scenario, it's necessary to perform a rename within the notation.

The self join example:


  R( a, b, c );
  
  ≠ R ⋈ R ( a, b, c );


Using rename:


  R( a, b, c );
  
  S = ρa/b, b/b2, c/c2 R;
  
  ∴ R ⋈ S ( a, b, c, b2, c2 );


For instance:


  E( EmpID, ManagerID, EmpName );
  
  M = ρEmpID/ManagerID, ManagerID/ManagerEmpID, EmpName/ManagerName
  E;
  
  ∴ E ⋈ M ( EmpID, ManagerID, EmpName, ManagerEmpID, ManagerName );


The Cartesian product can be expressed using relational algebra in the same way:


  R1( a, b, c );
  
  R2( a, e, f );
  
  ≠ R1 × R2 ( a, b, c, e, f );


So then with rename:


  R1( a, b, c );
  
  R2( a, e, f );
  
  R3 = ρa/a2R2;
  
  ∴ R1 × R3 ( a, b, c, a2, e, f );