Re: Nearest Common Ancestor Report (XDb1's $1000 Challenge)

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Fri, 21 May 2004 00:51:50 +0200
Message-ID: <picqa01mpenqaq3ftiqif7nhiclvpohjm8_at_4ax.com>


On 20 May 2004 11:25:21 -0700, Neo wrote:

>> > Among other things, the difference in normalization between the
>> > implementations (still looking it over) is quite different.
>>
>> I don't demand that XDb1 should use a relational structure,
>> you should not demand that a RM solution uses XDb1's structure.
>
>And I don't demand that a RM solution use XDb1's structure, only that
>it provide a solution that normalizes the data to a similar extent.

Already adressed in another message.

Really, neo, is it really necessary to repeat the same argument over and over again? And is it really necessary to use three seperate message to respond to one message of mine? It's getting quite hard to keep track of everything in here if you keep splitting the thread like this.

>For example, if the user names the first person 'john' and the dog
>also 'john', your current solution won't work.

Indeed, it won't. And neither will XDb1.

>In XDb1, the solution will still continue to work,

Should? Maybe, I don't know - I didn't design the thing. But it DOESN'T continue to work, and that's the only thing that counts at the end of the day.

> although it should
>also print each thing's class (ie "person/john" and "dog/john") so
>that user can distinguish them on the report.

You obviously did not test this before you wrote this. Or you are a flat out liar (but for now, I'll give you the benefit of the doubt - by the way, did you already instruct your bank to transfer the $1000 you owe me?)

I downloaded XDb1, created a new database and fed the data from Ex076 to XDb1, changing only 'fido' to 'john' but nothing else (by the way, is there no way to execute an entire script at once in XDb1? I ended up copying and pasting the script line by line, but there's got to be a more efficient way, right?) Here's what happened:

Up until "dog isa thing" all went fine (of course - I had not executed one if the changed lines yet). XDb1 accepted "john isa dog" just fine (unlike what my SQL Server implementation would have done), but in spite of what you say that "should" happen, XDb1 did not recognise john from john. There still was only one john, classified as both a person and a dog and aged 35. The next lines went fine, until I came to "fido leader john", which I of course changed to "john leader john". This resulted in an error message: "Circular relation not allow." I skipped this one, continued to enter the rest of the expression, than generated the nearest common ancestor report. This was the output:

Common Ancestor Report for 'god'

ThingX	ThingY	CmnAnc	Dist
army	john	army	1
army	laptop1	army	2
army	mary	army	1
army	trinity	god	2
army	luke	god	3
john	laptop1	john	1
john	mary	mary	1
john	trinity	trinity	2
john	luke	luke	1
laptop1	mary	mary	1
laptop1	trinity	trinity	2
laptop1	luke	luke	2
mary	trinity	trinity	1
mary	luke	trinity	2
trinity	luke	trinity	1

If "continue to work" means that you still get *some* output, yes, then XDb1 still continues to work. But it's not even close to the output of the original input (when the dog was called 'fido'). And the report certainly doesn't print "person/john" or "dog/john".

> In XDb1, if the user
>names the first person 'john', the second person 'mary' and the dog
>'mary john', there would still be only one occurance of the word
>'john' and one of the word 'mary' in the db ('mary john' would be
>composed from references to 'mary' and 'john').

As I pointed out before - how the data is stored internally is completely irrelevant. The relational model is not about how data is represented inside a computer, it is about how relations between things are modelled. You set a challenge to generate a report in the relational model, so let's stick to that model and not discuss XDb1's internals anymore.

Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Fri May 21 2004 - 00:51:50 CEST

Original text of this message