Abstract:
Both academic and industry has been increasingly paid more attention to the quality of the relational database system. Relational algebra serves as the query language of relational databases that are often used to explain principles of relational operations. However, there is no software support for assessing relational algebra expressions: Modern relational database management systems implement only the SQL query language. The queries using relational algebra as SQL queries are declarative, specify a query execution plan. It is necessary to convert SQL to relational algebra to get a quicker and optimized implementation version accurately. Many researchers proposed only theoretical approaches for a subset of the SQL statements within this context in the literature. This paper explores an automated translation of SQL into relational algebra using lexical analysis and rule-based approaches. A software tool has been developed for checking syntactic and semantic correctness of given SQL statements and which will be converted into relational algebra expressions. A given SQL tokenized (lexical analysis) as lexical tokens, strings with a classified category and thus identified semantic meaning (tagged part of speech). A syntax analyser sequentially checks the syntax of the SQL with the help of lexical grammar and a data dictionary. Finally, a ruled-based engine and relational algebra expression generator map the tagged part of speech into a meaningful relational algebra expression. We have implemented the theoretical methodology in a software platform with a GUI, which is helpful for the SQL user interface for DBMS that internally employ relational algebra without needing to write an SQL interpreter/compiler. The GUI of the translation will help for the understanding of database manipulation for the students at the university level.