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 -> Table design question.

Table design question.

From: Jackie <jackie_ol_at_hotmail.com>
Date: 29 Jan 2003 06:48:56 -0800
Message-ID: <2c196db8.0301290648.bc84af2@posting.google.com>


Hi all!
I have a question about designing database tables. Suppose I have a table that I hold information regarding my corporate customers. Some corporate customers are also customers of other customers in the table. I need to save this hierarchy in my database. I thought of designing an additional table that holds hierarchical information about companies.

Suppose that my customer table is designed like this:

CustID Company Name Phone Address
------------ ------------------- ------------ ------------------

100200          Company A             545 5543      Fict. Street.
102011          Company B             11111111      

Company B is also a customer of Company A. So the hierarchy table will be like this:

Comp1ID Comp2ID
------------ --------------

100200 102011

Comp1ID field means the company with ID 100200 is the parent and company with the ID 102011 is the child (or customer of Company A).

I can add as many as hierarchical info like this. Is this approach correct? Is there any other way to achieve this?

Thanks in advance. Received on Wed Jan 29 2003 - 08:48:56 CST

Original text of this message

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