如果没有运行 DBMS,什么执行应用程序提交的 SQL 命令? [英] What executes SQL commands submitted by an application program, if no DBMS is running?

查看:42
本文介绍了如果没有运行 DBMS,什么执行应用程序提交的 SQL 命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您编写使用数据库驱动程序的程序时,来自 为什么数据库的编程接口称为驱动程序?

When you are writing a program which uses a database driver, from Why is programming interface to database called driver?

有些数据库允许您将它们嵌入到您的进程中(例如 sqlite),但是如果您正在使用具有自己的进程[es](例如 postgresql)的数据库,那么是的,它(他们)必须启动并运行才能针对该数据库工作.

There are databases that allow you to embed them within your process (like sqlite), but if you're working with a database that has its own process[es] (like postgresql), then yes, it(they) must be up and running in order to work against that database.

因此某些数据库允许您将它们嵌入到您的进程中(例如 sqlite)".如果没有 DMBS 运行,你的进程向什么提交 SQL 命令,什么解析和执行 SQL 命令?(例如,在 SQLite 情况下.)

So some databases "allow you to embed them within your process (like sqlite)". If there is no DMBS running, to what does your process submit a SQL command, and what parses and executes the SQL command? (For example, in SQLite case.)

您的应用程序在 SQLite 运行和不运行时都能正常工作吗?

Does your application work, both when SQLite is running and when not?

推荐答案

SQLite 文档说:

SQLite 是一个进程内库 […]
SQLite 是一个嵌入式 SQL 数据库引擎.与大多数其他 SQL 数据库不同,SQLite 没有单独的服务器进程.SQLite 直接读写普通磁盘文件.

SQLite is an in-process library […]
SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files.

当您调用sqlite3_exec() 之类的函数时,该函数会直接解析并执行 SQL.所有这些的代码都包含在 SQLite 库中,它通常是静态链接您的申请,即它是您申请流程的一部分.

When you call a function like sqlite3_exec(), this function directly parses and executes the SQL. The code for all this is contained in the SQLite library, which usually is statically linked into your application, i.e., it is part of your application process.

这篇关于如果没有运行 DBMS,什么执行应用程序提交的 SQL 命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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