67% found this document useful (3 votes)
2K views3 pages

DBMS Lab Question Bank

The document contains questions related to SQL, PL/SQL, XML, and application development based on sample databases for students and employees. It includes questions to create tables, add constraints, insert records, perform various update, delete, and retrieval queries, exception handling, functions, triggers, and developing applications to interact with the databases. The questions cover skills related to relational databases, programming, and XML.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
2K views3 pages

DBMS Lab Question Bank

The document contains questions related to SQL, PL/SQL, XML, and application development based on sample databases for students and employees. It includes questions to create tables, add constraints, insert records, perform various update, delete, and retrieval queries, exception handling, functions, triggers, and developing applications to interact with the databases. The questions cover skills related to relational databases, programming, and XML.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SET-1 QUESTION BANK

STUDENT (USN, SName, Address, Age, Phone, Gender)

SEMSEC (SSID, Sem, Sec)

CLASS (USN, SSID)

SUBJECT (Subcode, Title, Sem, Credits)

INTMARKS (USN, Subcode, SSID, UT1, UT2, MT1, MT2)

Answer the following based on above given relation

1) Create table on Student, Class, Subject.


2) Alter relation with any key constraint / integrity constraint
3) Insert 3 records into tables above
4) Update query on Student
5) Update SEMSEC to SEM=3 for SSID=7
6) Delete a Student with USN=8849
7) Update Credits=3 for Subject Title = DBMS
8) Delete a student with USN=5674
9) Delete Subject with Subcode=1151CS501
10) Saving and Undoing a transaction
11) alter Student table to add foreign constraint using sql command

1) Find how many number of Students reside in location Hyderabad.


2) List all the records of male students
3) Display all the Subjects with 3 credits
4) Display the UT1 marks of a selected student, if the USN is given by the user.
5) Display details of student whose name is AMIT and age greater than 20
6) Retrieve average age of all students
7) Retrieve number of students whose MT1 marks is less than 15
8) Retrieve total marks of students which is greater than >40

1) Retrieve the marks of all students reside in Hyderabad


2) Display all the Students who reside in Delhi and is above 18 years of age.
3) Display all the subject titles which have students with age greater than 19.
4) Display the details of every class and student
5) List all the records consisting of SName, Subcode of all female students.
6) Display all students with a Name starting with "a":
7) Display all students with a Name Ending with "a":
8) Display all students with a Name that have "o" in the second position:
9) write SQL statement selects all students with a Name that starts with "a" and ends with "d"
10) Write a query to display the name for those students who registered for SSID 56.
11) Write a query to display the USN, Sname, Agefor all students in the sem=2
12) Write a query to display all the information of the students whose age is within the range 17 and 20

1. Write a program in PL/SQL to print the prime number


2. Write a program in PL/SQL to print the Armstrong number
3. Write a function to find odd numbers in USN (student id )
4. Write a trigger to insert contact with 10 digit or not
5. Write a exception to find number even numbered SSID
6. Write a exception handling to find number entered with 10 digit or not

Develop Java based / oracle form/report builder based application for display the contents of
1. Student table
2. Subject table
3. IntMarks table

1. Create a well-formed XML document containing details of a Student like: USN, Sname, Address
2. Create a well-formed XML document containing details of a Subject like: Subcode, Title, Credits
3. Create a well-formed XML document containing details of IntMarks like: USN, Subcode, UT1, UT2,
MT1, MT2
4. Develop Java based / oracle form/report builder based application for the updating and retrieving records
from database.

SET-2 QUESTION BANK

Company Database:
EMPLOYEE (SSN, Name, Address, Sex, Age, Salary, SuperSSN, DNo)
DEPARTMENT (DNo, DName, MgrSSN, MgrStartDate)
DLOCATION (DNo,DLoc)
PROJECT (PNo, PName, PLocation, DNo)
WORKS_ON (SSN, PNo, Hours)

Answer the following based on above given relation

1) Create table on Employee, Department, Project.


2) Alter relation with any key constraint / integrity constraint
3) Insert 3 records into tables above
4) Update query on Employee
5) Update MgrStartDate to 22-June 2021 for DNo 3
6) Delete an Employee with SSN=1564
7) Update Works_On hours to 5hours for SSN=5463
8) Delete a department with MgrStartDate before 01-Jan-1996
9) Delete Project with Pno=754
10) Saving and Undoing a transaction
12) alter department table to add foreign constraint using sql command

1) Find how many number of Projects in location Hyderabad.


2) List all the records of male employees
3) Display all the Departments. With MgrStartDate> 01-Dec-2020
4) Display the Department details of a selected employee, if the SSN is given by the user.
5) Display details of employee whose name is AMIT and salary greater than 50000
6) Retrieve average salary of all employee
7) Retrieve number of employee whose salary less than 15000
9) Retrieve total salary of employee which is greater than >12000

1) Retrieve the detail of Projects whose ProjectLocation is Hyderabad


2) Display all the Employees who reside in Delhi and is below 40 years of age.
3) Display all the projects which have employees with age greater than 40
4) Display the details of employee who stays in Haryana
5) List all the records consisting of EmployeeName, DepartmentNamewhose department location is
Chennai.
6) Display all employee name with a Name starting with "a":
7) Display all employee details with a Name Ending with "a":
8) Display all employee name with a Name that have "o" in the second position:
9) Write SQL statement to select all employee with a Name that starts with "a" and ends with "d"
10) Write a query to display the name for those employees whose Department MgrStartDate is 12-Nov-
2020.
11) Write a query to display the Emp number, name, salary and department name for all employees in the
HR Department.
13) Write a query to display all the information of the employees whose salary is within the range 12000
and 35000

1. Write a program in PL/SQL to print the prime number


2. Write a program in PL/SQL to print the Armstrong number
3. Write a function to find odd numbers in Department Number
4. Write a trigger to insert contact with 10 digit or not
5. Write a exception to find number even numbered ProjectNumber
7. Write a exception handling to find number entered with 10 digit or not

Develop Java based / oracle form/report builder based application for display the contents of
4. Employee table
5. Department table
1. Project table

5. Create a well-formed XML document containing details of a Project like: Pno, Pname, PLocation
6. Create a well-formed XML document containing details of a Department like: DNo, DName, MgrSSN
7. Create a well-formed XML document containing details of a Employee like: , SSN, Name, Sex, Salary
1. Develop Java based / oracle form/report builder based application for the updating and retrieving records
from database.

You might also like