niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » PostgreSQL
Linking Tables from 2 databases
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
Pratik Shukla
*nix forums beginner


Joined: 19 Jul 2006
Posts: 1

PostPosted: Wed Jul 19, 2006 5:54 pm    Post subject: Linking Tables from 2 databases Reply with quote

<html><div style='background-color:'><DIV class=RTE>Hello,</DIV>
<DIV class=RTE>&nbsp;</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>&nbsp;</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>&nbsp;</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

PostPosted: Wed Jul 19, 2006 7:10 pm    Post subject: Re: Linking Tables from 2 databases Reply with 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?

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

PostPosted: Thu Jul 20, 2006 2:34 am    Post subject: Re: Linking Tables from 2 databases Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Thu Nov 20, 2008 11:22 pm | All times are GMT
navigation Forum index » Databases » PostgreSQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts database Share Memory Limit (2 GB ) in a Instance is tota... sadanjan@gmail.com IBM DB2 0 Fri Jul 21, 2006 12:57 pm
No new posts Creating a relationship between 2 tables Andyza Oracle 2 Thu Jul 20, 2006 1:11 pm
No new posts Basic IP Tables issue spec networking 3 Wed Jul 19, 2006 3:57 pm
No new posts deleting tables using script manish shell 3 Wed Jul 19, 2006 5:47 am
No new posts Procedure Dependencies and Temporary Tables phil@querytool.com IBM DB2 1 Tue Jul 18, 2006 10:53 pm

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
[ Time: 0.2163s ][ Queries: 16 (0.1106s) ][ GZIP on - Debug on ]