X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 272C1D1B54C for ; Thu, 11 Sep 2003 21:12:08 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 11700-09 for ; Thu, 11 Sep 2003 18:11:39 -0300 (ADT) Received: from proteus.affordablehost.com (unknown [216.46.203.177]) by svr1.postgresql.org (Postfix) with ESMTP id 13DF1D1B550 for ; Thu, 11 Sep 2003 18:11:36 -0300 (ADT) Received: from [66.31.57.228] (helo=Laptop) by proteus.affordablehost.com with smtp (Exim 4.20) id 19xYiw-00064s-LW for pgsql-admin@postgresql.org; Thu, 11 Sep 2003 17:11:30 -0400 From: Andrew Biagioni To: pgsql-admin@postgresql.org Date: Thu, 11 Sep 2003 17:11:21 -0400 X-Priority: 3 (Normal) Organization: E-Greek, llc In-Reply-To: <3F5DFCA5.000006.00924@guaj215desa> Message-Id: Subject: Cross-DB linking? MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" X-Mailer: Opera 6.05 build 1140 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/194 X-Sequence-Number: 10282 I am thinking of separating my data into various DBs (maybe on the same server, probably not) -- mostly for performance/stability/backup reasons -- but I have a considerable amount of foreign keys, views, and queries that would need to work across DBs if I were to split things the way I want to. Is it possible to have foreign keys / views / queries work across database boundaries? On the same server / on separate servers? If so, how? For example, I have: - a table, A, with > 200 K rows which never changes; - another table, B with < 10 K rows which changes frequently; - and a third table, C, which joins A and B, i.e. has foreign keys into A and B, and changes rarely I would like to have A in one DB, dbA (possibly its own server); B in another DB, dbB (possibly its own server); and C either with A or with B (this one is not an issue per se). What I'm looking to gain is: - dbA would be backed up/replicated religiously, and possibly on a server optimized for frequent writes - dbB would NEVER be backed up, possibly on a server optimized for cacheing - each database's schema would be simpler and easier to manage - as the number of records and users grow, be able to distribute the computing/storage/memory load among various machines rather than have to upgrade the hardware Thanks in advance! Andrew