Sei sulla pagina 1di 2

Department : Civil Engineering Section : B Spring 2018

CSEN – 3216 : DBMS LAB ASSIGNMENT SHEET - 1

Name:

Enrollment Number:

Instruction to Students
1. Each student is required to carry a copy of this handout to the lab every day. Without the handout, a
student may be refused entry to the lab and/or marked absent for the particular lab.
2. All students are required to fill up their name and enrollment number on the sheet.
3. All students are required to complete all the SQL queries in the exercise above. Once you correctly
execute a query, get it signed by the instructor or assistant(s).
4. You may complete the queries in any order. However, you are encouraged to execute them in the
chronological order as provided.
5. You should finish the work within next 3-4 labs.

CSEN – 3216 : DBMS LAB ASSIGNMENT SHEET - 1 Page 1 of 2


Department : Civil Engineering Section : B Spring 2018

Sales Information System


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 :

A Product can be described with a {unique product number, product name, manufacturer name, product rate, selling
price, product description}. The product can sale to a particular Client and each client have its own {unique client
number, client name, client addresses, city, pin code, state and total balance} to be required to be paid. Each client may
order to buy product from a Salesman, who may be identified by {unique id number, name, addresses, city, pin code,
state, and salary}. 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, delivery date, total quantity ordered, date of cancel the order}.

Q 1.) Draw the ER Model to represent the above scenario.

Q 2.) Write the SQL queries for the following :


i. Retrieve the list of names and the cities of all the clients.
ii. List the various products available.
iii. Find the names of all clients having ‘a’ as the second letter in their names.
iv. List all the clients who are located in TEZPUR.
v. Find the products whose selling price is greater than 2000 and less than or equal to 5000
vi. Add a new column NEW_PRICE into the product_master table.
vii. Rename the column product_rate of Sales_Order_Details to new_product_rate.
viii. List the products in sorted order of their description.
ix. Display the order number and date on which the clients placed their order.
x. Delete all the records having delivery date before 25th August, 2008.
xi. Change the delivery date of order number ON01008 to 16-08-08
xii. Change the bal_due of client_no CN01003 to 1200
xiii. Find the product with description as ‘HDD1034’ and ‘DVDRW’
xiv. List the names, city and state of the clients not in the state of ‘ASSAM’
xv. List of all orders that were canceled in the month of March.
Q 3.) Record the Output of each SQL query above.

CSEN – 3216 : DBMS LAB ASSIGNMENT SHEET - 1 Page 2 of 2

Potrebbero piacerti anche