Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group