hierarchy table design question

From: <dtong123_at_my-deja.com>
Date: 2000/05/05
Message-ID: <8ev17v$bp0$1_at_nnrp1.deja.com>#1/1


Hello,

I have the following table schema:

Table A has 1-M relationship with Table B. Table B has 1-M relationship with Table C.

I want to get all rows from C by given the primary key of A. The following is pesudo code from application layer.

  1. gets all rows of B by providing primary key of A.
  2. for each row of B, gets all rows from C.

U see if I will have 1..n number of rows from B, and I have to loop through each in order to get rows of C. It is really expensive way for doing it.

Should I denormalized these tables? .... Any suggestion? Thanks,
D. T.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri May 05 2000 - 00:00:00 CEST

Original text of this message