Solved

Database Link In MySQL

Posted on 2003-10-27
5
438 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

831 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