Best solution I've been able to come up with is this, which
does N selects where N is the path length from the start
to the furthest leaf. Can anyone suggest anything better?
/**
* Process all descendants of a specified row in a table
* with a recursive key relationship. A method
]
Gesendet: Montag, 15. Oktober 2012 12:02
An: derby-user@db.apache.org
Betreff: Re: Getting transitive closure?
Best solution I've been able to come up with is this, which does N selects
where N is the path length from the start to the furthest leaf. Can anyone
suggest anything better
If I have a table defined like so:
create table COMPONENTS (
ID integer generated always as identity,
COMPONENT varchar(255) not null,
PARENT integer,
constraint COMPONENTS_PK primary key (ID),
constraint COMPONENTS_1 foreign key (PARENT)
...@softmoore.com
web:www.softmoore.com
cell: 843-906-7887
-Original Message-
From: John English [mailto:john.fore...@gmail.com]
Sent: Sunday, October 14, 2012 7:53 AM
To: Derby Discussion
Subject: Getting transitive closure?
If I have a table defined like so:
create table
I might be mistaken, but I think Derby does not support this
out-of-the-box. There are, however, a few interesting solutions suggested
in this (2009) thread:
http://old.nabble.com/Recursive-query-on-common-table-td25819772.html
On Sun, Oct 14, 2012 at 8:52 AM, John English
On 14/10/2012 14:37, John I. Moore, Jr. wrote:
John,
I suggest that you take a look at Warshall's Algorithm.
Thanks, I'm familiar with Warshall's algorithm. What I'm trying to avoid
is issuing gazillions of selects; I thought there might be a clever
tricky SQL way of doing this that I
On 14/10/2012 14:45, José Ventura wrote:
I might be mistaken, but I think Derby does not support this
out-of-the-box. There are, however, a few interesting solutions
suggested in this (2009) thread:
http://old.nabble.com/Recursive-query-on-common-table-td25819772.html
Thanks! I'm now in the
Hi all,
I learnt something today. COOL.
So I had a quick look to understand what a weighted graph was see:
http://www.informatics.susx.ac.uk/courses/dats/notes/html/node130.html
Then I had a look at the
http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm link
provided by John
On 10/14/2012 6:34 AM, John English wrote:
On 14/10/2012 14:45, José Ventura wrote:
I might be mistaken, but I think Derby does not support this
out-of-the-box. There are, however, a few interesting solutions
suggested in this (2009) thread: