Relational Algebra Toolkit 2.0

The Relational Algebra Toolkit is an elegant new approach to explaining, teaching, and learning the concepts of relational algebra. Users can create and manipulate relational algebra expressions using their Web browser, rather than having to resort to pencil and paper. Relational algebra is the forms the foundation of SQL in all its various dialects, which is why it is part of the curriculum for many database courses. It also happens to be a critical part of how DBMSes like Oracle® and MySQL® try to optimize poorly-written SQL queries so that they can still run efficiently. It is certainly worth a database engineer's time and effort to become familiar with relational algebra, but until now there has been a distinct lack of tools to make it easy to do so. The RAT aims to solve this problem.

The initial motivation for the project came forth when professor Artem Chebotko and his student in a database class discussed ways of sharing relational algebra expressions on the Web. The most feasible and widely used approach for embedding relational queries into XHTML pages is through images. In particular, LaTeX or MathType can be used to encode and render a query, and screen capturing software can be further employed to obtain the query image for a Web page. However, this approach is limited to bitmap graphics, which does not scale. Another approach that yields a better rendering quality is to encode relational algebra expressions in XHTML directly using a Unicode font that supports relational algebra symbols. Unfortunately, such an encoding process is rather tedious and error-prone. More importantly, both approaches only provide rendering capabilities and do not capture a relational algebra expression structure that can be queried. The new approach that we propose is to use an intermediate, user-and machine-friendly language, such as XML, to express relational algebra queries, which can be readily embedded into XHTML documents and automatically translated into displayable XHTML markup. This elegant idea further evolved into a larger vision of the Relational Algebra Toolkit.

The Relational Algebra Toolkit is a library of utilities written in the jQuery framework. They are built upon a core of three novel XML-based languages, and a coordinating management layer provides access to the utilities as services to the user's programs at the application layer as shown below

RAT 2.0 Framework RAT Services with Input and Output

The RAT is currently seeing use in database and Web technology courses taught at the University of Texas – Pan American. Assignments on relational algebra, which are traditionally performed using the pencil-and-paper approach, LaTeX, or equation editors like MathType, now rely on RAML Render and RAML Visualize, together with an expression editor known as RAML Edit. Unique benefits of using this novel teaching approach would be augmented by other RAT utilities to automatically construct equivalent relational algebra and SQL queries, as well as dynamically evaluate queries and output their results. In Internet programming and Web technology courses, RAML is used as a representative example of an XML vocabulary developed with XML and XML Schema. Development of new open-source utilities for RAT using client-site programming technologies, such as JavaScript, jQuery, XSLT, XPath, XQuery, HTML, XHTML, and CSS, is encouraged in course projects.