Skip to content
VUBuddy

CS405 Final Term Solved Current Paper by Maha

Database Programming using Oracle 11g PDF 860 KBUpdated 23 Oct 2026
Final term past paper CS405 Final Term Solved Current Paper by Maha PDF 860 KB
vubuddy.com
Type
Final term past paper
Course
CS405 Database Programming using Oracle 11g
Size
PDF 860 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 860 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 35. Download the file for all 35 pages.

Short Questions:

1. Table Record:

o A record is a collection of related data items stored as a single unit. o Example:

DECLARE emp_record emp%ROWTYPE; BEGIN SELECT * INTO emp_record FROM emp WHERE empno = 1001; END;

2. Exception Types in PL/SQL:

  • Predefined Exceptions: Raised automatically (e.g., NO_DATA_FOUND).
  • User-Defined Exceptions: Declared manually using EXCEPTION.

 Example:

DECLARE salary_error EXCEPTION; BEGIN IF salary < 0 THEN RAISE salary_error; END IF; EXCEPTION WHEN salary_error THEN DBMS_OUTPUT.PUT_LINE(' Invalid Salary'); END;

1. Continue When Statement Explanation:

o This skips the remaining code in the loop's current iteration when a condition is met. o Example:

BEGIN

CONTINUE WHEN i = 5; DBMS_OUTPUT.PUT_LINE(i); END LOOP; END;

2. Records in PL/SQL:

o Similar to structs in C, they store multiple fields in a single variable. o Example:

DECLARE emp_rec emp%ROWTYPE; BEGIN SELECT * INTO emp_rec FROM emp WHERE empno = 7369; DBMS_OUTPUT.PUT_LINE(emp_rec.ename || ' - ' || emp_rec.sal); END;

Long Questions:

1. Nested Loop Syntax:

BEGIN

FOR j IN 1..2 LOOP DBMS_OUTPUT.PUT_LINE('i=' || i || ', j=' || j); END LOOP; END LOOP; END;

2. PL/SQL Procedure Code:

CREATE OR REPLACE PROCEDURE get_emp_details(emp_id NUMBER) IS emp_name emp.ename%TYPE; BEGIN SELECT ename INTO emp_name FROM emp WHERE empno = emp_id; DBMS_OUTPUT.PUT_LINE(' Employee Name: ' || emp_name); END;

All CS405 files →
CS405 Database Programming using Oracle 11g All CS405 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.