create table book(isbn int, title_name varchar(50), price int, quantity int, distid int); insert into book (isbn,title_name, price,quantity, distid) values(1234, 'HarryPotter', 359,1,0012); create table distributer( id int, name varchar(50),address varchar(50), contact int); insert into distributer(id,name,address,contact) values(001,'Keshav' , 'Bihar', 9807302979); insert into distributer(id,name,address,contact) values(002,'Rishav' , 'Jharkhand', 9804852979); insert into distributer(id,name,address,contact) values(003,'Hishav' , 'Himachal', 9807302789); insert into distributer(id,name,address,contact) values(004,'Hahav' , 'Gujarat', 9554302979); select * from Distributer; insert into distributer(id,name,address,contact) values(005,'Lishav' , 'Chennai', 8547302979); insert into distributer(id,name,address,contact) values(006,'Kegdav' , 'Andra', 9898702979); insert into distributer(id,name,address,contact) values(007,'Hamav' , 'Andaman', 9807307459); insert into distributer(id,name,address,contact) values(008,'Manaav' , 'Lakshwadeep', 9807822979); Alter table book add primary key (isbn); Alter table book add foreign key (distid) references distributer(id); insert into book(isbn, title_name ,price ,quantity ,distid) values(0010, 'Science', 250,1,0011); insert into book(isbn, title_name,price,quantity,distid) values(0011, 'SST', 252,1,0012); insert into book(isbn, title_name,price,quantity,distid) values(0012, 'Novel', 257,1,0013); insert into book(isbn, title_name,price,quantity,distid) values(0013, 'Eng', 240,1,0014); insert into book(isbn, title_name,price,quantity,distid) values(0014, 'Math', 230,1,0015); insert into book(isbn, title_name,price,quantity,distid) values(0015, 'Civiv', 220,1,0016); select * from book; insert into book(isbn, title_name,price,quantity,distid) values(0019, ' disMath', 237,1,0017); insert into book(isbn, title_name,price,quantity,distid) values(0016, 'MentalMath', 230,1,0018); insert into book(isbn, title_name,price,quantity,distid) values(0017, 'JuniorMath', 230,1,0019); insert into book(isbn, title_name,price,quantity,distid) values(0018, 'DAA', 2374,1,0020); insert into book(isbn, title_name,price,quantity,distid) values(0020, 'DBMS', 2300,1,0021); create table customer (cust_id int, cut_name varchar(50), contact int, address varchar(50)); insert into customer (cust_id, cut_name, contact, address) values (100, 'Keshav' , 9988293427,'Samsangali'); insert into customer (cust_id, cut_name, contact, address) values (101, 'Rshav' , 9788293427,'Samsanroad'); insert into customer (cust_id, cut_name, contact, address) values (102, 'Heshav' , 9888293427,'Samsanmohalla'); insert into customer (cust_id, cut_name, contact, address) values (103, 'Mishav' , 9998293427,'Samsanchowk'); alter table customer add primary key(cust_id); insert into customer (cust_id, cut_name, contact, address) values (104, 'Loshav' , 9989295427,'Samsanghar'); insert into customer (cust_id, cut_name, contact, address) values (105, 'Hirathakur' , 9938293427,'Samsanfloor'); insert into customer (cust_id, cut_name, contact, address) values (106, 'thankurshav' , 9488293427,'Samsanroom'); select *from customer; insert into customer (cust_id, cut_name, contact, address) values (107, 'Kegtav' , 9988263427,'Samsan'); insert into customer (cust_id, cut_name, contact, address) values (108, 'wfchav' , 9988213427,'Zameenkeniche'); insert into customer (cust_id, cut_name, contact, address) values (109, 'KWeshav' , 8888293427,'ThodRIGHT'); create table orders(orderno int, id int, isbn int, payment int); insert into orders( orderno, id, isbn, payment) values(0001, 1212,0003, 1200); select * from orders; insert into orders( orderno, id, isbn, payment) values(0002, 1213,0004, 1201); insert into orders( orderno, id, isbn, payment) values(0003, 1214,0005, 1202); insert into orders( orderno, id, isbn, payment) values(0004, 1215,0006, 1203); insert into orders( orderno, id, isbn, payment) values(0005, 1216,0007, 1204); insert into orders( orderno, id, isbn, payment) values(0006, 1217,0008, 1205); insert into orders( orderno, id, isbn, payment) values(0007, 1218,0009, 1206); insert into orders( orderno, id, isbn, payment) values(0008, 1219,0010, 1207); insert into orders( orderno, id, isbn, payment) values(0009, 1220,0011, 1208); insert into orders( orderno, id, isbn, payment) values(0010, 1221,0012, 1209); alter table orders add constraint Customer_id primary key(id,isbn);