Your SlideShare is downloading. ×
Functional Requirements
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Functional Requirements

659

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
659
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Functional Requirements 1 Menus The menu system will be divided into Customers, Sales, Inventory, and Maintenance. Employee table: db2+>create table employee db2 " import from 'empfile' of del insert into employee" (empID UNIQUE SMALLINT NOT NULL, empNAME VARCHAR(9), empJOB CHAR(5) CHECK (JOB IN ('Sales', 'Mech','Staff')), SALARY DECIMAL(7,2), SALES SMALLINT NOT NULL , PRIMARY KEY (empno) ) CREATE INDEX ID ON EMPLOYEE (empno ASC) Customer create table customer (CUST_ID SMALLINT NOT NULL, CUST_NAME VARCHAR(9), COMM DECIMAL(7,2), PRIMARY KEY (ID) ) The customer module will create a table of customers along with tracking previous customer's transactions including financing. Create Customer: this will add an entry in a Customer table including name, address, and a unique identifier to track future records. Update Customer: this will allow for the updating of fields in the Customer table. This will include the customer name, address and phone numer.
  • 2. Make Payment: This will add a lease payment to the customers account. Check Customer: Query for outstanding customer debts, remaining lease, and previous purchases. Book Test Drive: Add an entry in the Schedule table with the salesperson id, date, customer id, and customer number to confirm or cancel the booking. Check if the maintenance department has a conflicting booking. Test Drive Schedule: Outputs upcoming test drive bookings from the schedule table. Sales The sales module tracks the sales of each salesperson for the purposes of the payroll department. It also tracks customers purchase to facilitate maintenance and warranty repair when required. Queries will be made to see employee sales records, and vehicle popularity for ordering of stock. The menu will include: create table sales (saleid unique smallint not null, custid smallint, vechid smallint, downpayment decimal(5,2), 1. Add Sale: this will add an entry in the Sales table with transaction id, customer number, salesperson number, vehicle number, warranty selection, and value. It will also remove the vehicle from the Inventory table. 2. Take Deposit: Take downpayment on vehicle and make vehicle unavailable for sale. UPDATE sales SET deposit = 600 3. Return Deposit: Return deposit to customer and make vehicle available again. 4. Add Trade: This will add an entry to the Lot (see Add Vehicle under the Inventory Description) and add to the customer balance in the Sales table using the transaction id for a specific sale. Trades will not be considered if the lot is full. 5. Add Lease: This will add an item to the Sales table similar to Add Sale, but the monthly rate and remaining payments are linked to the customer record. 6. Return Lease: Adds the leased vehicle back to the inventory and calculates the balance due by the customer.
  • 3. 7. Lease Quote: Query the database to calculate the monthly payments required with a given downpayment. 8. Add Warranty: This will add a warranty to a previous purchase as long as the purchase was within the last year. Add 5% to purchase cost. 9. Monthly Sales: Output a list of each employee by number by looking up the total sales in the Sales table and displaying their count. SELECT empid from EMPLOYEE where JOB = 'Sales' Inventory The inventory module lists types of vehicles with an identifier for cross referencing. Queries will be made to find specific vehicles by type, make, year, and warranty. The inventory is restricted to 100 vehicles according to our lot size. The menu will include: create table inventory (vehicleid unique smallint, vclass char(1), makername char(10), model char(10, year smallint, price integer, condition char(1), mileage integer) create table supplier (ID SMALLINT NOT NULL. SUPNAM VARCHAR(15)) db2 " import from 'supplyfile' of del insert into supplier" create table order
  • 4. (oderid unique smallint not null, supplier char(10), model char(15), year smallint, qty smallint, orderon DATE, recievedon DATE) 1. Add Vehicle: This will add an entry in the Inventory table with the vehicle class (van, truck or car), manufacturer, model, model year, odometer reading along with a unique identifier. 2. Edit Vehicle: Output the vehicle information according to the vehicle id number, and then receive requests for changes. 3. Search Manufacturer: Output all entries in the Inventory of a specific manufacturer. SELECT * from inventory where makername = 'pontiac' 4. Search Price Range: Find all vehicles in a particular price range. SELECT * from inventory where price (BETWEEN 100 AND 100000) 5. Search Class: Find all Vans/Trucks/Cars. SELECT * from inventory where vclass = 'c' 6. Search New Vehicles: Find all new vehicles. SELECT * from inventory where condition = 'n' 7. Search Used Vehicles: Find all used vehicles. SELECT * from inventory where condition = 'u' 8. Search Year Range: Find all vehicles in a particular year range. SELECT * from inventory where year (BETWEEN 1999 AND 2010)
  • 5. 9. Order Vehicle: This will order a particular vehicle if there is a customer request or to restock after purchases. This will be added to the Order table till the vehicle is recieved when it will be moved to the inventory. INSERT INTO order values(oderid,supplier, model, year, qty) 10. Recieve Order: This will add an entry to the inventory and fill the Order table. 11. Outstanding Order: Displays all products on order. SELECT * from order where recievedon = NULL A method for combining 5-8 should be possible to refine a search for particular customer requests. Maintenance The maintenance module will track the maintenance schedule of the vehicles sold, inspect trades, and order parts for maintenance. The menu will include: create table schedule (id smallint not null, vehicleid smallint, empid smallint, booking DATE) create table parts (partid unique smallint not null, supplier char(10), model char(15), qty integer) 1. Check Warranty: Find the warranty status in the Sales table according to vehicle id. SELECT warranty from sales where vehcleid = '12345'
  • 6. 2. Inspect Vehicle: Adds a booking on the Schedule table with the vehicle id, employee id, and date. INSERT INTO schedule values(id, vehicleid, empid, booking) 3. Book Maintenance: Add entry into the Schedule table, with the vehicle id, employee id, date, and customer number. INSERT INTO schedule values(id, vehicleid, empid, booking) 4. Vehicle History: Output previous repair work done on vehicle. SELECT * from schedule where vehicleid = '12345' 5. Order Part: This will add part to the Order table and will be linked to a work order in the maintenance schedule. INSERT INTO order values(oderid,supplier, partname,qty, orderon)

×