Csc 8711, Databases and the Web - Programming Project 1

Due: Sunday, February 1, 2015
Individual Project

An Online QBE Processor for MySQL (To be coded in PhP/MySQL)

In this programming assignment, you will implement a Web-based QBE (Query By Example) Processor for MySQL databases. QBE is a visual query language in which the user expresses a relational query using example elements and variables. You will implement a subset of the language.

User Interface

These are general guidelines for the user interface. Please use your Web programming skills to implement an appropriate and user-friendly interface. Use of Javascript is strongly recommended for a dynamic interface.
  1. The initial screen will allow the user to provide the credentials for a MySQL database on the server. These will include database name, username, and password. We will assume that the database is available on the server where the application is running.
  2. Upon successfully verifying the credentials, the user should be shown a list of tables in the MySQL database. This list should be interactive in the sense that the user should be able to generate table skeletons by choosing or clicking on these table names. The user may also wish to generate a condition box. To express some queries, some table skeletons will have to be generated more than once.

    The table list may look like: table list.

    The table skeletons may look like: table skeletons.

    Note: This is probably not the best of interfaces! This is from the early 2000s when Web applications were in their infancy!

  3. To express a query, the user enters form elements in the table skeletons and condition box. There are four types of elements: P., P._Variable, Constant, and _Variable.
  4. Once the query is formulated, the user may submit the query for execution. The QBE processor should first check for any syntax or semantic errors in the query. Once the QBE query is error free, the QBE processor should generate an appropriate SQL query, execute it against the database and show the results. The results page may look like: results page.
  5. Implementing simple Queries (the S-P-J variety) will earn you 80% of the credit. To earn the remaining 20%, you must implement at least 2 advanced features of QBE.
  6. For testing purposes, you may load the Company Database into your MySQL account. This database is also available in a tarball.