在 MySQL 中链接其他数据库的表
是否可以在 Debian 服务器上的 MySQL 数据库内链接其他数据库(MS SQL、Sybase 等)的表?
我认为使用 ODBC 可以实现这一点。
Is it possible to link tables from other databases (MS SQL, Sybase, etc.) inside a MySQL database, on a Debian server?
I am thinking this could be possible using ODBC.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
开箱即用,我不这么认为。
AFAIK,虽然可以在 MySQL 中实现您自己的函数,但它们只能返回单个值 - 而不是数据表。
使用自定义存储引擎插件应该是可能的。我相信有一个是为 DB2 编写的,但是快速谷歌一下,却没有发现任何关于 ODBC 的信息。这将是一件有用的事情 - 所以你可以写一个。 唯一需要注意的是,
本地 MySQL 和远程 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.
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. 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.