linux
===========================================================
zt:Cardinality (SQL statements) 最好的解释
===========================================================

http://www.itpub.net/thread-934862-1-1.html

In SQL, the term cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table.
When dealing with columnar value sets, there are 3 types of cardinality: high-cardinality, normal-cardinality, and low-cardinality.
High-Cardinality
High-cardinality refers to data table column values that are very uncommon. High-cardinality column values are typically identification numbers, email addresses, or user names. An example of a data table column with high-cardinality would be a USERS table with a column named USER_ID. This column would contain unique values of 1-n. Each time a new user is created in the USERS table, a new number would be created in the USER_ID column to identify them uniquely. Since the values held in the USER_ID column are unique, this column's cardinality type would be referred to as high-cardinality.
Normal-Cardinality
Normal-cardinality refers to data table column values that are somewhat uncommon. Normal-cardinality column values are typically names, street addresses, or vehicle types. An example of a data table column with normal-cardinality would be a CUSTOMER table with a column named LAST_NAME. This column would contain the last names of customers. While some people have common last names, such as Smith, others have uncommon last names. Therefore, an examination of all of the values held in the LAST_NAME column would show "clumps" of names in some places (e.g.: a lot of Smith's ) surrounded on both sides by a long series of unique values. Since there is a variety of possible values held in this column, its cardinality type would be referred to as normal-cardinality.
Low-Cardinality
Low-cardinality refers to data table column values that are not very unusual. Low-cardinality column values are typically status flags, boolean values, or major classifications such as gender. An example of a data table column with low-cardinality would be a CUSTOMER table with a column named NEW_CUSTOMER. This column would contain only 2 distinct values: Y or N, denoting whether the customer was new or not. Since there are only 2 possible values held in this column, its cardinality type would be referred to as low-cardinality.
Retrieved from "http://en.wikipedia.org/wiki/Cardinality_%28SQL_statements%29"


lfree 发表于:2008.01.31 15:16 ::分类: ( oracle2008 ) ::阅读:(89次) :: 评论 (0)
===========================================================
vim下快速输入sql语句
===========================================================

vim下快速输入sql语句

最近没事干,看了《Hacking Vim》,自己总觉一下,写了一个快速输入sql的脚本abbr,通过别名以及字典建立快速输入sql:
(注意斜线被替换为全角的/).

abbreviate sqls select * from <+table+> where <+field+> = :<+value+> ;
abbreviate sqlu update <+table+> set <+field+> = :<+values+> where <+field+> = :<+values+> ;
abbreviate sqld delete from <+table+> where <+field+> = :<+values+> ;

nnoremap <c-j> /<+.{-1,}+><cr>c/+>/e<cr>
inoremap <c-j> <ESC>/<+.{-1,}+><cr>c/+>/e<cr>
nnoremap <F9> /<+.{-1,}+><cr>c/+>/e<cr>
inoremap <F9> <ESC>/<+.{-1,}+><cr>c/+>/e<cr>

set dictionary+=$VIMRUNTIME/dict/tables.txt
set dictionary+=$VIMRUNTIME/dict/fileds.txt

tables.txt 与fields.txt 可以从数据库获得。

ctrl+x ,ctrl+k 启动字典。


lfree 发表于:2008.01.30 10:43 ::分类: ( vim ) ::阅读:(272次) :: 评论 (0)
===========================================================
vim下改变字体
===========================================================

经常在windows下使用vim,发现缺省的字体并不是很好看,
修改vimrc文件(windows下是_vimrc),在vimrc文件中
有source $VIMRUNTIME/vimrc_example.vim
我一般是修改vimrc_example.vim文件:
加入如下:

set guifont=新宋体:h11

这样在windows下看文件字体就比较好看了。


lfree 发表于:2008.01.28 16:21 ::分类: ( vim ) ::阅读:(436次) :: 评论 (0)
===========================================================
zt:Grub引导的Linux系统下使用MaxDos V6.0
===========================================================

http://www.chinalinuxpub.com/read.php?wid=2214

教你如何在Linux下使用MaxDos V6.0
1.首先在硬盘内安装最新MaxDos提取C:MaxDos文件夹的内容。
2.把MaxDos文件夹里的内容传到Linux内的 /boot/maxdos/文件目录内。
注意大小写,Linux对大小写的要求是非常严格的。
3.在Linux中/boot/grub/menu.lst文件内添加如下代码。
title Maxdos6.0
此命令为标题,Linux的Grub不支持中文,所以不要写中文。
root (hd0,1)
此为第1快硬盘的第2个分区。请大家根据实际情况进行修改。
password ****
*号代表你要设置的密码,由于Linux本身就非常安全,所以我把原命令中的
-Md5去掉了。
fontfile /boot/maxdos/Maxft.gz
kernel /boot/maxdos/Memdisk.gz c=555 h=2 s=18 floppy
initrd /boot/maxdos/Maxs.sys c=555 h=2 s=18 floppy
以上3行是启动Max必须的,不解释了。
如果你想把启动界面也换成MaxDos的界面的话请继续看
4.修改menu.lst文件内容中包含splashimage的行,内容改为如下。
splashimage=(hd0,1)/boot/maxdos/Maxtf.gz
"#"号为注释,调整时,可以利用#号来调试。
按照以上操作就可以完成了,恭喜你已经安装成功。
做网维的朋友可以利用Linux的gurb来实现引导,抛弃功能柔弱的Win引导。


lfree 发表于:2008.01.17 09:42 ::分类: ( linux ) ::阅读:(118次) :: 评论 (0)
自我介绍
切换风格
新闻聚合
博客日历
文章归档...
最新发表...
最多阅读文章...
最多评论文章...
博客统计...
Blog信息
网站链接...