Re: One Ring to Bind Them
Date: Sat, 10 Jul 2004 00:20:46 +0100
Message-ID: <S3QqgiMOhy7AFwjl_at_thewolery.demon.co.uk>
In message <8DIGc.34276$MB3.17948_at_attbi_s04>, Marshall Spight
<mspight_at_dnai.com> writes
>"Anthony W. Youngman" <wol_at_thewolery.demon.co.uk> wrote in message
>news:voJV3cOtzd6AFwdQ_at_thewolery.demon.co.uk...
>> In message <nnIDc.125667$Sw.113988_at_attbi_s51>, Marshall Spight
>> <mspight_at_dnai.com> writes
>> >For example, in another thread someone said (over and over
>> >if I remember correctly :-) that if you delete an invoice, all
>> >the line items go with it, automatically. Okay, this is the same
>> >thing as ON DELETE CASCADE. But sometimes you want
>> >ON DELETE RESTRICT. (In other words, if you want to
>> >delete a container but it is still containing something, you
>> >have to dispose of the contained things first; you can't just
>> >throw them away.) Can you do this declaratively in MV? How
>> >is it done?
>>
>> You mean a bit like you can't delete a company if there are any
>> outstanding invoices? No that can't (or rather, shouldn't) be done
>> natively and declaratively in MV. But I wouldn't call that a "container
>> and contents".
>
>Why do you say "shouldn't?" It seems pretty clear to me that a
>declarative approach is always better than a procedural one. (Dawn?
>Care to rebut?)
What seems clear to me is not clear to you, and vice versa. Read Dick
Feynmann. Different brains are wired differently, and see the world
differently. Just because it SEEMS to you that declarative is better
than procedural it does not mean that that is the case.
A company does NOT contain its invoices - a company can go bust but the
invoices are still outstanding ... okay - we now get into all sorts of
>
>If not container/contents, what terminology would you use?
>
To me, an invoice is a container, and line items are contents thereof.
You can't have the latter without the former.
But I view those two relationships as being fundamentally different, and
they are modelled completely differently in MV. I don't think relational
can see any difference between them.
MV just seems to *fit* the real world rather better :-)
>
>> Let's give an example - an owner can have multiple cars, and a car can
>> have multiple owners.
>>
>> What I'd do is have an OWNERS field in the CARS file, and declare it as
>> an index. So if I want to know who owns a car, I just list the car and
>> pull the owners into the listing. If I want to know what cars someone
>> owns, I list all cars owned by that person.
>
>What does "declare it an index" mean? Is it like a pointer or foreign key?
>
Surely you declare indices in relational dbs? Same thing here. So's I
can say "SELECT CARS WITH OWNER EQ 'X'", and it doesn't need to search
the entire CARS file, but just goes to the index and grabs a list of
primary keys into the CARS file from the index.
>
>> >> But [MV] provides an interesting confluence of
>> >> tools and capabilities that render the model very useful in
>> >>solving business
>> >> problems for many people and businesses.
>> >
>> >This is not so much what is under discussion in this newsgroup.
>> >I will readily acknowledge that many people use MV to do useful
>> >work, and that they solve business problems, and that they
>> >enjoy themselves doing so. They on-topic question is the theoretical
>> >basis for the tools. Are they complete? Are they correct? Are they
>> >self-consistent?
>>
>> Are they even *RELEVANT*? Take any theory in PURE mathematics. It's
>> complete, it's correct, it's self-consistent. And if it assumes that
>> parallel lines in three dimensions can meet, it doesn't break. It just
>> models a completely different world to the one we actually live in ...
>
>I'm sorry, you say this why? Because you have traced some lines
>from one end of the universe to other and checked that they don't
>meet? Actually, even the very idea of the "world we live in" having
>lines in it doesn't work for me. Walking around my house, I never
>saw an infinite sequence of colinear points.
>
I'm just saying that being complete, correct and self-consistent isn't
enough. All that proves is that it works as pure maths. But if it
doesn't work as *applied* maths, then it's the wrong theory for the
problem at hand.
>
>> Relational fits theory fine. MV fits the real world fine.
>
>That statement just seems totally bogus to me. Does subtraction
>fit the real world? What happens when I subtract 5 lemons
>from 3 lemons? Do I get -2 lemons? Can you send me a picture
>of -2 lemons via email; I want to see what they look like.
>
Relational is complete, correct, and self-consistent. It's fine as a
pure-maths theory.
Cheers,
Wol
-- Anthony W. Youngman - wol at thewolery dot demon dot co dot uk HEX wondered how much he should tell the Wizards. He felt it would not be a good idea to burden them with too much input. Hex always thought of his reports as Lies-to-People. The Science of Discworld : (c) Terry Pratchett 1999Received on Sat Jul 10 2004 - 01:20:46 CEST