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

发布于 2024-09-14 02:08:18 字数 91 浏览 3 评论 0原文

是否可以在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

︶ ̄淡然 2024-09-21 02:08:19

开箱即用,我不这么认为。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文