IT360 Spring 2009 Project Database backed company website

advertisement
IT360 Spring 2009 Project
Database backed company website
Entire Project Due: April 28, 2009, before class
Partial Deadlines: see Deliverables
This is a Programming Project. For this project, midshipmen will work in groups of four or five. The
individual grade for the project will be based on the team grade and the individual performance on completing
the project. You may not discuss the project with anyone outside of your group. You may seek clarifications
pertaining to system requirements from Dr. Crainiceanu.
Submission requirements (each team will have one submission):
 Electronic submission: The team leader should upload the files created for each part of the
project to Final Project on Blackboard
 Hard copy: Hard copy of the project report.
Project Description
In this project you will develop a real database application for your company.
Many of the companies here at USNA -- you may even be the MISLO for one of these companies -have fairly simple web pages. They consist of static HTML files, images and other types of flat files.
Some of these web pages may contain very complicated Java scrips, but nearly universally they lack
the flexibility a database back-end would provide.
The goal of this project is to design and implement a database for your company, and then to
develop a web based interface for the database. You will be using MySQL and PHP, XHTML and
CSS.
Part 1: Project Responsibilities
For this part of the project your team is to:
1. Choose a project leader. The project leader will be the instructor’s point of contact with your
team. The project leader is also responsible for ensuring that work is distributed in a fair
manner to each team member and that the work is getting done.
2. Read through the project description and divide up the project in sections of responsibility
(ex. ER Diagram, Normalization, …). Each team member should be responsible* for some
section of the project. Each team member should be responsible for both some section in the
design part and some section on the web interface part.
*Responsibility for a section of the project does not mean that the team member is to do that
section of the project alone; it simply means that the member will supervise that section.
3. Record the name of the project leader, the sections of responsibility, and the team member
responsible for each section.
Send email to your instructor with information in Point 3 above. Turn in a hard copy with the same
information. This section of the project is due 17 February, 2009, before class.
Part 2: Requirements and Entity-Relationship model
Create an Entity-Relationship model that incorporates the specifications described below and some
extra requirements you have to specify. You must give the entities, their attributes and identifiers,
the relationships between entities with an appropriate verb phrase, and the appropriate minimum and
maximum cardinalities for all relationships. Use the crow’s foot notation in the diagram. In your
design, make and state reasonable assumptions about the data, if not clearly specified in the
assignment. If there is some information you cannot capture in the ER diagram, specify so.
Partial Design Specification
Below are the minimum requirements for your database. Based on your experience within your
company, you have to add to these requirements, such that you create at least two extra entities. You
can also modify these requirements slightly to better fit your company specific needs, but such
modifications need to be approved by your instructor first.
Your database will have a web interface and company members can login into the website. Only
members with valid login/password information can access the website.
Every company has many members, each with a rank. Members of the company are divided into
midshipmen, who have an alpha, and active duty (i.e. company officer, senior enlisted) who have a
previous assignment. Each midshipman has a position in the company. There are two types of
positions: command and non-command. Each midshipman has either a command position or a noncommand position. Each command position is held by exactly one midshipman. Non-command
positions can be held by multiple midshipmen. Command positions command a least one other
position. (See Appendix C for an organizational chart of the command positions)
Midshipmen also belong to groups. These groups include, but are not limited to, sports, ECAs, and
year groups. Each midshipman in a company should have a biography that includes personal (but
not sensitive) information and an official photo. (See Appendix A for an example Bio form)
Companies maintain a calendar of events, with event name, location, and time. These events include,
but are not limited to, company meetings, ECA meetings, sporting events, and social events. These
events are either optional or mandatory. Mandatory events can be mandatory for all midshipmen or
for just a group of the midshipmen in a company.
Innovative requirements (required for all teams): You have to come up with a few more
requirements for your database, such that you will need to create at least two extra entities.
Next requirements are optional for groups of 4 people:
Companies also have scheduled watches. Each watch duty has a specific date, time, place,
responsibilities, and midshipman assigned to it, as well a midshipman organizing the watch, and a
number of hours prior to watch a mid can still reschedule the watch. (See Appendix B for an
example watch notification report).
TURN IN (both electronic and paper): A file named teamX_ERModel.doc, where X is your team
number, containing all the requirements for the database (the ones provided and the innovative
requirements you came up with) and the ER diagram that captures all the requirements. This section
of the project is due 24 February, 2009, before class.
Part 3: Relational model
Transform the ER model developed in Part 2 into a relational model. Follow the steps described in
“ER to Relational” lecture, or Chapter 6 of the textbook.
Write the SQL statements to create the tables in MySQL, with their columns, data types and whether
null values are allowed for the column or not, default values (if any), primary keys for each table,
alternate keys and foreign keys if appropriate. Note that if a table R has a foreign key attribute
referencing another table S, you must first create S and then create R. If a table R has a foreign key
attribute referencing a table S, and S has a foreign key attribute referencing R, you have to create
both R and S, without the foreign key constraints, and then use ALTER TABLE statements to add
the foreign key constraints to each table.
If there is some semantics in the ER diagram that you cannot capture in the relational tables,
explicitly state so.
TURN IN (both electronic and paper): A file named teamX_RelationalModel.sql, where X is your
team number, containing all your SQL statements for this section. This section is due 3 March 2009,
before class.
Part 4: Normalization
For each table identified in part 3:
1) Ensure the table is in 1st Normal Form. If the table is not in 1St Normal Form, re-design the table,
so the resulting tables are in 1st Normal Form.
2) Determine all the functional dependencies in each of the tables. If a table is not in Boyce-Codd
Normal Form, decompose the table such that the result tables are in Boyce-Codd Normal Form.
TURN IN: (both electronic and paper): A file named teamX_Normalization.doc, where X is your
team number, containing all the functional dependencies for each table in part 3 (remember that each
table has at least one functional dependency), and, for the tables not in 1NF or not in BCNF, the
decomposition in BCNF tables. This section of the project is due 3 March 2009, before class.
Part 5: Create normalized tables in MySQL
Write the SQL statements to create all the tables you designed in Part 4 (you should already have
most of the statements for Part 3).
Create a file that contains all the SQL statements from Part 3 and Part 5, in the correct order.
Executing this file in MySQL should create all the tables for your database.
TURN IN (both electronic and paper): A file named teamX_CreateTables.sql, where X is your team
number, containing all the SQL statements to create the entire database. This section of the project is
due 3 March, 2009, before class.
Part 6: Queries
a) Appendix A contains a typical midshipman member biography form. Write the INSERT
statements to insert the data from the member biography form into the appropriate tables.
b) Write the SQL insert statements to populate the Command and Non-command tables using
the positions in Appendix C.
c) (Optional for teams of 4 people) Appendix B contains a watch duty notification. Write the
SQL INSERT statements to insert the data from the watch duty notification into the
appropriate tables.
TURN IN (both electronic and paper): A file named teamX_insert.doc, where X is your team
number, containing all the SQL INSERT statement. This section of the project is due 6 March,
2009, before class.
Part 7: Web Interface
You should add now a web interface for your database. There are no specific requirements for the
website design, but the overall website should be tasteful and appropriate as a company website. The
look among pages should be consistent (use CSS). When finished, your system should support the
following functionality:
1. Company members can login into the website. A member can be either a regular
midshipman, a midshipman with a command position, or active duty personnel. Only
members with valid login/password information can access the website.
2. Upon login, one of two menus are presented:
2.1. “Regular menu” has the following options
 Change password
 Add/Update Bio
 Search events
 Extra operation depending on your particular innovative requirements
 (Not required for teams of 4 people) Search watches
 Logout
2.2. “Administrator menu” has the following options
 Change password
 Add/Update Bio
 Search bios
 Add event
 Search events
 Extra operation depending on your particular innovative requirements
 Extra administrative operation depending on your particular innovative requirements
 (Not required for teams of 4 people) Add watch
 (Not required for teams of 4 people) Search watches

Logout
The “Regular menu” and its options should be accessible to regular midshipmen. The
“Administrator menu” and its options should be accessible only to midshipmen in command
positions and to active duty personnel.
3. Each option in the menu should link to a script that performs the appropriate action(s). Note
that all scripts should execute only if a valid member with the appropriate level of privilege is
logged in.
4. Upon logout, no information on the website is available, other than the page asking for login
information.
More details:
Here are some details about what each option in the menus presented to the user should accomplish:
 Change password: you should allow a user to change his/her password. You should ask
the user for the old and new password. The new password should be entered twice. If the
old password matches the password in the database, and the 2 new passwords are
identical, then the password in the database should be updated to the new password, and a
confirmation message should be displayed to the user. If for some reason the password
cannot be changed, an explicative error message should be displayed to the user.
 Add/Update Bio: This option should allow a user to add or update the bio information.
The form should be populated with the data already in the database (if any exists), and
allow the user to modify his/her bio. The latest data should be recorded in the appropriate
tables in the database. Note that you have to support some way of allowing the user to
add new sports, ECAs, hobbies, if his/her sport, ECA, hobby is not already in the
database.

Search bios: Allow the user to search for bio information, based on some criteria (it is
your choice of what kind of criteria you want to support). If no criteria are used, all
information from all bios should be displayed.

Add event: Allow a user to add events. Information about events should be stored in the
database, so it can be retrieved later.
Search events: Allow the user to search for events, based on some criteria (it is your
choice of what kind of criteria you want to support). If no criteria are used, all
information about all events should be displayed.


Options based on your innovative requirements: based on your requirements, create the
appropriate interface so a user can search/modify the database.

(Not required for teams of 4 people) Add watch: Allow the user to add information about
a new watch. The watch information should be stored in the database, so it can be
retrieved later.

(Not required for teams of 4 people) Search watches: Allow the user to search for watch
info, based on some criteria (it is your choice of what kind of criteria you want to
support). If no criteria are used, all information about all watches should be displayed.

Logout: After logout, no pages on the website should be accessible (even if the user hits
the back button), except the login page.
For all forms, you have to check that all required fields are filled out, and correct information is
entered (what “correct” means depends on the form). If there is an error on the page, an explicative
message should be displayed to the user, and the page with the filled information should be redisplayed.
TURN IN: Partial and final deliverables for Part 7 are detailed below.
Part 8: Project report (see below)
DELIVERABLES:
Tuesday, 17 February, 2009: Part 1- Project Responsibilities
Tuesday, 24 February, 2009: Part 2 – Requirements and ER model
Tuesday, 3 March, 2009: Part 3,4,5 - Transform ER model to relational model, verify tables are
normalized, write SQL to create the tables in MySQL.
Friday, 5 March, 2009: Part 6 - Write SQL to insert data into tables
Part 7: Web Interface:
Tuesday, 31 March, 2009 during lab: Demo to your instructor how a user can login into the system,
the appropriate menu is displayed and the user can change the password.
Tuesday, 14 April, 2009 during lab: Demo to your instructor how a user can insert/update bio, view
all bios.
Tuesday, 28 April, 2009 Complete Project Due, presentations in class
Report: Write a project report, addressed to your final client, the company officer, explaining
your work in this project. Include any extra credit, and any requirements that you did not meet.
Include a description of your innovative feature. For testing purposes, include the user name and
password for an admin user and a regular user. The project report should also serve as a user manual
on how to use the software you wrote, so screen shots and step-by-step instructions should be
included. The project report should be clear and well organized: have an introduction, main content,
and conclusions.
Presentation: Your team should be prepared to present your system in class. You will have
10-15 minutes to do so.
Feedback and Peer Evaluation: You will have to fill out an on-line survey to provide
feedback on the project and evaluate your team members. Peer evaluations will be kept confidential.
Electronic submission: the team leader needs to upload all files related to the project to
Project assignment on Blackboard.
Paper submission: Hard-copy of the project report should be submitted before class on the
due date.
Download