# Relational division

I try to understand how the relational division can be expressed by primitive operations of the relational algebra. So, I found this formula (I writed it such as I found it in the same format):
$A \DIVIDEBY B = A[X] \MINUS ((A[X] \TIMES B) \MINUS A)[X]$
But I can't get this. If we use $\TIMES$ (the Cartesian product) then A and B relations can't have same attributes, so we need to rename these attributes, i.e.:
If we have $A \{A_1, A_2, A_3\};B \{A_1, A_2, A_4\}$
then the header of the result relation will be
$\{A_{11},A_{21},A_3,A_{12},A_{22},A_4\}$,
it's okay... But next I need to apply $\MINUS$ but I can't make it because my relation header diffs from $A$.
It means that it requires yet operations (i.e. $\PROJECT$ and $\RENAME$), it isn't? Can anyone explain me more details by this expression?

• Your pseudo-LaTeX doesn't work. Please fix. What I can read looks wrong. The LHS has no $X$ whereas it is a free variable of the RHS. Finally, it might help if you named the source of the formula that you find confusing. – Kai Feb 13 '17 at 10:50
• @Kai, it's from the book: C.J. Date - An Introduction to Database Systems (8th Edition). – Шах May 8 '17 at 0:07