Implement a QBE (Query By Example) Processor using the Java Cartridge of Oracle Application Server. QBE is a visual query language in which the user expresses a query using example elements and variables. Please refer to 6710 text or any introductory database book for details on QBE. We will implement a subset of the language.
The initial screen is a login screen in which the user is prompted for an Oracle userid and password. Upon successful login, the user is presented with a two-frame screen. The left frame consists of a list of all tables in the user's schema along with a pull down list of integers 0, 1, 2 and 3. The right side frame contains a Welcome message and will be used to display the results of any subsequent form submits.
To express a query, the user first chooses the tables along with a corresponding integer (representing the number of copies of the table the query refers to) and submits them. Upon submit, table skeletons are shown on the right-side frame. A special condition box is also shown on the right-side frame. The condition box is used to express conditions that are not easily expressed in the skeletons themselves.
The user then expresses the query by entering form elements in the skeletons and condition box. There are four types of elements: P., P._Variable, Constant, and _Variable. Upon submit, the system should produce the results of the query along with the SQL statement obtained by translating the QBE query.