| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Nearest Common Ancestor Report (XDb1's $1000 Challenge)
On 20 May 2004 15:07:05 -0700, Neo wrote:
Hi Neo,
>> > Changing any one of them would corrupt the data.
>>
>> No. Changing any of them would result in a foreign key violation and the
>> transaction would be rolled back by SQL Server. You didn't miss the
>> "references" clauses in my DDL, did you?
>
>You are correct. I could not change the name of any thing in the first
>two columns of table hierarchies so I could not corrupt the data this
>way; however, this design prevents two things from having the same
>name, thus it is a non-generic solution.
Already addressed elsewhere.
>I did manage to corrupt the data by changing one of the duplicate
>'leader' to 'leader2' in the third column. You missed it here. In
>XDb1, the relator 'leader' is normalized.
Hold on a minute, Neo. Please check what you posted in the message that started this discussion:
"(...) and the solution must be as generic, meaning allow the user to create ANY hierarchy, (...)"
My first attempt at your challenge didn't have a table hierarchies, it had a table leadership (or something like that), with two columns leader and follower. But when I reread your psot to check if I fulfilled all requirements, I saw that you wanted a GENERIC solution, that would allow ANY hierarchy. That's why I renamed the table "hierarchies", added the hierarchy column and added a parameter to the procedure.
Now, I just tested what would happen if I tried to do the same kind of thing with the XDb1 solution. I entered "laptop1 leader2 trinity." and got the following error message: "Invalid relator."
Hmmmmm. I thought the requirement was to "allow the user to create ANY hierarchy" ????
http://dictionary.reference.com/search?q=any
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)Received on Fri May 21 2004 - 17:03:09 CDT
![]() |
![]() |