Re: RI / foreign key on VIEW

From: Nabil Sayegh <postgresql(at)e-trolley(dot)de>
To: idefix(at)goforit(dot)de
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: RI / foreign key on VIEW
Date: 2004-02-08 14:02:45
Message-ID: 40264185.9080504@e-trolley.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Idefix wrote:
> Well, you don't need to reference the VIEW (doesn't make sense anyway)
> but your OBJEKT table.

The idea was that
- only special objects (i.e. products) can be in the baskets
- only products that aren't yet expired can be in the baskets.

I agree, that basket should be an objekt, but due to compatibility reasons I'd
rather leave it as a special table.

> Further the Referencing should start from your OBJEKT table, so you
> could cascade through all tables without any problem.

>> --
>> -- This is the virtual product table
>> --
>> CREATE VIEW product AS SELECT * FROM objekt JOIN price USING
>> (id_objekt) LEFT OUTER JOIN expire USING (id_objekt) WHERE expire IS
>> NULL OR expire > now();

TFYH
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message kynn 2004-02-08 17:04:54 How to read data from a file?
Previous Message Nabil Sayegh 2004-02-08 01:05:13 Re: RI / foreign key on VIEW