Вы находитесь на странице: 1из 2

School of Mathematics and Computer Applications

Data base management System PCA-302


Lab_Assignment:4

Question 1:

A database Management system is to be created for a Study Centre to keep track of


the students and the assignment records of the students. The database records the
date of submission of assignment, the date of evaluation, the date of viva, the date of
declaration of results, who evaluated the assignment, and the mark list description
in which the assignment marks were sent to Regional Office. The database also
maintains the details of the evaluators. Please perform the following activities for
the description as given above.

(a) Design the database with suitable integrity constraints and create the
database.
(b) Write the following queries using SQL:
(i) Find the List of the students who have not submitted even a single assignment.
(ii) Find the details of the evaluators by whom average marks awarded are more
than 70%.
(iii) Find the students who have passed more than 5 assignments.
(iv) Find the list of students who have not appeared in viva. Make and state
suitable assumptions, if any.

Question 2:

Consider the following employee database schema:

EMPLOYEE (ESSN, ENAME, DEPT_NO, SALARY)


DEPENDENT (ESSN, DEPEND_NAME, RELATION, DOB)
DEPARTMENT (DEPT_NO, DEPT_NAME, MANAGER)

(a) Create the appropriate database using Oracle.

(b) Perform following queries using SQL:

(i) Find details of dependents for employee having name AJAY.


(ii) Find the name of the manager of the department in which employee with ESSN
Code 5078 works.
(iii) Find the name of all employees whose age is less than 18 years.
(iv) Find the DOB of the son of the employee having employee code ESSN 5078.
(v) Find the details of the departments in which the employee having employee code
ESSN 5078 has worked.
Question 3:

Design a database for maintaining inventory of a retail shop. You are required to
perform the following activities for the maintenance of the above:

(a) Create the database.


(b) Write the following queries using SQL:
(i) Find the details of the items whose sales have exceeded Rs. 1 Lakh.
(ii) Find the details of the six items in terms of numbers/quantity in alphabetical
order that have got the maximum sale.
(iii) Find the names of those items that have an overall sale of 60% of what have
been procured.
(iv) Create a view of the items for the manager showing overall performance of the
week for each item.

Вам также может понравиться