SQLite
来源:互联网 发布:c 串口接收数据 编辑:程序博客网 时间:2024/06/01 10:35
When I first see the sqlite, I feel it's good . So I record something about it.
self-contained:
1.sqlite is largely self-contained.It requires very minimal support from external libraries or from operating system.This makes if well suit for use in embedded devices that lack the support infrastructure(基础设施) of a desktop computer.This also makes sqlite appropriate for use within applications that need to run without modification on a wide variety of computers of varying configurations.
2.sqllite is written in ANSI-C and should be easily complied by any standard C compiler.It makes mininal use of the standard C library.The only required c library functions called are:
.memset()
.memcpy()
.memcmp()
.strcmp()
.malloc(),free(),and realloc()
3.Communications between sqlite and the OS and disk are mediated through an interchangeable VFS layer.VFS modules for unix and windows are provide in the source tree.It's a simple matter to devise an alternative VFS for embedded devices.
4.The sqlite source code is available as an "amalgamation"(http://www.sqlite.org/amalgamation.html)- a single large c source code file.Projects that wanna include sqlite can do so simply by dropping this one source file(named "sqlit3.c") and its corresponding header("sqlite3.h")into their source tree and compiling it together with the rest of the code.Sqlite doesn't link against any external libraries(other than the C library,as described above) and does not require any special build support.
serveless:
1. Most sql database engines are implemented as a separate server process. Programs that want to access the database communicate with the servere using some kind of interprocess communication(tipicallly TCP/IP)to send requests to the server and to receive back the results.Sqlite does not work this way.With sqlite,the process that wants to access the database reads and writes directly from the database files on disk.There is no intermediary server process.
2.There are advantages and disadvantages to being serverless.The main advantage is that there is no separate server process to install,setup,configue,initialize,manage,and troubleshoot.This is one reason why sqlite is a "zero-configuration" database engine.Programs that use sqlite require no administratie support for setting up the database engine before they are run.Any program that is able to access the disk is able to use an sqlite database.On the other hand, a database engine that uses a server can provide better protection from bugs in the client application-stray pointers(流浪指针) in a client cannot corrupt memory on the server.And because a server is single persistent concurrency.
3.Most sql database engines are client/server based.of those that are serverless,sqlite is the only one known to this author that allows multiple applications to access the same database at the same time.
Sqlite is a compact library.With all features enabled ,the library size can be less than 350KB,depending on the target platform and compiler optimization settings.If optional features are omitted, the size fo the Sqlite library can be reduced below 300KB,SQlite can also be made to run in mininal stack space(4KB)and very little heap(100KB),making sqlite a popular database engine choice on memory constrained gadgets such as cellphones,PDAs,and MP3 players.There is a tradeoff between memory usage and speed. sqlite generally run faster the more memory you give it.Nevertheless, performance is usually quite good even in low-memory environment.
- SQLite
- SQLite
- SQLite
- SQLite
- SQLite
- sqlite
- sqlite
- SQLite
- SQLite
- sqlite
- SQLite
- SQLite
- SQLite
- SQLite
- SQLite
- sqlite
- sqlite
- sqlite
- 摘自PHP手册[7] – Variable变量函数
- JAVA--第十二周任务之1.编写一个应用程序,要求编写一个Panel的子类MyPanel,MyPanel中有一个文本框和一个按钮,要求MyPanel的实例作为其按钮的ActionEvent事件的监视
- 摘自PHP手册[8] – String字符串处理函数
- 摘自PHP手册[9] – Array数组函数
- 如何删除非当前用户下的JOB
- SQLite
- LeetCode Construct Binary Tree from Inorder and Postorder Traversal
- 从P1到P7——我在淘宝这7年
- 淘宝技术发展(引言)
- PHP编程中的经验分享
- 对listview中的item中的控件进行监听
- 词典的加密
- 基于linux构建无人值守系统(看门狗)
- 禁止Apache显示目录索引的常见方法