Java 开发人员学习企业c++。相当于 JDBC 抽象?

发布于 2024-09-12 07:18:36 字数 1455 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

转身泪倾城 2024-09-19 07:18:36

跨平台数据库连接的标准是 ODBC。然而,这是一个非常大的 C API,可能需要一些时间来适应(但一旦习惯了它就可以很好地工作)。有很多 C++ 包装器库,但我不能推荐其中任何一个,因为我一直使用自己的包装器。使用 https://stackoverflow.com/search 上的 SO google 搜索搜索“c++ 数据库库”,可以看到很多关于这个话题。

The standard for cross platform database connectivity is ODBC. However, this is a very large C API which can take some getting used to (but works well once you are used to it). There are a lot of C++ wrapper libraries for it, but I can't recommend any of them as I've always used my own wrapper. Do a search for "c++ database library" using the SO google search at https://stackoverflow.com/search to see lots of questions on this topic.

不羁少年 2024-09-19 07:18:36

ODBC 是问题 1 的答案。(JDBC API 是根据 ODBC 建模的。)

ODBC it the answer for question 1. (The JDBC API was modeled after ODBC.)

塔塔猫 2024-09-19 07:18:36

C++ 中没有等效的东西。 ODBC 是最接近的东西。

然而,ODBC 不仅仅是一个数据库接口(调用级接口),它还定义了一个底层连接协议,因此您需要数据库服务器端的中间件或驱动程序才能使用 ODBC。

另一方面,JDBC 只是一个标准编程接口,它可以使用本机协议与数据库进行通信,无需任何驱动程序。一些 JDBC 实现通过 ODBC(所谓的 JDBC-ODBC 桥驱动程序)与数据库通信。

There is no equivalent in C++. ODBC is the closest thing.

However, ODBC is more than a database interface (Call Level Interface), it also defines an underlying connection protocol so you will need a middle-ware or driver on the database server-side to use ODBC.

On the other hand, JDBC is simply a standard programming interface and it can communicate to database using native protocols without any drivers. Some JDBC implementations talks to database through ODBC (so called JDBC-ODBC bridge driver).

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