INDEX:
An index is a database feature used for locating data quickly within a table. Indexes are defined by selecting a set of commonly searched attribute(s) on a table and using the appropriate platform-specific mechanism to create an index.
for example, Personnel information may be store in a Human Resource department's employee table. Clerks find that they often search the table for employees by last name but get slow query responses. Defining an index on the table consisting of the last name attribute would speed up these queries.
KEY:
A database key is a attribute utilized to sort and/or identify data in some manner. Each table has a primary key which uniquely identifies records. Foriegn keys are utilized to cross-reference data between relational tables.
What's different between INDEX and KEY in database Tuesday, October 13, 2009
Posted by Unknown at 10:10 AM 0 comments
Labels: DB
What means DDL, DML, TCL and DCL?
There're four catalogs in standard SQL language:
- DDL-----Data Defination Language
- DML-----Data Manipulation Language
- DCL------Data Control Language
- TCL------Transaction Language
1> The DDL includes
CREATE TABLE - creates new database table
ALTER TABLE - alters or changes the database table
DROP TABLE - deletes the database table
CREATE INDEX - creates an index or used as a search key
DROP INDEX - deletes an index
2> The DML includes
SELECT - extracts data from the database
UPDATE - updates data in the database
DELETE - deletes data from the database
INSERT INTO - inserts new data into the database
3> The DCL includes
GRANT – gives access privileges to users for database
REVOKE – withdraws access privileges to users for database
4> The TCL includes
COMMIT – saves the work done
ROLLBACK - restore the database to original since the last COMMIT
Regarding how to use SQL, pls refer to this link. http://sql.1keydata.com/cn/
Posted by Unknown at 10:08 AM 0 comments
Labels: DB
使用Sqlitecc查看symbian sql 数据库
在symbian OS 9.5 上提供了sqlite api,用这些api 生成的数据库可以用sqlitecc打开。
sqlitecc是图形界面,可以在其中修改数据,很方便、直观
首先需要从sourceforge上下载sqlitecc,http://sqlitecc.sourceforge.net/
然后直接可以打开。打开后界面如下
Posted by Unknown at 10:03 AM 0 comments
SQLite Monday, October 12, 2009
什么是 sqlite ?
sqlite 是一款轻量级的、基于文件的嵌入式数据库,2000年就已经诞生,经过7年多的发展,直到今天已经成为最流行的嵌入式数据库,包括google在内的公司在其桌面软件中亦使用 sqlite 存储用户数据。由此可以看出,已经没有任何理由去怀疑sqlite的稳定性了。
sqlite的优势?
1. 免配置,和access一样,只要把数据库文件通过ftp上传到服务器上就可以使用,不需要服务器的额外支持
2. 备份方便,因为只是一个文件,只要复制一份该文件,就能备份整个数据库
3. 虽然是轻量级数据库,但他支持最大 2tb 的单个库文件。
4. 快,无与伦比的快。经过实际测试,在几百万记录的情况下,sqlite的插入和查询速度和 mysql 不分上下,快于 sql server,10倍于 access (但这并不意味着它可以替代 sql server )
And you can get more information from
1. http://zh.wikipedia.org/wiki/SQLite
2. http://www.sqlite.com.cn/
3. SQLite的原子提交原理
Posted by Unknown at 11:03 AM 0 comments
Labels: DB