Re: Love or hate, or? domains with cardinality two
Date: Wed, 18 Nov 2015 10:09:59 +0100
Message-ID: <n2hf97$30qd$1_at_adenine.netfront.net>
On 2015-11-17 22:56:59 +0000, Erwin said:
> Op dinsdag 17 november 2015 21:36:54 UTC+1 schreef Nicola:
>> On 2015-11-17 19:45:57 +0000, Erwin said: >> >>> Op maandag 16 november 2015 22:09:14 UTC+1 schreef Nicola: >>>> ... >>>>> ??? >>>>> >>>>> >>>>> >>>>> (DEPARTMENT NOTMATCHING EMPLOYEE) SUBSET-OF FI >>>>> >>>>> plus a key declaration {dept} on the view EMPLOYEE WHERE mgr >>>> >>>> Somehow I expected that :) What is FI? >>>> >>>> Nicola >>> >>> What I actually should have replied : >>> >>> Well to me it's clearly not "not straightforward" and if you expected >>> it, why claim it is [not straightforward] ? >> >> If I interpret correctly your constraints, you've got them wrong, because >> they allow a department without a manager. >> >> Nicola
>
> Okay so that was too hasty of me.
>
> (DEPARTMENT NOTMATCHING (EMPLOYEE WHERE mgr)) SUBSET-OF FI
>
> addresses it, methinks. Still nowhere near "not straightforward" in my
> book ...
Point taken.
This highlights the importance of the succintness of the language, not only the
expressiveness. Constraints expressed algebraically are in many cases
more succint
than their counterpart in first-order logic (think of division).
SQL is nowhere near that, and when I think of something not being
straightforward,
my opinion is biased by the thought that it needs to be eventually
implemented in
SQL.
That said, my argument is still valid: using a different schema design
would allow
you to simplify the above constraint even further, so it is correct
that the above
is not the *most* straightforward constraint ;)
Nicola
- news://freenews.netfront.net/ - complaints: news_at_netfront.net ---