CSc 8711. Databases and the Web
Fall 2006, Programming Project 2 - Mini (Yugioh Search)
Due: Friday, September 22th
Consider the following database schema that catalogs the popular Yu-Gi-Oh trading cards:
create table yugiohcards (
cardCode varchar(8) primary key,
series varchar(4),
cardName varchar2(50),
attribute varchar2(50),
cardType varchar2(50),
attackPoints number(5),
defensePoints number(5),
rarity varchar2(20),
description varchar2(1024),
numStars number(2)
);
Each row in this table describes a trading card. Each card has numerous characteristics
such as rarity (Secret Rare, Ultra Rare, Super Rare, Rare, and Common) and
cardType (Fiend, Dragon, Spellcaster, Warrior, Pyro, Thunder, Magic, Trap, etc).
Develop a search engine using Java servlets/JSP to search cards from this database.
The search page should contain the following HTML form elements:
- Select lists for the following columns: series, cardType, attribute, and rarity.
- Text Box fields for cardName and description columns.
- Text Box fields preceded by a pull down list with three
labels: <=, =, >= for attackPoints, defensePoints, and numStars columns.
- A submit button labeled "Find Cards".
Notes:
- The initial search page is itself a dynamic page requiring several queries against the
database to get list of values. The user may choose one or more values from a select list,
one value from a pull-down list, enter some text/numbers in text boxes and
submit the search request.
- A second servlet should take these search values as input and create a
SQL select statement to query the database and return rows that match the search
criteria in tabular form. The results should be formatted as a list of cardCode
(hyperlinked to a card display servlet) and cardName values.
- The third servlet should take the cardCode value and display the card details in
a tabular format.
- Sample Data