SQL spojovani tabulek ???

"Zíka Aleš, Ing." Ales.Zika na pel.br.ds.mfcr.cz
Pondělí Květen 13 11:11:52 CEST 2002


> > 
> > >  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. 
> 

	Diky.	

	Takze si to osetrit nejakym vlastnim zbesilym triggerem.
	Nebo je jestě nejaka jina cesta?


			Ales Zika
			Pelhrimov

			e-mail: Ales.Zika na pel.br.ds.mfcr.cz
				  Ales.Zika na seznam.cz
			SMS:    Ales.Zika na sms.underground.cz

 


Další informace o konferenci Databases