Your Mission
Data Description for this Assignment
There are three primary entities and two relationship entities, which will be represented by tables as listed below. The field
name in red text denotes the primary key for this table:
- Planet - represents a planet of the Galactic Republic.
| Field Name | Field type | Field Description |
| Planet_name | char(20) | Name of the planet, transliterated to ISO-Latin chars | |
| atmosphere | char(20) | Atmospheric type, one of "oxygen", "methane", "carbon dioxide", or "vacuum" |
| political_system | char(25) | "Republic", "Monarchy", "Trade Federation", "Tribal", "Warlords", etc. |
| description | text | Brief description of the planet's geographic/historical/social/economic main features |
- Jedi - represents an individual Jedi Knight
| Field Name | Field type | Field Description |
| Jedi_name | char(20) | Name of the Jedi Knight, transliterated to ISO-Latin chars | |
| home_planet | char (20) | (foreign key) Name of the Jedi's planet of origin | |
- Mission - represents a mission to which Jedi Knights have been assigned
| Field Name | Field type | Field Description |
| id | int | Auto-generated primary key |
| mission_name | char(20) | Short title of the mission | |
| description | text | Longer description of the mission | |
- Mission_planet - represents the fact that a given mission involved a given planet. A single mission can
involve multiple planets.
| Field Name | Field type | Field Description |
| mission_id | int | Foreign key: id of a mission | |
| planet | char(20) | Foreign key: Name of a planet | |
- Mission_jedi - represents the fact that a given Jedi Knight participated in a given mission. A single Jedi can
participate in multiple missions.
| Field Name | Field type | Field Description |
| mission_id | int | Foreign key: id of a mission | |
| jedi | char(20) | Foreign key: Name of the Jedi Knight | |
These tables will be contained in a MySQL database named "jedi" on waycross.cs.uga.edu. The user "guest"
can access this database without a password.
System Functionality
The system should have the following functionalities. For each functionality, we will provide a template client page:
| Functionality | Template page | Description |
| Jedi lookup: | jedi_lookup.html |
Select from a dynamically populated list of all Jedis. Returns:
- The Jedi's home planet;
- A list of planets for which the Jedi has participated in missions involving this planet;
- A list of other Jedis who have participated in missions with this Jedi.
|
| Planet lookup: | planet_lookup.html |
Select from a dynamically populated list of all planets. Returns:
- Political system, atmosphere, and description of the planet;
- A list of Jedis for whom this is their home planet;
- A list of Jedis who have participated in missions involving this planet;
- A list of Jedis who have participated in missions involving planets with the same political system as this planet;
- A list of Jedis who have participated in missions involving planets with the same atmosphere as this planet.
|
The template client pages are each directed at a diagnostic server page that lists the names and values of all the CGI
request parameters sent by the client. Feel free to examine the code of this diagnostic page for programming tips, but please
do not copy the code into your project.
Technology to use:
- You will create two Java server pages (JSP pages), one for each client listed above.
- Each JSP will use a JavaBean. You may choose to write a single JavaBean or two JavaBeans.
- The JavaBean(s) will use JDBC to connect to the MySQL database server on Ganesha. We will provide examples in class.
- When the JavaBean returns a list of items to the JSP page, use the JSP Standard Template Library to iterate through this list on the
results JSP page. We will show examples in class.
- The faster-than-light communications needed to deploy this system on a galactic scale are beyond the scope of this course. For
more info, please see CSCI/ENGR 4761, Subspace Communications Technology.
Coding and specifications:
- Follow
Dr. Miller's style and submission guidelines for this course. The difference is that the classes will be tested
both on atlas and in the Web context on waycross.
- The example code given on the assignment page shows how to build in a
mechanism for testing the business logic of your JavaBean from the command line before attempting to run your JavaBean class in its
Web context.
- Please follow my standard Specification and coding
guidelines for the JavaBean this project. Twenty percent of your grade will be
based on how well you follow these guidelines. I am
happy to consult with you on these requirements. For easiest development, I urge you to review the code specs with me
before you implement the JavaBean class.
- Remember that specs should specify the result and not the method of implementation that produces that result.
In particular you should avoid putting SQL code into your specs, although this may be a tempting way to get a precise
definition of the desired result.
-
The specifications of your results must refer back to the database contents. To make life easier and your specs
less forbidding, you may phrase these conditions as statements about the "actual" entities Jedi Knights, Planets, and Missions.
For example, you could say
A set containing the names of all Jedi who have participated on a mission
involving planet P...
instead of
A set containing the values of the Jedi_name field of each record
R in the Jedi table for which there exists a record MP in the Mission_planet table such that
MP.jedi_name=R.Jedi_name and MP.planet is P...
JavaBean API
Remember that the JavaBean communicates with its associated JSP page through getXXX and setXXX methods.
For example, in a standalone Java class you would probably use this interface to return a list of Jedi who have
participated in some mission along with a given Jedi:
However, the JavaBean class would need something like the following. Note that the bean needs a variable jediName to
allow the JSP page to pass in the chosen Jedi who is to be looked up, but the bean does not need a variable to hold the
list of matching Jedi, which is generated dynamically:
Privacy and submission
Your Java classes and JSP pages will need to be publicly readable for the Tomcat web server to use them.
Please keep your Java source code outside of the public directories
in order to prevent other students from peeking at your work.
Credits:
Thousands of amateur Star Wars fans have combined to populate the Star Wars universe.
Special thanks to the following sources:
- www.starwarsdatabank.com
- www.starwars.com
- www.starwars.wikicities.com
- rules.swcombine.com
"Many Bothans died to give us this information..."