关于AIR 和SQLite On AIR and SQLite

其实早在Apollo beta的时候就内置了对SQLite的支持了,不过我一直没有动手编写过AIR应用,这次做毕业设计打算用AIR编写一个小东西,涉及到了本地数据库的问题,所以就研究了一下SQLite。 In fact, as early as the Apollo beta when the built-in SQLite support, but I have no hands to prepare the AIR application, the design intends to do graduate with a little preparation AIR, a local database related to the problem, the study Of the SQLite. 我以前从来没有接触过SQLite,今天用了一下发现还不错,麻雀虽小,五脏俱全啊。 I have never before contacted SQLite, today has also found some good, the sparrow is small, Wuzangjuquan ah.

摘录一个关于SQLite的介绍: SQLite an excerpt on the description:

SQLite是一个软件库,用于实现自包含非服务式零配置事务化的SQL数据库引擎。 SQLite is a software library, to achieve self-contained, non-service, zero configuration, the Panel of the SQL database engine.
SQLite 是一个嵌入式SQL数据库引擎,与其它大多数SQL数据库不同的是,SQLite没有独立的服务进程。 SQLite is an embedded SQL database engine, and most other SQL database is different, SQLite no independent service process. SQLite直接读写原始的磁盘文件,一个拥有多个表、索引、触发器和视图的完整SQL数据库就包含在一个独立的磁盘文件中。 SQLite direct disk read-write the original document, with a number of tables, indexes, triggers and views on the integrity of SQL database included in a separate disk file. 数据库文件的格式是跨平台的,你可以在32位和64位系统之间、甚至在Big-EndianLittle-Endian (译者注:这是两种不同的字节排序方式,Big-Endian是指一个word中的高位Byte是放在内存word区域的低地址处,而Little-Endian则与之相反)两种不同的架构间自由地拷贝数据库,这一特性让SQLite成为应用文件格式的一种流行选择。 Database file format is cross-platform, you can in 32 and 64-bit systems, even in the Big-Endian and Little-Endian (translator note: This is the sort of bytes two different ways, Big-Endian Means a word of Byte is high on the region's low memory word address, and Little-Endian the contrary) structure between two different free copy of the database, this property to become a SQLite file format of a Popular choice. SQLite不能替代Oracle ,但可以考虑作为fopen()的替代方法。 SQLite not a substitute for Oracle, but can be considered as fopen () alternative.
SQLite已经是世界上布署得最广泛的 SQL数据库引擎,被用在无以计数的桌面电脑应用中,还有消费电子设备中,如移动电话、掌上电脑和MP3播放器等。 SQLite is already the world's most widely deployed in the SQL database engine, not to be used in the counting of desktop computer applications, consumer electronics devices, such as mobile phones, PDAs and MP3 players. SQLite的源码就放在公有领域(即WikiPedia的public domain )中。 SQLite on the source on the public domain (that is, WikiPedia the public domain) in.

摘自InfoQ From InfoQ


本来我不知道AIR支持的是哪个版本的SQLite,后来问了一下才知道支持的是SQLite Version 3,看了一下官方网站,发现SQLite Version 3支持如下数据类型: I did not know that AIR is supported by Which version of SQLite, was later asked to know the support is SQLite Version 3, read on the official website, found SQLite Version 3 support following data types:

* TEXT * TEXT
* NUMERIC * NUMERIC
* INTEGER * INTEGER
* REAL * REAL
* NONE * NONE
查看更多关于SQLite数据类型的信息 (Read more data on the types of information SQLite)

数据类型还是要记住的,不如创建表的时候就很可能出错。 Data types or to remember, as a form of time is likely to go wrong. 除了数据类型之外,需要注意的应该就是SQLite所支持的SQL语法了, 这里有一个列表 ,会有所帮助。 In addition to data types, the need to be supported by the SQLite SQL syntax, Here's a list, will be helpful.

关于如何在AIR中连接SQLite数据库,可以参考一下Adobe DevNet上的两篇文章: AIR on how to connect in the SQLite database, you can refer to Adobe DevNet on the two articles:

Working asynchronously with a local SQL database Working asynchronously with a local SQL database

Working synchronously with a local SQL database Working synchronously with a local SQL database

当然,别忘了AIR帮助文档中的有关章节 Of course, do not forget to AIR help in the relevant sections of the document.



本文链接: http://www.zhuoqun.net/html/y2008/966.html 转载请注明出处,谢谢。 This link: http://www.zhuoqun.net/html/y2008/966.html reprint please reference, thank you.

TrackBack引用地址: http://www.zhuoqun.net/html/y2008/966.html/trackback TrackBack used Address: http://www.zhuoqun.net/html/y2008/966.html/trackback

相关日志 Related Log


Posted in AIR&Apollo , 技术 . Posted in AIR & Apollo, technology.

1条评论 1 comments

  • At 2008.03.28 12:37, 秋天霓虹灯 At 2008.03.28 12:37, neon lights fall CHINA said:

    涉及到安全保护的地方,SQLite安全方面值得多考虑 Related to the protection of the safe areas, SQLite security deserves more consideration

    (Required) (Required)
    (Required, will not be published) (Required, will not be published)
    关闭 Close
    Powered by ShareThis