Lab Exercise 1

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

Centre for Computer Science & Technology

Software Lab-II (CST.556) Lab Exercise: 1 A) Define the schema for the following databases with specific data type and constraints, the table name and its fields name are to be taken from database description which are given below : Q.1. A database is being constructed for storing sales information system. A product can be described with a unique product number, product name, selling price, manufacturer name. The product can sale to a particular client and each client have it own unique client number, client name, client addresses, city, pin code, state and total balance to be required to paid. Each client order to buy product from the salesman. In the order, it has unique sales order number, sales order date, client number, salesman number (unique), billed whole payment by the party or not and its delivery date. The salesman have the name, addresses, city, pin code, state, salary of the sales man, delivery date, total quantity ordered, product rate. Q.1.1. Write the SQL queries for the following (a) Retrieve the list of names and the cities of all the clients. (b) List the various products available. (c) Find the names of all clients having a as the second letter in their names. (d) List all the clients who are located in TEZPUR. (e) Find the products whose selling price is greater than 2000 and less than or equal to 5000 (f) Add a new column NEW_PRICE into the product_master table. (g) Rename the column product_rate of Sales_Order_Details to new_product_rate. (h) List the products in sorted order of their description. (i) Display the order number and date on which the clients placed their order. (j) Delete all the records having delivery date before 25th August, 2008. (k) Change the delivery date of order number ON01008 to 16-08-08 (l) Change the bal_due of client_no CN01003 to 1200 (m)Find the product with description as HDD1034 and DVDRW (n) List the names, city and state of the clients not in the state of ASSAM (o) List of all orders that were cancelled in the month of March.

You might also like