RE: Meshing two databases
Posted in 1997
Mark and Jacob, The man did not mention the Database Version, may be it is SE. If SE is not the case he should use the sintax ( database@ifx_servername ) to specify the location of the database(s) when creating the VIEW. If SE is the case then he should do a tricky step. IF-AND-ONLY-IF your database is Standard Engine 1) Suppose you got two databases ( A and B ) 2) Create the table (say myothertable ) located in database A on database B 3) As Informix change the dirpath column from the SYSTABLES table to the path where the database A is located ( indicating the table-name ) Example: --begin sql update systables set dirpath = "/databases/a.dbs/myothertable.dat" -- try with and without the .dat, -- I dont remember it now. where tabname = "myothertable"; --end sql After this command is executed, the dirpath will indicate the location of a local table where the other database is located, thus, you can make selects,inserts or whatever on the new table, which will show the remote table contents. 4) Create the VIEW Mark mentioned before. Regards, Mario Estrada -----------Reply Separator---------- ---------- From: Mark D. Stock[SMTP:mdstock@informix.com] Sent: Saturday, July 19, 1997 5:08 PM To: informix-list@rmy.emory.edu Subject: Re: Meshing two databases Jacob Salomon wrote: > > Mark D. Stock wrote: > > > >loubier@sparky.nimh.nih.gov wrote: > >> > >>I am looking to combine to databases in some way so as to make them > >>appear as one for the sake of queries. The tables of the two > >>databases are conceptually the same with some small physical or > layout > >>differences, ie table and field names. I have looked into > Informix's > >>Metacube, but I am not certain that this allows concurrent access to > >>two different databases. If someone has a solution to this problem, > >>please let me know. > > > >A bit more info on products and versions would be useful, but have > you > >looked at synonyms? > > Mark, > > I think this man needs a view on a union more than a synonym. His > stated desire is to treat the two tables as one for the purpose of > some > queries. I don't recall the most recent comment on a view over a > union > for DSA 7.2 or Universal Server, but I think if the word would have > been > "YES" I would have remembered it. You may well be right, but the question clearly asked about databases, NOT tables: > >>I am looking to combine to databases in some way so as to make them ^^^^^^^^^ ^^^^^^^^^ > >>appear as one for the sake of queries. ^^^^^^^^^^^^^ and combining two databases to me, means making the tables from both available in one. Also, something about the subject as well. :-) But I have also heard people refer to tables as databases before. Cheers, -- Mark. +----------------------------------------------------------+-----------+ |Mark D. Stock - Informix SA http://www.informix.com |//////// /| |mailto:mdstock@informix.com FAQ http://www.iiug.org |///// / //| | +-----------------------------------+//// / ///| | Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////| | Fax: +27 11 807 2594 |If it's fast, the users keep quiet.|// / /////| |Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////| +----------------------+-----------------------------------+-----------+