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

Home -> Community -> Usenet -> c.d.o.server -> Re: Can Oracle save a tree?

Re: Can Oracle save a tree?

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Wed, 28 Apr 2004 20:51:56 +1000
Message-ID: <408f8e2a$0$25012$afc38c87@news.optusnet.com.au>


"Ramon F Herrera" <ramon_at_conexus.net> wrote in message news:c9bc36ff.0404271813.1f66aa34_at_posting.google.com...
> The company I work for makes reports for other companies, based
> on geography, states, districts, etc. and the companies can vary
> from a one location shop, to a multinational with thousands of
> branch offices.

Uh-huh...

> Needless to say, the most natural way to store this is in
> a tree data structure.

No it isn't.

> I have already done that at the Java-GUI
> front end, but I was wondering how to do it in the database.

Repeat after me 1500 times:

"I shall NEVER AGAIN write my code without knowing the data model first" "It is STUPID and I've been misled by TOTAL MORONS into believing it is the right way to design applications"

In triplicate, please.

> I realize that anything can be flattened to a relational table,
> but I understand that now Oracle has other non-traditional
> ways of storing data.

Yes, but why should that concern you? The data storage mechanism has got NOTHING to do with the logical data model and how you access the data.

> So, is it possible to save a tree in Oracle?

and the whole forest as well.

Use a self-referencing FK, if you must. But I remain unconvinced you need a tree to store that information.

-- 
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Wed Apr 28 2004 - 05:51:56 CDT

Original text of this message

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