Subject: Data Structure

From: [email-masked]
Date: Tue, 6 Jul 93 18:15:29 -0700

Hello,

Thanks to everyone for the replies about passing files using /i.

With regards to datastructures in Postgres, if I have an

     Invoice - Invoice_line - Products

relationship (i.e. 1-Many, Many-1).  What is the best way to implement
this in Postgres.

I currently have the above implemented as

    Invoice (with inv_num as the key)
    Products (with prod_no as the key)
    Invoice_line (with prod_no and inv_num as the concatenated key)

Would it be better to have

    Invoice_line (quantity .... )
      inherits (Invoice, Products)

or am I thinking of this in the wrong way?

Also, when this has been implemented, which way offers the best retrieval
methods?

If anyone out there can help me this would be greatly appreciated.

Thankyou,

Alistair Ashcroft,
---------------------------------------------------------------
E-Mail:  [email-masked]              Phone: + 64-3-479 8317
Information Science Department
University Of Otago
Dunedin
New Zealand.