毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

查询语句QL的语义分析和实现

更新时间:2009-6-4:  来源:毕业论文

查询语句QL的语义分析和实现
计算机与信息科学系

论文摘要:本文是基于数据库、编译原理、数据结构、程序设计等理论知识,主要是运用语法制导翻译原理,对数据定义语言中的查询语句进行语义分析与实现。语义分析是在自主知识产权数据库第四层上,为上层提供函数接口。
本文实现对查询语句在进行语法分析的同时,进行语义分析,包括类型检查,执行语义子动作等。语义检查无误后,经分析可以得到表名和相应的列名,用栈来实现布尔表达式的求值等,布尔表达式的计算结果,用以检查条件是否成立,为事务处理提供函数接口,以便进行正确的查询。
本文实现的是对简单QL语句的语义的分析,其中文中的部分算法是通用的。如果扩充QL语句的文法定义,并且在语法分析阶段采用LR分析法,增加相应的产生式,可实现更加复杂的查询语句的语义分析。

关键词:自主知识产权数据库,语法制导翻译,语义分析

 
Semantic Analysis and Realization of the Search Language QL
Weifeng Gao
(Dept. of Computer and Information Science, Southwest Forestry College, Kunming, Yunan, 650224, China)

Abstract: This paper is based on theories knowledge of the database, compiler implementation, data construction and program design. It mainly makes use of the syntax phrasing system with translation principle to realize the semantic analysis of the search language QL. The semantic analysis is the fourth layer in the model of Independence Intelligent Property Right Database. It provides function interface to the upper level.
The paper has been realized that syntax analysis proceed at the same time with semantic analysis , including the type-checking, carrying out semantic actions. Language righteousness checked without any error, we can get table name and the corresponding fields names. The paper adopts the stack to realize calculating the logic expressions type. Through the value of the logic expressions, we can check whether conditions in the QL establish or not. And we pass the result to the tranction disposal layer which can deal with the right search. 
This paper realized the semantic analysis of the simple QL .Parts of algorithm which this paper designed is in general use. If we expand the definition of grammars to QL ,add the produce expressions and adopt the LR syntax analysis, it can realize the semantic analysis of the complex QL.

Key words: Independence Intelligent Property Right Database, Syntax Phrasing System with Translation Principle, Semantic Analysis

 
目  录
1 前言 1
2 概述 3
2.3 研究的意义 4
2.4 国内外研究现状及发展趋势 4
2.5 研究的内容 6
3 语义分析的理论依据 7
3.1 数据库设计背景 7
3.2 SQL 8
3.3 编译程序及语义分析 10
3.4 程序设计知识背景 13
4 系统设计 15
4.1 概要设计 15
4.2 功能设计 15
4.3 接口设计 16
5 实现 18
5.1 实现环境 18
5.2 分析出表名和列名的设计与实现 18
5.3 表达式计算的设计与实现 20
5.4 单表和多表查询的设计 21
6 总结与展望 23
6.1 总结 23
6.2 展望 23
参考文献 25
指导教师简介 26
致  谢 27
附  录 442

[1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

查询语句QL的语义分析和实现下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。