dbTalk Databases Forums  

Single query to find multi-level relationships?

comp.databases comp.databases


Discuss Single query to find multi-level relationships? in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
John Gordon
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:50 AM






In <047430b4-5b7a-4c85-a795-b5382c8079d7 (AT) j22g2000hsf (DOT) googlegroups.com> Ed Prochak <edprochak (AT) gmail (DOT) com> writes:

Quote:
Is there a way to do this in standard SQL?

What DBMS??
Oracle. I was pleasantly surprised to find the CONNECT BY PRIOR mechanism
in PL/SQL which appears to do exactly what I want, although I am a little
concerned about using vendor-specific SQL extensions.

--
John Gordon A is for Amy, who fell down the stairs
gordon (AT) panix (DOT) com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"



Reply With Quote
  #22  
Old   
John Gordon
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:50 AM






In <047430b4-5b7a-4c85-a795-b5382c8079d7 (AT) j22g2000hsf (DOT) googlegroups.com> Ed Prochak <edprochak (AT) gmail (DOT) com> writes:

Quote:
Is there a way to do this in standard SQL?

What DBMS??
Oracle. I was pleasantly surprised to find the CONNECT BY PRIOR mechanism
in PL/SQL which appears to do exactly what I want, although I am a little
concerned about using vendor-specific SQL extensions.

--
John Gordon A is for Amy, who fell down the stairs
gordon (AT) panix (DOT) com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"



Reply With Quote
  #23  
Old   
John Gordon
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:51 AM



In <1c5882fb-dbb5-44e6-804e-313f7cd9bc26 (AT) d1g2000hsg (DOT) googlegroups.com> Lennart <Erik.Lennart.Jonsson (AT) gmail (DOT) com> writes:

Quote:
Troels Arwen has a number of links to articles dealing with
hierarchical data. See "Hierarchical data in RDBMSs" at
http://troels.arvin.dk/db/rdbms/links/
I'll have a look. Thanks Erik!

--
John Gordon A is for Amy, who fell down the stairs
gordon (AT) panix (DOT) com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"



Reply With Quote
  #24  
Old   
John Gordon
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:51 AM



In <1c5882fb-dbb5-44e6-804e-313f7cd9bc26 (AT) d1g2000hsg (DOT) googlegroups.com> Lennart <Erik.Lennart.Jonsson (AT) gmail (DOT) com> writes:

Quote:
Troels Arwen has a number of links to articles dealing with
hierarchical data. See "Hierarchical data in RDBMSs" at
http://troels.arvin.dk/db/rdbms/links/
I'll have a look. Thanks Erik!

--
John Gordon A is for Amy, who fell down the stairs
gordon (AT) panix (DOT) com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"



Reply With Quote
  #25  
Old   
John Gordon
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:51 AM



In <1c5882fb-dbb5-44e6-804e-313f7cd9bc26 (AT) d1g2000hsg (DOT) googlegroups.com> Lennart <Erik.Lennart.Jonsson (AT) gmail (DOT) com> writes:

Quote:
Troels Arwen has a number of links to articles dealing with
hierarchical data. See "Hierarchical data in RDBMSs" at
http://troels.arvin.dk/db/rdbms/links/
I'll have a look. Thanks Erik!

--
John Gordon A is for Amy, who fell down the stairs
gordon (AT) panix (DOT) com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"



Reply With Quote
  #26  
Old   
--CELKO--
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:57 AM



Quote:
Oracle. I was pleasantly surprised to find the CONNECT BY PRIOR mechanism in PL/SQL which appears to do exactly what I want, although I am a little concerned about using vendor-specific SQL extensions.
It is actually a cursor in disguise. You can also try a recursive CTE,
but the performance will be pretty bad; it is procedural code in
disguise in the current implementations.


Reply With Quote
  #27  
Old   
--CELKO--
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:57 AM



Quote:
Oracle. I was pleasantly surprised to find the CONNECT BY PRIOR mechanism in PL/SQL which appears to do exactly what I want, although I am a little concerned about using vendor-specific SQL extensions.
It is actually a cursor in disguise. You can also try a recursive CTE,
but the performance will be pretty bad; it is procedural code in
disguise in the current implementations.


Reply With Quote
  #28  
Old   
--CELKO--
 
Posts: n/a

Default Re: Single query to find multi-level relationships? - 06-03-2008 , 09:57 AM



Quote:
Oracle. I was pleasantly surprised to find the CONNECT BY PRIOR mechanism in PL/SQL which appears to do exactly what I want, although I am a little concerned about using vendor-specific SQL extensions.
It is actually a cursor in disguise. You can also try a recursive CTE,
but the performance will be pretty bad; it is procedural code in
disguise in the current implementations.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.