为什么将与数据库的编程接口称为驱动程序? [英] Why is programming interface to database called driver?

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

问题描述

在编写更新或查询数据库的应用程序时,我们使用一种称为数据库驱动程序(例如JDBC驱动程序)的软件.我想知道为什么它被称为驱动程序而不是库?

When writing an application which updates or queries a database, we use something called a database driver (e.g. a JDBC driver). I wonder why it is called a driver instead of a library?

libpq 也是驱动程序吗?

推荐答案

引用您链接到的Wikipedia文章:

To quote the Wikipedia article you linked to:

在计算中,设备驱动程序是一种计算机程序,用于操作或控制连接到计算机的特定类型的设备.

In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer.

这里的类比是,数据库是客户端计算机通过连接到数据库并针对该数据库发出SQL语句来控制"的外部设备.

The analogy here is that a database is an external device that the client computer "controls", by connecting to it and issuing SQL statements against it.

要继续引用Wikipedia:

To continue quoting Wikipedia:

在计算机科学中,图书馆是计算机程序经常用于软件开发的非易失性资源的集合.

In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development.

JDBC驱动程序确实是库.我们主要根据习惯和惯例将它们称为驱动程序,但是将它们称为库也绝对没有错.

JDBC drivers are indeed libraries. We refer to them as drivers mostly by force of habit and convention, but it definitely isn't wrong to refer to them as libraries too.

Libpq确实也是驱动程序.

Libpq is indeed a driver too.

这篇关于为什么将与数据库的编程接口称为驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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