如何解释ODBC为什么需要数据库驱动程序 [英] How to explain why ODBC requires a database driver

查看:150
本文介绍了如何解释ODBC为什么需要数据库驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个月前,我向一个伙伴展示了如何使用.NET查询MySQL.它工作得很好,但是他不明白为什么我们需要MySQL与ODBC结合使用的驱动程序".他虽然ODBC就足够了.

A month ago, I was showing a buddy how use .NET to query MySQL. It worked just fine, but he didn't understand why we needed a "driver" for MySQL in conjunction with ODBC. He though ODBC would be enough.

当他问我为什么时,我尽了最大努力,但我的回答却很短.

When he asked me why, I did my best, but my answer came up short.

此问题的正确解释是什么?

What is the correct explanation for this question?

推荐答案

需要驱动程序的原因是ODBC本身并不是与数据库对话的驱动程序:它是一种抽象和API.

The reason you need a driver is that ODBC is not in itself a driver for talking to databases: it's an abstraction and an API.

从本质上讲,这是一个适配器层,旨在使所有数据库在客户端应用程序中看起来都相同:您与ODBC库进行通信,并且它要求驱动程序管理器使用正确的数据库(基于您的连接字符串)来满足您的请求.

Essentially it is an adaptor layer designed to make all databases appear the same to the client application: you talk to the ODBC library, and it asks the driver manager to fulfill your request using the correct database (based on your connection string).

为了使您的数据库品牌与ODBC兼容,它必须提供一个实现所需API的驱动程序,以便它可以使用ODBC函数为来自客户端的请求提供服务.

In order for your database brand to be compatible with ODBC therefore it must provide a driver which implements the required API in order that it can service requests from clients using the ODBC functions.

这篇关于如何解释ODBC为什么需要数据库驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆