Solved

Database Link In MySQL

Posted on 2003-10-27
5
441 Views
Last Modified: 2012-06-27
Hi people,

Something that I need to find out about the MySQL database ability.
I'm just wondering whether the MySQL database have any functionality similar to the "database link" in oracle?

Actually I have 2 database here. Let's give it a name of  "A" database and "B" database.......
Inside the "A" database there is an employee table.

The program that I am writing now is actually using the "B" database but I need to cross reference to the employee table
in "A" database to get some information.

In order not to use 2 simultaneous DB connection in my program, I am just wondering is there any capability that MySQL
had that can clone out a table in "B" database but that table is actually referring to the employee table in "A" database.

I'm just wondering whether is there any ways of doing this in MySQL ? Thanks in advance for any help that I could get here.
:D

Cheers,
Simon.
0
Comment
Question by:gilabean
  • 3
5 Comments
 
LVL 17

Expert Comment

by:Squeebee
ID: 9631381
There is no such capability in MySQL currently. You can use two connections in an outside language, or copy a snapshot of the table in question over to server A from server B and then run the query.
0
 
LVL 2

Expert Comment

by:RichardAllsebrook
ID: 9632554
Or...

Link both of the tables into access and use ODBC to access them.

Or...

Use the Easysoft SQL Join Engine (quite expensive though) to hetrogeniosuly join the two tables in a virtual database. The tables can be from entirely different sources too (say mysql and sqlserver)

http://www.easysoft.com/solutions/0001/main.phtml

I am an ex-employee of Easysoft but dont let that put you off - its an excellent product.
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9633619
Hmm, the join engive is a neat looking idea.
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 200 total points
ID: 9646074
you can use the 4 part naming convention in mysql so there's no reason why
 you can process both tables throught the one connection...
whiich version are you using..
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9646204
Hmm, seems the rest of us made an assumption that the databases would be on seperate server machines.

Gilabean: Lowfatspread is right. As long as both databases are on the same physical server, use the mydatabase.mytable.mycolumn syntax.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Creating and Managing Databases with phpMyAdmin in cPanel.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question