Re: Why relational division is so uncommon?



paul c <toledobythesea@xxxxxxxx> wrote in
0nbYh.133230$aG1.39278@pd7urf3no:">news:0nbYh.133230$aG1.39278@pd7urf3no:

V.J. Kumar wrote:
paul c <toledobythesea@xxxxxxxx> wrote in
zpaYh.131992$6m4.9100@pd7urf1no:">news:zpaYh.131992$6m4.9100@pd7urf1no:


Vadim Tropashko wrote:
...

I notice also that the example doesn't suggest a lot of activity,
other than bureaucratic activity, this company might go out of
business soon if there is no "sales" or "orders" or "inventory"
relations. Lots of other useful queries would then arise, "who has
paid all their invoices on time?", "which students have passed all
course exams?".


Quite an interesting perspective. Although, the query "who has paid
all their invoices
on time?" doesn't seem to be a relational division (what relation
are you dividing into?)
...

Customers?

p



It's not a situation where division could/should be used. There are
many ways to answer the question. One might be just to subtract
those who did not pay from all the customers:

Invoice: <invoice_id, customer_id, paid>

Project(Invoice, customer_id) MINUS
Project_customer_id(Select(Invoice, paid = false, customer_id))

vj


What if Invoice had no "paid" attribute?

Then there is no way to determine whether or not it was paid and your
question cannot be answered in principle ! Of course, you can use some
other attribute name to reflect the invoice status, like 'status' for
example.

vj


p


.



Relevant Pages

  • Re: Why relational division is so uncommon?
    ... Lots of other useful queries would then arise, ... paid all their invoices on time?", ... the query "who has paid ... doesn't seem to be a relational division (what relation are ...
    (comp.databases.theory)
  • Re: and / or function
    ... If a and b are logical expressions then the following two are ... invoices are re-accrued in the current period. ... and the paid date is less than F1 OR if its A:A value is less ... sheet 2 but that function is not in this formula. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Why relational division is so uncommon?
    ... other useful queries would then arise, "who has paid all their invoices ... the query "who has paid ... doesn't seem to be a relational division (what relation are ...
    (comp.databases.theory)
  • Re: and / or function
    ... all current period accruals + old unpaid accruals. ... invoices are re-accrued in the current period. ... and the paid date is less than F1 OR if its A:A value is less ...
    (microsoft.public.excel.worksheet.functions)
  • Re: and / or function
    ... invoices are re-accrued in the current period. ... and the paid date is less than F1 OR if its A:A value is less ... be able to list them on monthly sheets in the same workbook to track unpaid ... sheet 2 but that function is not in this formula. ...
    (microsoft.public.excel.worksheet.functions)