摘要
为了能够便捷、准确地从数据库中检测出含有特殊符号、中文文字等不属于ASCII字符集的非标准字符的字段,提出两种不依赖于数据库所用字符集的含非标字符字段的检测方法,第一种方法通过比较疑似非标字段的文字长度与存储长度,若不相等则为非标字段;第二种方法将疑似非标字段转换为ASCII,然后比较转换前后的值,若不相同则为非标字段。实验结果表明,与传统依赖于字符集的非标字段检查方法相比,第一种方法在执行效率上略优于传统方法,而第二种方法则稍劣于传统方法,但差距并不明显,且由于DBA无需掌握字符集,相对减轻了检测负担,整体性能优于传统方法。
Most invalid number of database including specific symbols or Chinese characters which are not included in ASCII Character Set. These invalid data fields may bring unexpected risk to MIS or data migration. Address the problem, the paper proposed two detection methods of database nonstandard field Independent of Character Set. The one converts the field to ASCII and then compares the values between before and after. Another compares the byte length and word length. All the two methods detected all of nonstandard fields in the data table. The methods afford new effective measures to detecting and correcting invalid number in database.
出处
《东北电力大学学报》
2012年第4期4-7,共4页
Journal of Northeast Electric Power University
基金
吉林省自然科学基金(20101517)
关键词
数据库
字符集
特殊符号
检测
Database
Character set
Specific symbol
Detection