SQL Lab Assignment On Normalization
SQL Lab Assignment On Normalization
ASSIGNMENT-I
Q1.
Create the following tables:
i. client master
columnname datatype size
client_no varchar2 6
name varchar2 20
address1 varchar2 30
address2 varchar2 30
city varchar2 15
state varchar2 15
pincode number 6
bal_due number 10,2
ii. Product_master
Columnname datatype size
Product_no varchar2
Description varchar2
Profit_percent number
Unit_measure varchar2
Qty_on_hand number
Reoder_lvl number
Sell_price number
Cost_price number
Q2-
Insert the following data into their respective tables:
Clientno Name city pincode state bal.due
0001 Ivan Bombay 400054 Maharashtra 15000
0002 Vandana Madras 780001 Tamilnadu 0
0003 Pramada Bombay 400057 Maharashtra 5000
0004 Basu Bombay 400056 Maharashtra 0
0005 Ravi Delhi 100001 Delhi 2000
0006 Rukmini Bombay 400050 Maharashtra 0
Q3:- On the basis of above two tables answer the following Queries :
1. Find out the names of all the clients.
2. Retrieve the list of names and cities of all the clients.
6. Find the products with description as ‘1.44 drive’ and ‘1.22 Drive’.
7. Find all the products whose sell price is greater then 5000.
8. Find the list of all clients who stay in in city ‘Bombay’ or city ‘Delhi’ or ‘Madras’.
9. Find the product whose selling price is greater than 2000 and less than or equal to 5000.
10. List the name, city and state of clients not in the state of ‘Maharashtra’