views:

345

answers:

4

I'm trying to study and I can't find a good explanation of this. And my professor's example is really bad.

thank you!

+1  A: 

Hi

Please take a look at this presentation which explains relational algebraic division http://www.cs.arizona.edu/~mccann/research/divpresentation.pdf

cheers

Andriyev
A: 

Have you seen the one on Wikipedia?

Relational division is not used that much in my experience.

This one by Burleson is pretty good.

The whole planes and pilots thing is just not the kind of question I find myself trying to answer.

Cade Roux
I have looked on wikipedia, but I was looking for something more complex. regarding the use of division, I agree with you about that but pretty sure it will be some question on my exam about that! thank you
Gabriel Sosa
A: 

There's an excellent lecture in this pdf which includes useful examples as well as a simple explanation.

Alex Martelli
A: 

It seems to me that all these references are still making the same fundamental mistake from the early days.

To pursue on the Wikipedia example : There the question that is solved by the relational-division query seems to be "Give me all the students that have completed all possible tasks.".

But now imagine that both 'Completed' and 'DBProject' are empty tables (no student has completed any task and there are no tasks). If you know how Universal quantification is supposed to work over empty sets, then you understand why the answer to the question should be, in that case, "all students".

This flaw has been identified years ago already, and is handled by adding a THIRD argument to the relational division operator, naming the table from which to draw "all students", in the case when that should be the answer (loosely speaking).

See the most recent edition of "Introduction to Database Systems" for a bit more thorough explanation.

This is also the reason why it has actually become incorrect to state that "relational division is the relational inverse of cartesian product as real-number division is the inverse of real-number multiplication. (How could it be : it now has three arguments instead of two.)

I'm surprised that this particular aspect of relational division is entirely overlooked, even by the organization that has .cs.edu in its website name.