网络安全参考 | UNIX参考 | GPS参考 | 无线参考 | 在线手册 | OSBUG.ORG | SUNNY-NETWORK.COM
天线制作 GPS 地标
网站地图 RSS订阅
高级搜索 收藏本站
Home | 业界动态 | Open source | GNU | Linux | BSD | Solaris | AIX | HP-UX | IRIX | Mac OS X | Minix | Tru64 | SCO UNIX | Network | Security | X-Window | Database | 应用服务 | Programming | 经典著作 | 永远的纪念 | 杂项
 当前位置: Home > Database > SQLite > 文章  
开放源码嵌入式数据库 SQLite 简介
文章来源: DeveloperWorks中国 文章作者: Nils-Erik Frantzell 发布时间: 2007-02-19   字体: [ ]  
 

  清单 2. 列出表和架构

C:\minblogg>sqlite3 c:\minblogg\www\db\alf.db
SQLite version 3.2.1
Enter ".help" for instructions
sqlite> .tables
mytable
sqlite> select * from mytable;
Nils-Erik|23
sqlite> .schema
CREATE TABLE mytable(name varchar(40), age smallint);
sqlite>

  SQLite 还附带命令行数据库分析器,该分析器允许您显示关于任何 SQLite 数据库当前状态的详细信息。

  清单 3. SQLite 分析器

C:\minblogg>sqlite3_analyzer www\db\alf.db
Analyzing table mytable...
Analyzing table sqlite_master...
/** Disk-Space Utilization Report For www\db\alf.db
*** As of 2005-Apr-24 18:56:40
Page size in bytes.................... 1024
Pages in the whole file (measured).... 2
Pages in the whole file (calculated).. 2
Pages that store data................. 2          100.0%
Pages on the freelist (per header).... 0            0.0%
Pages on the freelist (calculated).... 0            0.0%
Pages of auto-vacuum overhead......... 0            0.0%
Number of tables in the database...... 2
Number of indices..................... 0
Number of named indices............... 0
Automatically generated indices....... 0
Size of the file in bytes............. 2048
Bytes of user payload stored.......... 13           0.63%
*** Page counts for all tables with their indices ********************
MYTABLE............................... 1           50.0%
SQLITE_MASTER......................... 1           50.0%
*** All tables *******************************************************
Percentage of total database.......... 100.0%
Number of entries..................... 2
Bytes of storage consumed............. 2048
Bytes of payload...................... 91           4.4%
Average payload per entry............. 45.50
Average unused bytes per entry........ 916.50
Maximum payload per entry............. 78
Entries that use overflow............. 0            0.0%
Primary pages used.................... 2
Overflow pages used................... 0
Total pages used...................... 2
Unused bytes on primary pages......... 1833        89.5%
Unused bytes on overflow pages........ 0
Unused bytes on all pages............. 1833        89.5%
*** Table MYTABLE ****************************************************
Percentage of total database..........  50.0%
Number of entries..................... 1
Bytes of storage consumed............. 1024
Bytes of payload...................... 13           1.3%
Average payload per entry............. 13.00
Average unused bytes per entry........ 999.00
Maximum payload per entry............. 13
Entries that use overflow............. 0            0.0%
Primary pages used.................... 1
Overflow pages used................... 0
Total pages used...................... 1
Unused bytes on primary pages......... 999         97.6%
Unused bytes on overflow pages........ 0
Unused bytes on all pages............. 999         97.6%

  由于完全能够使用命令行界面来管理数据库,因此它可以为数据库管理员带来很大的方便。目前有许多优秀的基于 Web 的 SQLite 数据库管理系统。其中有一个是基于 PHP 的 SQLiteManager。

 
推荐文章
·ucLinux下sqlite数据库移植全攻
 

 
↑返回顶部   打印本页   关闭窗口↓  

Google
 
Web oldhand.org unixreference.net meshmea.org
相关分类
热点文章
·SQLite简介
·ucLinux下sqlite数据库
·SQLite数据库安全
相关文章
·SQLite简介
·ucLinux下sqlite数据库
·SQLite数据库安全
·MySQL(MyODBC/ByteFx),
·Oracle数据库用VPD来确
·关于数据库权限管理的对
·Oracle数据库中保护每一
·深入探讨嵌入式系统与移
更多...
 
 

Copyright(c) 2001-2009 OLDHAND ORGANIZATION, All Rights reserved.
Power by DedeCms 织梦内容管理系统