Re: How to treat several identical database as one.
Posted in 1996
An alternative is to locate one copy of the job table on one of the servers, and to have the other two databases contain a synonym which points to the remote table. The advantage of this is that it works; the disadvantage is that it relies on the central machine being up. If that is not OK, then replication is probably the answer. I think the performance of a stored procedure implementing the view is very unlikely to be good enough, not least because SPs do not support dynamic SQL so there is no way of restricting the set of rows returned by the view -- the SP would always end up returning all the rows in all three tables. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: "Chao Y. Din" <cdin@csc.com> }Date: Mon, 02 Sep 1996 09:29:14 -0400 }X-Informix-List-Id: <news.27678> } }David Williams wrote: }> Our Informix-4GL based system will soon be used at several sites in }> the same organisation i.e. several machines each with a copy of the }> application and a database. We want to run a PC-based reporting tool }> that can report across all the databases. }> }> Our first idea was to create a new database with views of the form }> }> create view job as }> }> select * from server1@machine1:job }> union }> select * from server2@machine2:job }> union }> select * from server3@machine3:job }> }> i.e. create a 'pseudo-table' which appears as all the data from all }> the job tables on the three servers. }> }> Unfortunately views do not support unions. Any ideas???? }> }> We don't want to replicate the data just make all the similar tables }> appear as one table so the PC-base reporting tool (GQL) can be used }> by 'normal' users? i.e. non-techines. } }We are not using Informix-4GL. I can't really help. But, our }workaround for view not supporting unions is to write a stored procedure }which union all similar tables, and then execute the stored procedure }from the client workstaion. Will it work? } }Chao