简体   繁体   English

从MySQL中的其他数据库链接表

[英]Linking tables from other database in MySQL

Is it possible to link tables from other databases (MS SQL, Sybase, etc.) inside a MySQL database, on a Debian server? 是否可以从Debian服务器上的MySQL数据库中的其他数据库(MS SQL,Sybase等)链接表?

I am thinking this could be possible using ODBC. 我认为使用ODBC可以做到这一点。

Out of the box, I don't think so. 开箱即用,我不这么认为。

AFAIK, while its possible to implement your own functions in MySQL, these can only return single values - not tables of data. AFAIK虽然可以在MySQL中实现您自己的功能,但它们只能返回单个值-不能返回数据表。

It should be possible using a custom storage engine plugin. 应该可以使用自定义存储引擎插件。 I believe there's one written for DB2 but a quick google turned up nothing for ODBC. 我相信有一个为DB2编写的文档,但是一个快速的Google却没有为ODBC编写任何文档。 It'd be a useful thing to have - so you could write one. 拥有这将是一件有用的事情-因此您可以编写一个。

The only caveat is that neither the local MySQL nor the remote ODBC connected database would be able to optimise queries spanning engines properly - so it might be more efficient to handle the two systems in a progrmanning language which supports both. 唯一需要注意的是,本地MySQL和远程ODBC连接的数据库都无法正确优化跨引擎的查询-因此,以支持两者的编程语言处理这两个系统可能会更有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM