Re: Why relational division is so uncommon?

From: V.J. Kumar <vjkmail_at_gmail.com>
Date: 27 Apr 2007 02:19:16 +0200
Message-ID: <Xns991ECEB8EE638vdghher_at_217.22.228.20>


paul c <toledobythesea_at_oohay.ac> wrote in news:zpaYh.131992$6m4.9100_at_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 Received on Fri Apr 27 2007 - 02:19:16 CEST

Original text of this message