数据库设计首要任务之一是选择数据库的字符集,因为这关系到你的数据是以什么编码存储的,你的数据库支持什么语言等等….
1.什么是字符集(Character Set)
所谓字符集,顾名思义就是将一组字符,比如:文字字符,象形文字,符号,标点符号,控制符等通过一定的编码组成一个集合。不同的字符集有不同的编码方式,比如最常见的是ASCII,ZHS16GBK等等,它们的编码方式不一样,所包含的字符也不一样。
不同的字符集不仅决定你的数据库支持什么样的语言,还同时影响你:
1).如何创建你的数据库对象
2).如何开发你的应用程序来处理字符数据
3).数据库如何跟操作系统进行工作
4).数据库性能
5).存储数据所需的空间
2. oracle 字符集的命名规范
oracle 的字符集命名遵循以下命名规则:
<region><number of bits><encoding>[S|C]
其中:Region表示区域或国家
number of bits表示用多少bit去表示一个字符
encoding是编码方式,每种编码有一个标准的字符集名字
比如:US · 7 · ASCII
ZHS · 16 · GBK
WE · 8 · ISO8859P1
注:
1).[S|C]参数用于Macintosh和EBCDIC,用于标明Server(S)和Client(C)的字符集
2).有些字符集并没遵循这个规范,比如:UTF8
3.字符集(Character Set)与国家字符集(National Character Set)
1).字符集用于:
CHAR,VARCHAR2,CLOB,LONG等类型的数据
表名,列名,PL/SQL变量等的标识
SQL,PL/SQL源码的输入和存储
2).国家字符集:是字符集的一个补充,使你在没办法用数据库字符集存储Unicode数据的情况下能存储Unicode数据,它用于:
NCHAR,NVARCHAR2,NCLOB类型的数据
待续…
No Comments
Be the first to comment on this entry.
Leave a comment
Fields in bold are required. Email addresses are never published or distributed.
Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>URLs must be fully qualified (eg: http://www.dbifan.com),and all tags must be properly closed.
Line breaks and paragraphs are automatically converted.
Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.