Android SQLite 和 SQL 有什么区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12666822/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 11:23:07  来源:igfitidea点击:

What is difference between SQLite and SQL

androidsqldatabasesqlite

提问by Deep Verma

I know SQLite Data Base is used in mobile devices (Android, iPhone) and it is light, takes only Kb space. Is there any limitation in SQLite? I want to know how they are different.

我知道 SQLite 数据库用于移动设备(Android、iPhone)并且它很轻,只占用 Kb 空间。SQLite 有什么限制吗?我想知道它们有什么不同。

回答by Jeff Ferland

Every SQL database uses its own implementation of the language that varies slightly. While basic queries are almost universal, there are notable nuances between MySQL, PostgreSQL, Microsoft SQL Server, Oracle Database, etc.

每个 SQL 数据库都使用自己的语言实现,略有不同。虽然基本查询几乎是通用的,但 MySQL、PostgreSQL、Microsoft SQL Server、Oracle 数据库等之间存在显着的细微差别。

What's particularly notable about SQLite is that unlike all the others mentioned above, this database software doesn't come with a daemon that queries are passed through. This means that if multiple processes are using the database at once, they will be directly altering the data through the SQLite library and making the read / write data calls to the OS themselves. It also means that the locking mechanisms don't deal with contention very well.

SQLite 特别值得注意的是,与上面提到的所有其他软件不同,这个数据库软件没有提供查询传递的守护进程。这意味着如果多个进程同时使用数据库,它们将直接通过 SQLite 库更改数据,并对操作系统本身进行读/写数据调用。这也意味着锁定机制不能很好地处理争用。

This isn't a problem for most applications that where one would think of using SQLite -- the small overhead benefits and easy data retrieval are worth it. However, if you'll be accessing your database with more than one process or don't consider mapping all your requests through one thread, it could be slightly troublesome.

对于大多数考虑使用 SQLite 的应用程序来说,这不是问题——小的开销优势和简单的数据检索是值得的。但是,如果您将使用多个进程访问数据库,或者不考虑通过一个线程映射所有请求,则可能会有点麻烦。

回答by Lucifer

Sqlite is very light version of SQL supporting many features of SQL. Basically is been developed for small devices like mobile phones, tablets etc.

Sqlite 是非常轻量级的 SQL 版本,支持 SQL 的许多功能。基本上是为手机、平板电脑等小型设备开发的。

SQLite is a third party ,open-sourced and in-process database engine. SQL Server Compact is from Microsoft, and is a stripped-down version of SQL Server.They are two competing database engines.

SQLite 是第三方、开源和进程内数据库引擎。SQL Server Compact 来自 Microsoft,是 SQL Server 的精简版。它们是两个相互竞争的数据库引擎。

SQL is query language. Sqlite is embeddable relational database management system.

SQL 是查询语言。Sqlite 是嵌入式关系数据库管理系统。

Edit : ( Source from following comment on my answer )

编辑:(来自以下对我的回答的评论)

Sqlite also doesn't require a special database server or anything. It's just a direct filesystem engine that uses SQL syntax. ( By : Adam Plocher )

Sqlite 也不需要特殊的数据库服务器或任何东西。它只是一个使用 SQL 语法的直接文件系统引擎。(作者:亚当·普洛彻)

Techinically, SQLite is not open-source software but rather public domain. There is no license. ( By : Larry Lustig )

从技术上讲,SQLite 不是开源软件,而是公共领域。没有许可证。(作者:拉里·拉斯提格)

回答by Jainendra

SQL is query language. Sqlite is embeddable relational database management system.

SQL 是查询语言。Sqlite 是嵌入式关系数据库管理系统。

Unlike other databases (like SQL Server and MySQL) SQLite does not support stored procedures.

与其他数据库(如 SQL Server 和 MySQL)不同,SQLite 不支持存储过程。

SQLite is file-based, unlike other databases, like SQL Server and MySQL which are server-based.

SQLite 是基于文件的,不像其他数据库,如基于服务器的 SQL Server 和 MySQL。

回答by Naveen

SQL is a database querying language and SQLite is a database (RDBMS) which uses SQL specifications. SQLite can be said as competitor to Microsoft's SQL Server.

SQL 是一种数据库查询语言,而 SQLite 是一种使用 SQL 规范的数据库 (RDBMS)。SQLite 可以说是微软 SQL Server 的竞争对手。

The name itself suggests that it is the light version of SQL RDBMS. It is used in most of the small and portable devices like Android and iOS devices.

该名称本身表明它是 SQL RDBMS 的轻型版本。它用于大多数小型便携设备,如 Android 和 iOS 设备。

回答by O Th?nh Ldt

SQLite: Database Management System (DBMS).
SQL: Structured Query Language is a computer language, used to Create, edit and get data from DBMS via queries.

SQLite:数据库管理系统(DBMS)。
SQL:结构化查询语言是一种计算机语言,用于通过查询从 DBMS 创建、编辑和获取数据。