|
|
|
|
|
|
| Author |
Message |
Pratik Shukla *nix forums beginner
Joined: 19 Jul 2006
Posts: 1
|
Posted: Wed Jul 19, 2006 5:54 pm Post subject:
Linking Tables from 2 databases
|
|
|
<html><div style='background-color:'><DIV class=RTE>Hello,</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>I have created a DB1 with several tables. Now i need to create another DB2 with a linked table from DB1. So if there is a table_X in DB1, is there a way to import that table_X into DB2 so that any changes made to table_X in DB1 will also apply to DB2?</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>table_X has references to other tables in DB1 as well...will these references be maintained if table_X is imported to DB2?</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Any help is appreciated.</DIV></div></html> |
|
| Back to top |
|
 |
Richard Broersma Jr *nix forums beginner
Joined: 13 Mar 2006
Posts: 44
|
Posted: Wed Jul 19, 2006 7:10 pm Post subject:
Re: Linking Tables from 2 databases
|
|
|
I have created a DB1 with several tables. Now i need to create another DB2 with a linked table
from DB1. So if there is a table_X in DB1, is there a way to import that table_X into DB2 so that
any changes made to table_X in DB1 will also apply to DB2?
table_X has references to other tables in DB1 as well...will these references be maintained if
table_X is imported to DB2?
Any help is appreciated.
maybe dblink will do what you want:
http://pgfoundry.org/projects/snapshot/
Regards,
Richard Broersma Jr.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend |
|
| Back to top |
|
 |
Merlin Moncure *nix forums addict
Joined: 19 Oct 2005
Posts: 87
|
Posted: Thu Jul 20, 2006 2:34 am Post subject:
Re: Linking Tables from 2 databases
|
|
|
On 7/19/06, Pratik Shukla <pratikshukla@hotmail.com> wrote:
| Quote: | I have created a DB1 with several tables. Now i need to create another DB2
with a linked table from DB1. So if there is a table_X in DB1, is there a
way to import that table_X into DB2 so that any changes made to table_X in
DB1 will also apply to DB2?
|
that sounds a lot like replication. check out slony. for a slightly
slimper alternative you may consider not using two databases, make two
schemas inside your database. now you can link your tables via simple
trigger. open up the documentation and read up on schemas and make
sure this is not the right solution for you.
| Quote: | table_X has references to other tables in DB1 as well...will these
references be maintained if table_X is imported to DB2?
|
it's not quite clear what your are asking...I don't understand what
your concept of a reference is. if you are replicating, generally you
always make changes to one table and the other is a slave.
merlin
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Nov 20, 2008 11:22 pm | All times are GMT
|
|
Advertising | Mortgages | Cingular Ringtones | Debt Consolidation | Internet Advertising
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|