Download 1 Introduction

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

SQL wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Concurrency control wikipedia , lookup

Functional Database Model wikipedia , lookup

PL/SQL wikipedia , lookup

Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

ContactPoint wikipedia , lookup

Transcript
COEN 178 PROJECT
Fall 2002
Phase 1 due Oct 20, 2003
Introduction
The purpose of this project is for you to analyze, design, implement, document and demonstrate a database
application. Your system must be implemented on Oracle using Java with the JDBC or using Perl. The
system must include the functionality described in the following document. The project will be done in two
phases and include a demonstration. This project can be done individually or in groups of two. A group of
two must implement additional functionality.
You have been hired to develop a database system for Northwest Music Store. The system you are to design
will be used to maintain and manage information about the sales and inventory. The Northwest Music Store
keeps an inventory of music in the form of cassette and compact disks in stock. The store also keeps track
of customer orders for music that are placed through an employee of the store. The system must be able to
 Let store employees query the database with regard to music in stock and music on order. This
should be a menu interface - the employees are not expected to know SQL and write queries. Thus
there will be a menu choice to search the inventory by title to see if a certain item is in stock.
 Let store employees generate an order for music on behalf of a customer. This includes taking
customer information (name and phone number) finding the appropriate vendor and creating an
order.
 Let store employees record the sale of one or more items. A receipt is printed (on the screen) for
every sale. The item sold is automatically removed from inventory and the sale is recorded for later
inclusion in a sales report.
 Let the store owner modify the database information about the employees and update inventory and
vendor information. This includes adding and changing information about employees and vendors
and increasing inventory due to a received order. The menu for the owner that allows access to
privileged functions (accessing employee records, etc.) should be password protected. The
password can be fixed - you do not need to let the owner change the password.
Problem Description
The store sells music in two different forms: cassette and compact disk. A given music title has several
attributes: title, artist, physical type (cassette, CD), price, UPC code, recording studio and year of release. An
employee can query the music in stock or on order by searching on the title, artist, or recording studio.
There is only one artist for a given title.
Music vendors (or distributors) can distribute several music titles, however, each music title can only be
distributed by one vendor. Vendor information (name, address, phone, contact person) must be maintained
in the database.
Employees can sell music to customers, order music from vendors, and generate sales reports. Employee
information (name, SSN, address, pay rate) is also maintained.
A sales report can be requested at any time. The request for a sales report has a beginning and ending date,
and all sales between those dates are printed (displayed). Information on the sales report includes: items
sold, date of sale, employee who made the sale, cost of each item, total sales for the period.
An order can be placed with a vendor when stock runs low or when special orders are placed for a
customer. A particular order may be for several items, but goes to only one vendor. This means that to
order items from two different vendors, two order forms must be filled out. Order information includes:
items ordered, date of order, vendor, and customer information if this is a special order (no customer
information if this is for restocking purposes). You may wish to assign a unique order# when an order is
placed.
Customer information (name, phone number) is maintained for customers placing special orders.
Groups of Two
Groups of two must implement additional functionality. You should include the calculation of sales tax in
all the sales and sales reports and allow the owner to set the password to something of his choice.
Phase One
In Phase One you are to analyze the requirements and create a detailed Entity-Relationship diagram,
showing the entities, relationships, cardinalities and constraints. Any diagramming tool may be used, but a
legend to identify the notation used, should be included. Translate your ER model to relational data model
by specifying schemas for the database. The process of translating the E-R model into a relational model
should be clearly shown with the resulting tables. Use SQL Data Definition Language to create and populate
the tables with information. You must decide what entities, attributes and relationships are necessary and
also what constraints are appropriate.
For the Phase One report, you should turn in:
1. Description of the system, assumptions that were made and any problems encountered.
2. Entity Relationship diagram with legend.
3. Database schemas.
4. Printout of the SQL script that creates and populates the tables.
Phase Two
In Phase Two you are to implement the program that is needed to perform the functions of the store
database. Your database application should be a single menu-driven program with a top-level menu that
leads to lower level menus. You will create the menus, write the SQL and Java code (or Perl) to perform the
functions on the database you created in Phase One. If you need to modify the database schemas you
created in Phase One, be sure to explain this in the Phase Two report.
Your system must enforce the constraints of the system. For example, you can’t record the sale of an item
that was not previously in inventory.
Demonstration and Final Report
Demonstrations will be held the 10th week of classes. In the demonstration, you will be expected to use
your system as if you were the owner or an employee to:
1. Sell several items to a customer and order an item for a customer
2. Search the database for an item in stock or on order.
3. Print a sales report.
4. Enter password, add an employee, then make a sale as that employee.
5. Other functions supported by the Northwest Music Store database system.
6. Other functions supported by the database system.
For the Phase Two report, you should turn in:
1. Description of the system capabilities and menus, ER diagram, changes from Phase One and
assumptions/problems.
2. Discussion of the integrity constraints and normalization of the database. Identify if the tables are in
3NF and BCNF. Clearly identify the primary keys and foreign keys.
3. Printout of the SQL script and source code that implements the database system.