Académique Documents
Professionnel Documents
Culture Documents
UNIVERSITY-AFRICA
COURSE TITLE
: DATABASE MANAGEMENT
SYSTEMS
COURSE CODE
: IST 4030
SEMESTER/YEAR
: SPRING/2013
TASK
: BEAUTY PRODUCTS
ENTERPRISE SYSTEM
PRESENTED TO
BY
: SHADRACK BENARD
KWEINGOTI
ID NO
: 631448
REP NO (PK)
CUST_NO
NAME
NAME
ADDRESS
REP_NO (FK)
SALES REP
CUSTOMER
Represents
Places
ORDER
NO (FK)
ORDER
ITEM
ORDER
Contains
Has
BEAUTY
PRODUCT
ITEM
APPLIANCE
SPORTING
GOODS
NAME
CUSTOMER
CUST NO (PK)
NAME
ADDRESS
REP NO (FK)
ORDER
ORDER NO (PK)
ORDER DATE
CUST NO (FK)
ORDER ITEM
ORDER NO (FK)
ITEM NO (FK)
NUM ORDERED
QUOTED PRICE
ITEMS
ITEM NO (PK)
DESCRIPTION
PRICE
LOGIN
USERNAME
PASSWORD
PRIVILEDGE
ADMIN
MANAGER
SALES REPS
SALES
REPRESENTATIVES
TABLE
ALL
SELECT,NSERT,
UPDATE,DELETE
NONE
CUSTOMERS
TABLE
ORDERS
TABLE
ALL
SELECT,UPDATE
DELETE
SELECT
INSERT
UPDATE
ALL
SELECT
ORDER
ITEMS
TABLE
ALL
SELECT
SELECT
INSERT
UPDATE
SELECT
INSERT
UPDATE
ITEMS
TABLE
ALL
SELECT,INSERT
UPDATE,DELETE
SELECT
INSERT
UPDATE
1.2. IMPLEMENTATION
1.2.1. DATABASE DESIGN USING ORACLE
A. SEQUENCE USED
I.)
CREATE SEQUENCE "REP_NO_SEQ" MINVALUE 1001 MAXVALUE 2000 INCREMENT BY 100 START
WITH 2001 CACHE 20 NOORDER NOCYCLE ;
II.
Items Table:
III.
Login Table:
IV.
Order Table
V.
VI.
Items Table
VII.
VIII.
D. VIEWS USED:
i.)
Items_View
This view allows the person to view the existing items and their details to view the existing items in case
they want to refer to the items. CREATE OR REPLACE FORCE VIEW "ITEMS_VIEW" ("ITEM_NO",
"DESCRIPTION", "PRICE") AS select item_no,description,price from items;
ii.)
Order_Items_View
This view allows the person to view the existing ordered items and their details for reference and eventual
use. CREATE OR REPLACE FORCE VIEW "ORDER_ITEMS_VIEW" ("ITEM_NO", "ORDER_NO",
"NUMBER_ORDERED", "QUOTED_PRICE", "TOTAL_COST") AS select
order_no,item_no,num_ordered,quoted_price,total_cost from order_items;
iii.)
Sales_Rep
This view is used to view the existing sales representatives and their details for reference. CREATE OR
REPLACE FORCE VIEW "SALES_REP" ("NAME", "REP_NO") AS select name,rep_no from
sales_reps;
iv.)
Order_View
This view is used to view the order items existing in the system for use and reference. CREATE OR
REPLACE FORCE VIEW "ORDER_VIEW" ("ORDER_NO", "ORDER_DATE", "CUSTOMER_NO")
AS select order_no,order_date,cust_no from orders;
E. PROCEDURES USED:
i.)
Items_delete procedure
create or replace procedure items_delete
as
begin
delete from items
where item_no=408;
end;
This procedure deletes the items whose item no is 408 from the items table.
ii.)
Update_price procedure
This trigger raises an error quoted price below 1500 not allowed when the price of quoted price is
below 1500, and it applies on the order_items table.
ii.)
least_item_price
This trigger raises an error Price below 300 are not allowed when the item price entered in the items
table is below 300.
H. INDEXES ON THE TABLES
i.)
CUSTOMERS TABLE
CREATE INDEX "CUSTOMERS_IDX1" ON "CUSTOMERS" ("CUST_NO", "NAME", "REP_NO")
;
ii.)
ITEMS TABLE
b.) EXCLUSIVE LOCKS ON THE TWO TABLES CUSTOMERS & ORDERS THAT USER
SYSTEM HAS PRIVILEGES TO ACCESS THEM:
i.
ii.
1.2.2.
Diagram 3. CUSTOMERS FORM Customer No, Customer Name, Address, and Sales Rep No
Diagram 5. ORDER ITEMS FORM: Item No, Order No, Number Ordered, Quoted Price, Total
10
Diagram 7. SALES REPRESENTATIVE FORM: Sales Rep No, Sales Rep Name
11
2.0.
DISCUSSION
Some of the challenges I faced was the limited time I had to plan for, design, and implement the system.
However my learning process was improved through development, in short iterative and consultation
cycles. Overall, I can say that doing this project has been a remarkable learning experience as I have
learnt design and implementation concepts that I can apply in future with emphasis to oracle database and
programming in Java. Oracle has proved to be one of the best database platforms, since one can easily
understand and use it.
3.0. SUMMARY
Beauty Products Enterprise System is a system that aims to place the companys data on a computer
managed by fully featured Data Base Management System, hence ensuring that the data is more current
and more accurate than the present manual system. This will in turn enable the companys management to
generate reports from the database which are more reliable without human error hence accurate. This
system is user friendly, saves time, efficient, easy to use and manage, hence its of great importance. It
has been implemented using Java and SQL which are both cross-platform so as to enhance portability. I
would recommend this system to other institutions and schools of higher learning and welcome any ideas
from other system designers in order to improve the system.
12