Solved

Database Link In MySQL

Posted on 2003-10-27
5
435 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
Comment Utility
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
Comment Utility
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
Comment Utility
Hmm, the join engive is a neat looking idea.
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 200 total points
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MySQL tables for vtiger CRM 4 38
SQL Update Query 23 78
Filter by data and current_date 4 29
MySQL ERROR 1045 (28000) 2 36
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
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 gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now