Practical 2
Practical 2
Practical 2
IT SU245148
Table 1 : Client_Master
create table Client_Master(
Client_No varchar(6) constraint pk_clientno primary key,
Name varchar2(20) not null,
Address_1 varchar2(30),
Address_2 varchar2(30),
City varchar2(15),
Pincode number(8),
State varchar2(15),
Baldue number(10,2),
constraint ck_clientno check (Client_No like 'C%')
);
Table 2: Product_Master
create table Product_Master(
Product_No varchar(6) constraint pk_productno primary key,
Description varchar(15) not null,
Profitpercent number(4,2) not null,
Unitmeasure varchar2(10) not null,
QtyonHand number(8) not null,
ReorderLVL number(8) not null,
Sellprice number(8,2) not null constraint ck_sellprice check (Sellprice > 0),
Costprice number(8,2) not null constraint ck_costprice check(Costprice > 0)
);
1
VANSH SHAH MSC.IT SU245148
Table 3: Salesman_Master
2
VANSH SHAH MSC.IT SU245148
Table 3: Sales_Order_Details
insert into Client_Master values ('C00001', 'Ivan Bayross', null, null, 'Mumbai',
400054, 'Maharashtra', 15000);
insert into Client_Master values ('C00005', 'Hansel Colaco', null, null, 'Mumbai',
400060, 'Maharashtra', 2000);
3
VANSH SHAH MSC.IT SU245148
insert into Product_Master values ('P00001', 'T-Shirts', 5, 'Piece', 200, 50, 350,
250);
insert into Product_Master values ('P0345', 'Shirts', 6, 'Piece', 150, 50, 500,
350);
insert into Product_Master values ('P06734', 'Cotton Jeans', 5, 'Piece', 100, 20,
600, 450);
insert into Product_Master values ('P07865', 'Jeans', 5, 'Piece', 100, 20, 750,
500);
insert into Product_Master values ('P07868', 'Trousers', 2, 'Piece', 150, 50, 850,
550);
insert into Product_Master values ('P07885', 'Pull Overs', 2.5, 'Piece', 80, 30,
700, 450);
insert into Product_Master values ('P07965', 'Denim Shirts', 4, 'Piece', 100, 40,
350, 250);
insert into Product_Master values ('P07975', 'Lycra Tops', 5, 'Piece', 70, 30, 300,
175);
4
VANSH SHAH MSC.IT SU245148
insert into Product_Master values ('P08865', 'Skirts', 5, 'Piece', 75, 30, 450,
300);
5
VANSH SHAH MSC.IT SU245148
6
VANSH SHAH MSC.IT SU245148