论文标题
基于Turing-Complete Automata
High-concurrency Custom-build Relational Database System's design and SQL parser design based on Turing-complete automata
论文作者
论文摘要
数据库系统是软件项目必不可少的一部分。它在数据组织和存储中起着重要作用。它的性能和效率与软件的性能直接相关。如今,我们有许多可以在我们的项目中使用的通用关系数据库系统,例如SQL Server,MySQL,Oracle等。不可否认的是,在大多数情况下,我们可以轻松地使用这些数据库系统来完成我们的项目,但是考虑到通用性,一般数据库系统通常无法播放最终速度并完全适应我们的项目。在很少的项目中,我们将需要设计一个完全适应我们项目并具有高效率和并发的数据库系统。因此,考虑设计数据库系统的可行解决方案非常重要(我们仅在此处考虑关系数据库系统)。同时,对于数据库系统,SQL解释和执行模块是必要的。根据正式语言和自动机理论,自动机可以完成该模块的实现。在我们的实验中,我们做出了以下贡献:1)我们设计了一个小的关系数据库,并使用数据库来完成高度同时的学生课程选择系统。 2)我们设计一个通用的自动机模块,该模块可以完成从解析到执行的操作。使用了策略模型和事件驱动的设计方案的使用,并对一般自动机进行了一些改进,例如,在自动机中添加了类似的内存结构,以使其更好地存储上下文。所有这些使自动机模型都可以在多种场合使用,而不仅仅是SQL语句的解析和执行。
Database system is an indispensable part of software projects. It plays an important role in data organization and storage. Its performance and efficiency are directly related to the performance of software. Nowadays, we have many general relational database systems that can be used in our projects, such as SQL Server, MySQL, Oracle, etc. It is undeniable that in most cases, we can easily use these database systems to complete our projects, but considering the generality, the general database systems often can't play the ultimate speed and fully adapt to our projects. In very few projects, we will need to design a database system that fully adapt to our projects and have a high efficiency and concurrency. Therefore, it is very important to consider a feasible solution of designing a database system (We only consider the relational database system here). Meanwhile, for a database system, SQL interpretation and execution module is necessary. According to the theory of formal language and automata, the realization of this module can be completed by automata. In our experiment, we made the following contributions: 1) We designed a small relational database, and used the database to complete a highly concurrent student course selection system. 2) We design a general automaton module, which can complete the operation from parsing to execution. The using of strategy model and event driven design scheme is used and some improvement on general automata, for example a memory like structure is added to automata to make it better to store context. All these make the automata model can be used in a variety of occasions, not only the parsing and execution of SQL statements.