Thread: How to implement a "subordinate database"?
I keep bumping against this situation: I have a main database A, and I want to implement a database B, that is distinct from A, but subordinate to it, meaning that it refers to data in A, but not vice versa.
I don't simply want to add new tables to A to implement B, because this unnecessarily clutters A's schema with tables that entirely extraneous to it.
Is there some other way?
Thanks!
kj
On 4/19/06, Kynn Jones <kynnjo@gmail.com> wrote: > > I keep bumping against this situation: I have a main database A, and I want > to implement a database B, that is distinct from A, but subordinate to it, > meaning that it refers to data in A, but not vice versa. > > I don't simply want to add new tables to A to implement B, because this > unnecessarily clutters A's schema with tables that entirely extraneous to > it. Hmm. Postgres supports table inheritance, but I don't think it supports schema or database inheritance in the way you want it to. http://www.postgresql.org/docs/8.1/interactive/tutorial-inheritance.html http://www.postgresql.org/docs/8.1/interactive/ddl-inherit.html -- Postgresql & php tutorials http://www.designmagick.com/
On Wed, Apr 19, 2006 at 06:19:50 -0400, Kynn Jones <kynnjo@gmail.com> wrote: > I keep bumping against this situation: I have a main database A, and I want > to implement a database B, that is distinct from A, but subordinate to it, > meaning that it refers to data in A, but not vice versa. > > I don't simply want to add new tables to A to implement B, because this > unnecessarily clutters A's schema with tables that entirely extraneous to > it. > > Is there some other way? Have you looked at schemas?
On Apr 19, 2006, at 20:31 , chris smith wrote: > On 4/19/06, Kynn Jones <kynnjo@gmail.com> wrote: >> >> I keep bumping against this situation: I have a main database A, >> and I want >> to implement a database B, that is distinct from A, but >> subordinate to it, >> meaning that it refers to data in A, but not vice versa. >> >> I don't simply want to add new tables to A to implement B, because >> this >> unnecessarily clutters A's schema with tables that entirely >> extraneous to >> it. How about putting B's tables in a separate schema in the same database as A? Michael Glaesemann grzm myrealbox com