logo

Blockly Relational Algebra & Calculus Environment

BRACE is developed by Levi Meston under the supervision of Dr. Jalal Kawash.

You may skip this introductory page and directly go to BRACE. For first timers, we strongly recommend that you read this page before using the tool.

For feedback and bug reporting, email us.

For an extensive introduction to BRACE, you can read our Bulletin of the IEEE TLTC paper.

For a detailed RA and RC tutorial using BRACE read this tutorial

I am not a first timer: Take me to BRACE now.

1. Introduction

BRACE is a tile-based, Web-based tool for Relational Algebra (RA) and Relational Calculus (RC). A user can visually develop an RA or RC query using Scratch-style tiles. BRACE generates the equivalent RA or RC expression. In addition, it generates SQL code equivalent to the theoretical expression. BRACE works with any database schema and supports all RA and RC constructs. Most notably, with BRACE, you can develop RA division, RA aggregate function, and RC universal quantification queries and immediately see the equivalent SQL code. BRACE also allows instructors to setup quizzes for their students.

2. Composing and Loading a Database Schema

Before you can meaningfully use BRACE, you need to load a database schema. Such a schema is represented as an XML file, which consists of a listing of the relation schema and their attributes. The following forestry database schema is loaded by default to BRACE, but you may load your own schema. This database keeps track of measurements (height) on trees, which are located in forests and are classified by their species.

We show you how to code your own schema to load to BRACE using the above example relational model. This forestry schema is represented in XML as follows (Note:in the current BRACE implementation, only the name tag is required in the attribute XML element; hence, the rest of the tags can be safely omitted):

Once you have your XML file ready, click the file menu and select the load database schema option. Now, BRACE is ready and you can start composing your queries using your own relational schema.

Note: For first timers, we suggest that you use this forestry schema, which is loaded by default. Once you are more comfortable with BRACE, you can create your own XML files. Keep in mind that in the current version of BRACE, only the name tag is required. So, you can safely omit the other tags: type, pk, fk, and desc. Our future plans is to make use of such extra tags in order to minimize user's obvious errors in query composition.

I am ready: Take me to BRACE now.

3. Composing Queries

If you used Scratch or similar tile-based programming environments before, then composing queries is straightforward. If you require an example, watch one of the Youtube videos below. Once you finish composing your tiles, click to see both the theoretical query expression and its equivalent SQL statement.

3.1. Composing Relational Algebra Queries

Watch the Youtube Video. [coming soon]

3.2. Composing Relational Calculus Queries

Watch the Youtube Video.[coming soon]

I am ready: Take me to BRACE now.

4. Saving and Opening Query Files

You can save your query files: with raq (for RA) and rcq (for RC) extensions. The database schema is piggybacked into the same query file. Opening a previously saved query file will load the query as well as the corresponding database schema.

You can also save the SQL code to a file with sql extension and the RA or RC theoretical expression to a file with txt extension.

I am ready: Take me to BRACE now.

5. Buggs and Feedback

Did you encounter any bugs in the tool? Do you have suggestions to improve it? Write back to us at brace.feedback@gmail.com.

 

 

[HOME]