摘要
信息泄漏事件不断发生使得数据库安全的重要性不断提高。基于SQL解析能够实现SQL到自然语言的翻译,帮助非专业人员分析数据库的访问活动和识别风险。通过SQL词法和语法的EBNF描述构造了可以用于LL的规则输入,使用ANTLR工具生成了SQL词法和语法解析器。进一步,SQL词法和语法解析器实现了SQL语句到抽象语法树的转换。并通过解析抽象语法树,将SQL语句翻译成自然语言。最后,将SQL解析和翻译功能应用在数据库防火墙和安全审计系统中。
The continuous occurrence of information leakage incidents makes the importance of database security improve constantly. The SQL parse can realize the translation from SQL to natural language,and help the non-specialized people to analyze the database access activities and identify the risks. The rule input applied to LL was constructed by means of EBNF description of SQL morphology and syntax. The SQL morphology and parser are generated with ANTLR tool,which can realize the conversion from SQL statement to abstract syntax tree. The SQL statement can be translated into natural language by parsing the abstract syntax tree. Finally,SQL parse and translation function are applied to the database firewall and safety audit system.
出处
《现代电子技术》
北大核心
2016年第11期99-102,107,共5页
Modern Electronics Technique