SQL spojovani tabulek ???

Karel Zak zakkr na zf.jcu.cz
Pondělí Květen 13 10:59:29 CEST 2002


On Mon, May 13, 2002 at 08:19:44AM +0200, "Z?ka Ale?, Ing." wrote:
> > 
> >  A nebo pouzit PostgreSQL a dedicnost tabulek kdy nad celou hierarchii
> >  takto vytvorenych tabulek jde pracovat jako s jednou tabulkou :-)
> >  (pochopitelne to asi v SQL standardu nenajdete:-).
> > 
> 
> 	Kdyz uz se o tom mluvi, jde v tomto pripade nejak udelat primary key
> nebo aspon unique index pres celou hierarchii?
> 	Proste mam tabulku A a v ni nejaky atribut ID jako primary key, z ni
> zdedim tabulku B. A chci zajistit, aby se v B nemohl objevit zaznam se
> stejnym ID, ktery uz existuje v A a naopak. Jde to nějak udelat?

 Docs:

  A limitation of the inheritance feature is that indexes (including
  unique constraints) and foreign key constraints only apply to single
  tables, not to their inheritance children. Thus, in the above
  example, specifying that another table's column REFERENCES
  cities(name)  would allow the other table to contain city names but
  not capital names. This deficiency will probably be fixed in some
  future release. 

 :-((
            Karel

-- 
 Karel Zak  <zakkr na zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/
 
 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz


Další informace o konferenci Test