0% found this document useful (0 votes)
57 views15 pages

BSC CS-lab-2023

This document outlines the practical examination for the Database Design Lab course. It consists of 9 sets, each with 2 questions related to SQL and PL/SQL programming. The questions involve creating tables, inserting/deleting records, updating fields, writing queries using operators, triggers, procedures and cursors to perform calculations related to student/employee data. Students have 3 hours to complete any 2 sets of their choice out of the 9 sets worth a total of 100 marks.

Uploaded by

Kirubai D
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
0% found this document useful (0 votes)
57 views15 pages

BSC CS-lab-2023

This document outlines the practical examination for the Database Design Lab course. It consists of 9 sets, each with 2 questions related to SQL and PL/SQL programming. The questions involve creating tables, inserting/deleting records, updating fields, writing queries using operators, triggers, procedures and cursors to perform calculations related to student/employee data. Students have 3 hours to complete any 2 sets of their choice out of the 9 sets worth a total of 100 marks.

Uploaded by

Kirubai D
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/ 15

Bishop Heber College (Autonomous), Tiruchirappalli-620 017

DEPARTMENT OF COMPUTER SCIENCE


End Semester Practical Examination – APRIL – 2023
Semester-IV
Class: II B.Sc. CS AIDED Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 1

1. Create a student table which contains the following columns such as Rollno, Name,
Class, Dept, Year.
(a) Rollno needs to be set as Primary Key
(b) Display the structure of the table
(c) Add one more column to the table
(d) Delete one column from the table
(50
Marks)

2. Write a PL/SQL program to calculate the Electricity Bill using Cursors. (50
Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - APRIL – 2023
Semester-IV
Class: II B.Sc. CS AIDED Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 2

1. Create a student table which contains the following columns such as Rollno, Name,
Class, Dept, Year.
(a) Rollno needs to be set as Primary Key
(b) Insert atleast 5 records into the table
(c) Delete all the student records of those who are doing third year
(d) Do some changes on a particular record of the table
(e) Delete one column from the table (50 Marks)

2. Write a PL/SQL program to calculate Student Grade using cursors.


(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - APRIL – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 3

1. Create an Employee table which contains the following columns such as Empno,
EmpName, Dept, Salary and Date of Joining.
(a) Empno needs to be set as Primary Key
(b) Insert atleast 5 records into the table
(c) Delete all the employee records whose salary between 8000 and 10000
rupees
(d) Change the salary of a particular employee who belongs to production
department
(e) Delete some records from the table
(50
Marks)

2. Write a PL/SQL program to implement the Trigger for displaying the grade of a
student.
(50
Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - APRIL – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 4

1. Create the following tables with the mapping given below.


a. stu_details (reg_no, stu_name, DOB, address, city)
b. mark_details (reg_no, mark1, mark2, mark3, total)
(i) Alter the table mark_details to add a column average with data type as long.
(ii) Display the months between the DOB and till date.
(iii) Using alter command drop the column address from the table stu_details.
(50
Marks)
2. Write a PL/SQL program to indicate an Invalid Condition using Trigger.
(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - APRIL – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 5

1. Create the following tables with the mapping given below.


a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
b. dept_details (dept_no, dept_name, location).
(i) Display the months between the doj and till date.
(ii) Alter the table emp_details to add a primary key constraint on emp_no.
(50 Marks)

2. Write a PL/SQL program to find the minimum of three numbers using procedures.
(50
Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - APRIL – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 6

1. Create the following table with the mapping given below.

a. Emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no,


salary).
(i) Create a view emp1 from emp_details such that it contains only emp_no and
emp_name.
(ii) Arrange the records of emp_details table in descending order using emp_no
column
(iii) Write SQL query for aggregate functions (50 Marks)

2. Write a PL/SQL program for updating salary using triggers and procedures
(50
Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - APRIL – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 7

1. (a) Creating, Updating and inserting into databases using simple queries.
(b) Use Select statement and perform
(i) AND, OR, NOT operators, WHERE clause
(ii) UNION, INTERSECTION, MINUS
(iii) Sorting and Grouping (50 Marks)

2. Write a PL/SQL program to design and implement a Student Information system


(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 8

1. Create the following table with the mapping given below


(a) emp_details (emp_no, emp_name, DOB, address, doj, mobile_no,
dept_no, salary).
(i) Create Nested Queries using SQL
(ii) Create Index using emp_no column
(iii) Create a view which contains emp_no and emp_name
(50
Marks)

2. Write a PL/SQL program to for Bonus calculation using Procedures. (50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 9

1. Create the following tables with the mapping given below.


a emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no,
salary).
b dept_details (dept_no, dept_name, location).
(i) Query the database with sub queries
(ii) Join the emp_details and dept_details tables and fetch the records
(50 Marks)

2. Write a PL/SQL program to design and implement a Student Information system

(50
Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 10

1. Create the following table


(a) emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no,
salary).
(i) Write SQL query for any 5 built-in functions
(ii) Write SQL query for aggregate functions (50 Marks)

2. Write a PL/SQL program for Bonus calculation using Procedures.


(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 11
1. Create a student table which contains the following columns such as Rollno, Name,
Class, Dept, Year.
(i) Rollno needs to be set as Primary Key
(ii) Insert atleast 5 records into the table
(iii) Delete all the student records of those who are doing third year
(iv) Do some changes on a particular record of the table
(v) Delete one column from the table
(50 Marks)
2. Write a PL/SQL program to calculate the Electricity Bill using Cursors.

(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination – MARCH - 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 12

1. Create a student table which contains the following columns such as Rollno, Name,
Class, Dept, Year.
(a) Rollno needs to be set as Primary Key
(b) Display the structure of the table
(c) Add one more column to the table
(d) Delete one column from the table (50 Marks)

2. Write a PL/SQL program to find the minimum of three numbers using procedures.

(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 13

1. Create an Employee table which contains the following columns such as Empno,
EmpName, Dept, Salary and Date of Joining.
(a) Empno needs to be set as Primary Key
(b) Insert atleast 5 records into the table
(c) Delete all the employee records whose salary between 8000 and 10000
rupees
(d) Change the salary of a particular employee who belongs to production
department
(e) Delete some records from the table (50 Marks)

2. Write a PL/SQL program for updating salary using triggers and procedures

(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 14

1. Create the following tables with the mapping given below.


a. stu_details (reg_no, stu_name, DOB, address, city)
b. mark_details (reg_no, mark1, mark2, mark3, total)

(i) Alter the table mark_details to add a column average with data type as long.
(ii) Display the months between the DOB and till date.
(iii) Using alter command drop the column address from the table stu_details.
(50 Marks)

2. Write a PL/SQL program to find the minimum of three numbers using procedures.

(50 Marks)
Bishop Heber College (Autonomous), Tiruchirappalli-620 017
DEPARTMENT OF COMPUTER SCIENCE
End Semester Practical Examination - MARCH – 2023
Class: II B.Sc. CS AIDED Semester-IV Course Code: U21CS4P4

Course Title: DATABASE DESIGN LAB


Duration: 3 Hrs. Max Marks: 100

SET – 15

1. Create the following table with the mapping given below


a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no,
dept_no, salary).
(i) Create a view emp1 from emp_details such that it contains only emp_no
and emp_name.
(ii) Arrange the records of emp_details table in descending order using
emp_no column
(iii) Write SQL query for aggregate functions (50 Marks)

2. Write a PL/SQL program to calculate the Electricity Bill using Cursors.


(50 Marks)

You might also like