Cie - 2 Lab

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

SONA COLLEGE OF TECHNOLOGY

DEPARTMENT OF IT
Database Management Systems Laboratory
Continuous Internal Test – 2

Date: 10/10/2018 Semester/Year: V/III

Given below are 10 sets of questions. Apply the hash function h(x)= ( Your Roll.No) mod 10 and
answer the set of questions in the corresponding bucket.

Create the following tables.


a. stu_details (reg_no, stu_name, DOB, address, city)
b. mark_details (reg_no, mark1, mark2, mark3, total)
0
(i)List all the total marks of the students who are all located in Chennai.
(ii)Write a pl/sqlprogram to find the address of a particular student and update the address in
the table using functions.
Create the following tables.
a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
1 b. dept_details (dept_no, dept_name, location).
(i)Select dept_no from dept_details that are not in emp_details using both the tables.
(ii) Write a pl/sql program to display the salary of a particular employee using functions.
Create the following table.
Phone_book(ph_no,name,door_no,street,place).
(i)Display all names along withph_no.
2
(ii)Add a column pin_no.
(iii) Write a procedure that will accept an integer and print the multiples of the number
(<100).
Create the following table.
emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, salary).
3 (i)Add a column dept_no(department number).
(ii) Write a PL/SQL program to find the greatest of 3 given numbers and write a function to
find the square of the greatest function.
Create the following table.
Customer (Cust_id, Cust_name, Addr, ph_no,pan_no).
4 (i)Update the addr where cust_name=’MATHIK’.
(ii) Write a pl/sql program to update the phone numbers of all customers whose names starts
with ‘D’.
Create the following table.
book(book_name,author_name,price,quantity).
(i)Retrieve the list of author_name whose third letter is ’a’ along with the book_name and
5
price.
(ii) Write a pl/sql program to find the summation of all odd numbers less than ‘n’ using for
loop.
6 Create the following tables.
a. assessment(reg_no,name, mark1, mark2, mark3, total)
b.dept_details (dept_no, dept_name, location).
(i) Display the dept_name along with student name and reg.no
(ii)Write a pl/sql program to find the name of the student who has scored the max mark
using procedures.
Create the following tables.
a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
b. dept_details (dept_no, dept_name, location).
7
(i)Display the emp_name and dept.name of the employee getting highest salary
(ii)Creating Trigger On Table Employ For Not Allowing Insert/Update/Delete Operations on
Friday.
Create the following table.
a. book (book_name,author,price,quantity).
(i).List the price of the book which one is between the price of 175 & 250.
8
(ii).Retrieve all the details from the table book whose author name starts with K.
(iii)Write a pl/sql program to find the largest of two numbers (x, y) and if x is the greatest
number then write a procedure to find yx.
Create the following tables.
a. stu_details (reg_no, stu_name, DOB, address, city)
9 b. mark_details (reg_no, mark1, mark2, mark3, total)
(i) Find the name of the student whose reg_no is’107’.
(ii)Write a pl/sql program to find the sum &avg marks of all the student using procedures.

*******************

You might also like