Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Tree structure

Re: Tree structure

From: Parker Shannon <parkershannon_at_email.msn.com>
Date: 1998/03/04
Message-ID: <e2pwqr6R9GA.288@upnetnews02.moswest.msn.net>#1/1

The solution requires two tables, a parent table and child table. Let's say I want to see the bill of materials structure for an auto.

ITEM Table
ID Name

01 Auto
02 Engine
03 Axle
04 Tires
05 Piston
06 Valve

ITEM STRUCTURE Table
ID ID Relationship Quantity

01  02   Component     1
01  03   Component     1
01  04   Part                  4
02  05   Part                  8
02  06   Part                32


Dominic Yip wrote in message <34F65AA9.1C1A_at_netvigator.com>...
>Is it an extended SQL or you have to do it thru store proc or some
>kind of languages.
>
>Thanks
>
>Gary England wrote:
>>
>> Oracle has a ... CONNECT BY PREVIOUS ... START WITH ... clause that
>> defines the parent/child relationships of columns with a single table.
>> It must be a single table select... no joins or views.
>>
>> ªü¼Ö¥K wrote:
>> >
>> > Hi,
>> > Does anyone know how to implement a tree data structure into RDBMS ?
>> > and provide a grouping
>> > query for any note within the tree.
>> > e.g.
>> > a
>> > / \
>> > b c
>> > / \ / \
>> > e f g h
>> > ... ... ... ...
>> > query for group b will included e, f ... etc.
>> > thanks in advice.
>> >
>> > arnox,
>> > 8-)
Received on Wed Mar 04 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US