Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Oracle Lab Exercise for Day 3

ITEM
ITEM_NO
ITEM_DESCRIPTION
ITEM_GROUP
ITEM_FAMILY
ITEM_UNIT_OF_MEASURE
ITEM_UNIT_PRICE

NUMBER(5)
VARCHAR2(50)
VARCHAR2(10)
VARCHAR2(20)
VARCHAR2(5)
NUMBER

NOT NULL (PK)


NOT NULL
NOT NULL
NOT NULL
NOT NULL
NOT NULL

CUSTOMER_MASTER
CUST_ID
CUST_NAME
CUST_LOCATION

NUMBER(5)
VARCHAR2(50)
VARCHAR2(10)

NOT NULL (PK)


NOT NULL
NOT NULL

ORDER_HEADER
ORDER_ID
ORDER_DT
ORDER_CUST_ID

NUMBER(5)
DATE
NUMBER(5)

NOT NULL (PK)


NOT NULL
NOT NULL (FK)

ORDER_DETAIL
ORDER_ID
ITEM_NO
ORDER_QTY

NUMBER (5)
NUMBER(5)
NUMBER (5)

NOT NULL (PK)


NOT NULL (PK)
NOT NULL

Lab Questions Set1


List the customer details and their order details for the current fiscal year
List the item details which has been ordered for maximum value
Write a stored procedure to find the total value of all the orders received during a specific
period
Lab Questions Set2
Find the customer who has not placed any order so far
Generate the order report which contains the following
CUST_NAME
ITEM_NAME
QTY
TOTAL_COST
Write a PL/SQL function that generates the orders that has been placed for that item
group

You might also like