您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

MT6235 08B 的功能浏览 2

2025/5/29 16:26:10发布24次查看
6. font_engine 矢量字库 7. cmmb_support 中国移动多媒体广播 china mobile multimedia broadcasting cmmb 规定了在广播业务频率范围内,移动多媒体广播系统广播信道传输信号的帧结构、信道编码和调制,该标准适用于 30mhz 到 3000mhz 频率范围内的广播业务
6. font_engine
矢量字库
7. cmmb_support
中国移动多媒体广播 china mobile multimedia broadcasting cmmb规定了在广播业务频率范围内,移动多媒体广播系统广播信道传输信号的帧结构、信道编码和调制,该标准适用于30mhz到3000mhz频率范围内的广播业务频率,通过卫星和/或地面无线发射电视、广播、数据信息等多媒体信号的广播系统,可以实现全国漫游。
8. sqlite3_support
1.sqlite简介
sqlite是实现了以下特征的软件:
i.self-contained:sqlite最大程度的实现了self-contained。它实现了对外部程序库以及操作系统的最低要求,这使得它非常适合应用于嵌入式设备,同时,可以应用于一些稳定的,很少修改配置的应用程序中。
sqlite是使用ansi-c开发的,可以被任何的标准c编译器来进行编译。
sqlite与操作系统和存储设备(磁盘)之间的通信是通过vfs(virtual file system)来完成的,对于嵌入式设备来说,开发一个可用的vfs并不困难。
sqlite使用互斥来保证多线程环境下的操作安全性。
sqlite的源代码是一个单一的c文件-sqlite3.c,如果project需要使用它,只需要包含这个c文件和对应的头文件(sqlite3.h)。
ii.serverless:大多数sql数据库引擎都作为一个独立的服务器进程,应用程序通过使用一些协议,比如tcp/ip来发送请求给服务器,并接受结果,以这种方式来与数据库服务器进行通信。sqlite与此不同,进程可以通过访问数据库直接进行数据库文件的读写而不需要中间层的服务器进程。这样的实现的主要的好处是不需要进行安装,配置,初始化,管理以及维护单独的服务进程。但是,数据库引擎可以通过使用服务器来预防客户端应用程序的bug,确保服务器不被客户端的错误所损坏。大多数sql数据库都是基于c/s模式的,在serverless的数据库中,sqlite是目前唯一允许多个应用同时访问的。
iii.zero-configuration:sqlite不需要任何配置---install、setup、configure server、administration、create instance、assign permissions、recover、troubleshooting。
iv.transactional:sqlite实现了acid(atomic-原子性,consistent-一致性,isolated-隔离性,durable-持久性)。sqlite实现了序列化事务来保证acid,即使发生程序异常,操作系统异常或者电源故障。
v.most widely deployed sql database:大多数数据库是c/s模式的,而一台服务器可以为很多人提供服务,而sqlite是嵌入式的数据库软件,大多数用户会同时使用多个数据库的拷贝。sqlite大量的被用于手机,pda,mp3播放器以及机顶盒设备。下面列举了一些使用sqlite作为嵌入式服务器的应用:
 mozilla firefox使用sqlite作为数据库。
 mac计算机中的包含了多份sqlite的拷贝,用于不同的应用。
 php将sqlite作为内置的数据库。
 skype客户端软件在内部使用sqlite。
 symbianos(智能手机操作平台的领航)内置sqlite。
 aol邮件客户端绑定了sqlite。
 solaris 10在启动过程中需要使用sqlite。
 mcafee杀毒软件使用sqlite。
 iphones使用sqlite。
 symbian和apple以外的很多手机生产厂商使用sqlite。
关于使用sqlite的famous users,请参考http://www.sqlite.org/famous.html
vi.opensource:sqlite处于public domain中,官方声明如下:
anyone is free to copy, modify, publish, use, compile, sell, or distribute the original sqlite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
一些其他的特色例如执行速度比c/s模式的数据库引擎快、简单易用、源代码注释良好、跨平台等请参考sqlite features列表:
http://www.sqlite.org/features.html
2.sqlite的应用场景
sqlite具有小巧,快速和可靠的优点是源于其简单-管理简单,操作简单,嵌入简单以及维护自定义简单。
当然,sqlite也有一些缺点,这取决于用户的需求,sqlite不具有高度并发性,良好的存取权限控制,没有内置的函数集,不支持存储过程以及深奥的sql语言特性(sqlite并不完全支持sql92),不支持xml/java扩展,不具有tera-byte或者peta-byte的可伸缩性等等。所以,当需要上面列举的这些功能时,sqlite就不在适合用户了。sqlite不是企业级的rdbms。
下面列举了一些应用场景:
 应用文件格式
 嵌入式设备和应用
 中小型网站
 内置或者临时数据库
 命令行数据集分析工具
 作为企业数据库的替代产品--demo阶段或者测试阶段
 教学
如果为了学习它,以备将来使用,或者要开发类似的应用场景,可以使用sqlite作为数据库软件。
企业级的rdbms适用于c/s应用,高吞吐量网站,非常大的数据集以及高度并发的应用。
关于sqlite区别于其他数据库的特有属性,请参考:http://www.sqlite.org/different.html
3.下载与使用
根据不同的平台,可以在下载页面:http://www.sqlite.org/download.html下载对应的发布版本。笔者接下来将介绍sqlite在windows上的使用。多种编程语言可以通过使用wrapper或者driver来访问sqlite,下面将介绍使用java编程语言来访问sqlite并做一些常见的操作。
i.下载sqlite
windows版本的sqlite发布包解压缩之后只是一个二进制的sqlite3.exe文件。
可以直接运行该程序,即可进入sqlite3控制台(类似于mysql的控制台),可以通过输入.help来获取帮助信息。.quit可以推出控制台。控制台的一个简单操作如下:
//可以直接使用sqlite3 databasename来创建数据库
//sqlite不支持create database,drop database这样的语句,drop database时直接,删除数据库文件即可。
1.    e:/tools/sqlite>sqlite3.exe test
2.    sqlite version 3.6.11
3.    enter .help for instructions
4.    enter sql statements terminated with a ;
5.    sqlite> .help
6.    .backup ?db? file backup db (default main) to file
7.    .bail on|off stop after hitting an error. default off
8.    .databases list names and files of attached databases
9.    //lots of other help information omitted here
10.  .width num num ... set column widths for column mode
11.  sqlite> .databases
12.  seq name file
13.   
14.  --- --------------- ----------------------------------------------------------
15.   
16.  0 main e:/tools/sqlite/test
17.   
18.  sqlite> create table student(id varchar(10),name varchar(20),age smallint);
19.  sqlite> select * from student;
20.  sqlite> insert into student values('1001','lovesizhao',26);
21.  sqlite> select * from student;
22.  1001|lovesizhao|26
23.  sqlite> drop table student;
24.  sqlite> .quit
这种直接在命令行提示符下面使用sqlite3的方式不是本文介绍的重点。
关于sqlite3支持的sql语法相关内容如下:
sqlite3关键字:http://www.sqlite.org/lang_keywords.html
sqlite3支持的sql语法:http://www.sqlite.org/lang.html
sqlite3不支持的sql语法:http://www.sqlite.org/cvstrac/wiki?p=unsupportedsql
ii.下载java jdbc driver for sqlite3
在下载页面http://www.sqlite.org/cvstrac/wiki?p=sqlitewrappers,选择下载jdbc driver for sqlite3。
笔者使用的是sqlitejdbc(http://www.xerial.org/trac/xerial/wiki/sqlitejdbc)。
该jdbc driver的license是apache software foundation 2.0 license。
iii.使用sqlite3数据库
笔者使用了netbeans作为开发环境,写了简单的java类,注:笔者并非要讲解sqlite3的所有功能以及细节的features,只是作为一个介绍,如果有兴趣的话,请更多的参考sqlite3官方网站及相关资源。
netbeans的使用不属于本文的介绍范围。下面介绍两个简单的java类。
笔者使用的sqlitejdbc driver版本为3.6.11。
sqlite3util.java
1.    package sqlite3;
2.    import java.sql.statement;
3.    import java.sql.connection;
4.    import java.sql.drivermanager;
5.    import java.sql.resultset;
6.    import java.sql.sqlexception;
7.    import java.util.logging.level;
8.    import java.util.logging.logger;
9.     
10.   
11.  public final class sqlite3util {
12.   
13.   private final static string url = jdbc:sqlite:;
14.   private final static string test = test;
15.   
16.   private static connection getconnection(string url) throws sqlexception {
17.   connection conn = null;
18.   try {
19.   class.forname(org.sqlite.jdbc);
20.   conn = drivermanager.getconnection(url);
21.   
22.   } catch (classnotfoundexception ex) {
23.   logger.getlogger(sqlite3util.class.getname()).log(level.severe, null, ex);
24.   } finally {
25.   return conn;
26.   }
27.   }
28.   
29.   public static connection getsqlite3connection() throws sqlexception {
30.   return getconnection(url + test);
31.   }
32.   
33.   public static connection getsqlite3connection(string database) throws sqlexception {
34.   //here database can be database name, database file name or memory:
35.   //connection connection = drivermanager.getconnection(jdbc:sqlite:c:/work/mydatabase.db);
36.   //connection connection = drivermanager.getconnection(jdbc:sqlite:/home/leo/work/mydatabase.db);
37.   //connection connection = drivermanager.getconnection(jdbc:sqlite::memory:);
38.   return getconnection(url + ((database == null || database.equals()) ? test : database));
39.   }
40.   
41.   public static void close(connection conn, statement stmt, resultset rs) throws sqlexception {
42.   if (conn != null) {
43.   conn.close();
44.   }
45.   if (stmt != null) {
46.   stmt.close();
47.   }
48.   if (rs != null) {
49.   rs.close();
50.   }
51.   }
52.   
53.   public static void closequiet(connection conn, statement stmt, resultset rs) {
54.   try {
55.   if (conn != null) {
56.   conn.close();
57.   }
58.   } catch (sqlexception e) {
59.   logger.getlogger(sqlite3util.class.getname()).log(level.warning, null, e);
60.   }
61.   try {
62.   if (stmt != null) {
63.   stmt.close();
64.   }
65.   } catch (sqlexception e) {
66.   logger.getlogger(sqlite3util.class.getname()).log(level.warning, null, e);
67.   }
68.   try {
69.   if (rs != null) {
70.   rs.close();
71.   }
72.   } catch (sqlexception e) {
73.   logger.getlogger(sqlite3util.class.getname()).log(level.warning, null, e);
74.   }
75.   }
76.  }
sqlite3test.java
1.    package sqlite3;
2.     
3.    import java.sql.statement;
4.    import java.sql.connection;
5.    import java.sql.databasemetadata;
6.    import java.sql.resultset;
7.    import java.sql.sqlexception;
8.    import java.util.logging.level;
9.    import java.util.logging.logger;
10.   
11.  public class sqlite3test {
12.   
13.   /**
14.   * @param args the command line arguments
15.   */
16.   public static void main(string[] args) {
17.   // declare and initialize database names and java.sql objects
18.   connection conn = null;
19.   statement stmt = null;
20.   resultset rs = null;
21.   string studentdb = d:/netbeans/netbeansprojects/sqlite3/student.db;
22.   string inmemorydb = :memory:;
23.   
24.   // the dbmd is used to check what sqlite3jdbc driver provide for jdbc
25.   databasemetadata dbmd = null;
26.   
27.   try {
28.   // get connection to default database:test
29.   conn = sqlite3util.getsqlite3connection();
30.   if (conn == null) {
31.   return;
32.   }
33.   dbmd = conn.getmetadata();
34.   // just print information to standard console instead of output file
35.   system.out.println(databaseproductname: + dbmd.getdatabaseproductname());
36.   system.out.println(sqlkeywords: + dbmd.getsqlkeywords());
37.   system.out.println(jdbcmajorversion: + dbmd.getjdbcmajorversion());
38.   system.out.println(jdbcminorversion: + dbmd.getjdbcminorversion());
39.   
40.   // get connection to database:d:/netbeans/netbeansprojects/sqlite3/student.db
41.   conn = sqlite3util.getsqlite3connection(studentdb);
42.   stmt = conn.createstatement();
43.   stmt.executeupdate(drop table if exists student.student);
44.   stmt.executeupdate(create table student(id smallint primary key, name varchar(20)));
45.   stmt.executeupdate(insert into student values(1,'zhangzhongliang'));
46.   stmt.executeupdate(insert into student values(2,'liusizhao'));
47.   rs = stmt.executequery(select * from student);
48.   int i = 1;
49.   while (rs.next()) {
50.   system.out.println(row no= + i);
51.   system.out.println(id= + rs.getint(id));
52.   system.out.println(name= + rs.getstring(name));
53.   i++;
54.   }
55.   stmt.executeupdate(drop table student);
56.   
57.   // get connection to database in memory
58.   // this will not create a database data file in your disk
59.   conn = sqlite3util.getsqlite3connection(inmemorydb);
60.   stmt = conn.createstatement();
61.   stmt.executeupdate(drop table if exists student.student);
62.   stmt.executeupdate(create table student(id smallint primary key, name varchar(20)));
63.   stmt.executeupdate(insert into student values(1,'zhangzhongliang'));
64.   stmt.executeupdate(insert into student values(2,'liusizhao'));
65.   rs = stmt.executequery(select * from student);
66.   i = 1;
67.   while (rs.next()) {
68.   system.out.println(row no= + i);
69.   system.out.println(id= + rs.getint(id));
70.   system.out.println(name= + rs.getstring(name));
71.   i++;
72.   }
73.   stmt.executeupdate(drop table student);
74.   } catch (sqlexception ex) {
75.   logger.getlogger(sqlite3test.class.getname()).log(level.severe, null, ex);
76.   } finally {
77.   sqlite3util.closequiet(conn, stmt, rs);
78.   }
79.   }
80.  }
4.小结
本文主要介绍了sqlite3作为数据库软件,与其他数据库不同的特性,优缺点以及应用场景的选择。最后通过使用jdbc driver进行了一个简单的程序测试,介绍了如何通过jdbc来访问sqlite数据库。
5.参考资料
sqlite官方地址:http://sqlite.org/
sqlite文档:http://sqlite.org/docs.html
sqlite jdbc driver:http://www.xerial.org/trac/xerial/wiki/sqlitejdbc
java jdbc:http://java.sun.com/products/jdbc/overview.html
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product