25 April 2016

CST363 Week 8

This week was all about the final project. Our group (BITsoft) built a database system for "Fish and Friends" which is America’s premiere aquarium supply store. Our database keeps track of important
business information as well as general store information like inventory levels and the status of fish tanks in our store.

Most interesting was the SQL menu system:

SET define on
SET verify off
SET heading off
SET echo off

PROMPT 'Welcome to Fish and Friends';
PROMPT
PROMPT '1: Product Lookup           | 2: Employee Lookup';
PROMPT '3: Sales Order Lookup       | 4: Customer Lookup';
PROMPT '5: Vendor Lookup            | 6: Tank Water Alerts';
PROMPT '7: Tank Water Quality Input | 8: Create Invoice';

ACCEPT input PROMPT 'Enter selection:';

col menu new_val menuVar

SET term off
SELECT
   CASE '&input'
      WHEN '1' THEN '@productLookup.sql' 
      WHEN '2' THEN '@employeeLookup.sql'
      WHEN '3' THEN '@salesLookup.sql'
      WHEN '4' THEN '@customerLookup.sql'
      WHEN '5' THEN '@vendorLookup.sql'
      WHEN '6' THEN '@tankstatusLookup.sql'
      WHEN '7' THEN '@tankstatusInput.sql'
      WHEN '8' THEN '@createInvoice.sql'
      ELSE '@queryFishStore.sql'
   END AS menu 
FROM DUAL;
SET term on

@&menuVar

No comments: